pinrail
Submit reviews to the Pinrail desktop app from a shell
TLDR
SYNOPSIS
pinrail [--json] [--pretty] [-v] [--url URL] command [options]
DESCRIPTION
pinrail is the command agents and scripts use to ask a person through the Pinrail desktop app. The CLI keeps no state: it is a small Rust HTTP client that talks to the server the app runs on loopback. Markdown goes to stdout by default (for an agent); --json prints the API payload (for a script). Diagnostics go to stderr. Version 0.1.2. Apache-2.0. The crate is not published on crates.io; the app installs the binary, or build with `cargo install --path cli`.The app is a Tauri desktop UI (macOS and Linux; Windows planned). First-run setup installs this command, a skill for agents it finds, and the core plugins: code-review, list, feedback, markdown, and image. Default server URL is http://127.0.0.1:4747 (override with --url / PINRAIL_URL, or the address in the running server's `server.json`). submit starts the server if it is not running unless --no-start.
PARAMETERS
--json
JSON on stdout. PINRAIL_JSON=1 sets it for the session--pretty
Indent JSON. Requires --json-v, --verbose
Step-by-step messages on stderr. PINRAIL_VERBOSE--url URL
Server URL. PINRAIL_URL, then `server.json`, then `http://127.0.0.1:4747`
COMMANDS
submit plugin --title text [--data JSON|FILE|-]
Create a review. --wait blocks until it ends. --timeout secs (with --wait; 0 waits forever; else PINRAIL_TIMEOUT). --decision-out file writes `decision.data` as JSON. --request is a full JSON body (file, inline, or `-`). --attach path[=name] sends files (`{"$attachment":"<name>"}` in the payload). --origin `key=value,...` (`repo`, `ref`, `workflow`, `run_id`, `url`). --sample uses the plugin's sample payload. --dry-run validates without creating a review (conflicts with --wait)wait id
Poll until the review ends. --timeout, --decision-out. Survives the app restarting once it has answeredshow id
Print the review (Markdown, or JSON with --json)rounds id / events id
List rounds (oldest first, no payloads) or the event loglist
Newest first, no payloads. Default: pending reviews of this git project (or every project outside git). --status, --repo, --alldecide / discard / withdraw
Record a decision, discard (exit 5 for waiters: stop the work), or withdraw (exit 3). An agent never decides or discards a review it submittedplugins
List installed plugins. install source [--link], remove name, describe name, new name, check [dir], schemaattachments list id / attachments get id name
List or save files on a review. get -o path|`-`, --forceexport dir
Write every review as JSON filesserve
Start the server if needed and print its URLdocs [path]
Print agent briefs (the skill). --tree lists themopen id
Open `pinrail://reviews/<id>` in the app. --browser opens the loopback preview instead
CAVEATS
The CLI needs the Pinrail app (or its loopback server). Exit codes: 0 decided/ok, 1 error, 2 refused, 3 withdrawn or expired, 4 timeout (still pending), 5 discarded (stop). submit --wait keeps waiting through in-app errors until the server answers again.
HISTORY
Pinrail is an Apache-2.0 project by forgeplane. CLI 0.1.2. Early development; expect changes between releases.
