LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pinrail

Submit reviews to the Pinrail desktop app from a shell

TLDR

Submit a code review and wait for the decision
$ pinrail submit code-review --title "[Retry failed webhook deliveries]" --data [findings.json] --wait
copy
Wait on an existing review
$ pinrail wait [r_01K5R2]
copy
List pending reviews for this git project
$ pinrail list
copy
Print a review as Markdown
$ pinrail show [r_01K5R2]
copy
Withdraw a pending review
$ pinrail withdraw [r_01K5R2] --reason "[no longer needed]"
copy
List plugins
$ pinrail plugins
copy
Scaffold a new plugin
$ pinrail plugins new [my-plugin]
copy
Print JSON instead of Markdown
$ pinrail --json show [r_01K5R2]
copy

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 answered
show id
Print the review (Markdown, or JSON with --json)
rounds id / events id
List rounds (oldest first, no payloads) or the event log
list
Newest first, no payloads. Default: pending reviews of this git project (or every project outside git). --status, --repo, --all
decide / 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 submitted
plugins
List installed plugins. install source [--link], remove name, describe name, new name, check [dir], schema
attachments list id / attachments get id name
List or save files on a review. get -o path|`-`, --force
export dir
Write every review as JSON files
serve
Start the server if needed and print its URL
docs [path]
Print agent briefs (the skill). --tree lists them
open 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.

SEE ALSO

claude(1), codex(1), opencode(1), git(1), cargo(1)

RESOURCES

Copied to clipboard
Kai