Skip to content
prooflinedevPublic

About

Request pull request reviews, inspect findings, and verify fixes from the command line with Proofline.

Topics

Resources

Stars

20 stars

Watchers

0 watching

Forks

Repository files navigation

Proofline CLI

The command-line client for the Proofline review API. See the CLI documentation for commands.

This repository is the published distribution of the Proofline CLI. openapi.public.json is the generated public API contract pinned for this revision. During the build, build.rs generates request URLs for the operations it declares. Open an issue for changes to openapi.public.json, generated code, or workflows. Pull requests are welcome for the hand-written installer in install.sh, commands in src/, release scripts in scripts/, and tests in tests/.

Installation and setup

On Linux and macOS, install the CLI with curl -fsSL https://proofline.sh/cli | sh, then run proofline login. proofline update replaces the binary the installer put in ~/.local/bin, or in PROOFLINE_INSTALL_DIR when you set it, and an interactive command suggests it when a newer release exists. A source build or package-manager installation is told to update the way it was installed instead. Run proofline setup to open the browser organization selector. Pass --organization NAME to open that GitHub organization's installation page, or --print to only print its address. Cloud trust and connection changes still require a signed-in administrator browser.

A coding agent can continue setup from its shell without an MCP restart. proofline setup guide prints the instructions and needs no sign-in. proofline setup status prints the current setup step, readiness and blockers, and proofline setup candidates [--query NAME] lists the repositories and deployments an answer may name. Both print the hosted MCP tool result as JSON and need setup:write, like proofline config get. The agent saves answers with the configuration commands.

proofline completions SHELL prints a completion script for zsh, bash, fish, powershell, or elvish without signing in or making a network call. For example, add source <(proofline completions zsh) to ~/.zshrc.

Windows installation

Official releases include proofline-x86_64-pc-windows-msvc.tar.gz with proofline.exe. Download the archive and SHA256SUMS from the same GitHub release, and compare its SHA-256 hash using Get-FileHash -Algorithm SHA256. Extract the archive with tar -xzf and put proofline.exe in a directory on PATH. Run proofline login to store credentials in Windows Credential Manager. To update, close running Proofline processes and replace the executable from a verified release. The Unix shell installer and self-update command do not install Windows binaries: proofline update refuses on Windows and names the archive, and the update notice names the new version's archive download instead of proofline update.

On Linux, coding agents that omit DBUS_SESSION_BUS_ADDRESS and XDG_RUNTIME_DIR can still use the stored sign-in when the standard /run/user/<uid>/bus socket is available. An explicit bus address or runtime directory keeps precedence. PROOFLINE_TOKEN continues to take precedence over the stored sign-in. A host with no keychain at all, such as a shell over SSH or in a container, cannot keep a sign-in: proofline login refuses before any approval and names /account/tokens in the console, where the person creates a personal token to set as PROOFLINE_TOKEN. A token that works in one organization needs no --org; the CLI reads its organization from the server.

MCP agent registration

To register MCP without a prompt, run proofline agent install CLIENT --yes. Supported clients include claude-code (or claude), cursor, codex, gemini, and kiro. Without --yes, the command previews the entry and asks for confirmation, while --print previews without writing. Existing Proofline entries remain unchanged. New entries use this executable's absolute path and store no credentials. Claude Code uses the top-level mcpServers in ~/.claude.json; a custom CLAUDE_CONFIG_DIR requires manual configuration with --print.

Native knowledge, plan, fix and configuration commands send the selected organization as organization_id in each MCP tool call. With a PROOFLINE_TOKEN that works in more than one organization, select an authorized UUID using --org ORGANIZATION_ID or PROOFLINE_ORGANIZATION_ID; the flag takes precedence. A token that works in exactly one, such as a personal token, needs neither. A stored device sign-in uses its approved organization and refuses a different selection. For example, proofline --org ORGANIZATION_ID wiki list --repo owner/name and proofline --org ORGANIZATION_ID config get target that organization with a shared MCP OAuth credential. Selection grants no authority: the server checks each call, and a foreign target returns its refusal with a nonzero exit. MCP OAuth credentials remain limited to MCP and cannot use REST commands. The raw proofline mcp bridge preserves the caller's messages and per-call target unchanged.

Reviews, history, and reruns

proofline review --path src/main.rs reviews only that file's local changes against the normal merge-base. The path is literal and repository-relative; the command refuses directories, globs, and ... Combine it with --staged to read the index, or --include-untracked to select a new, non-ignored file. The command preserves the real index and applies the usual secret preflight. You cannot combine --path with pushed-commit, range, or pull-request review.

proofline reviews --repository-id UUID --cursor CURSOR returns one page with its continuation metadata, and all flags are optional. proofline routing REVIEW_ID reads recorded routing. proofline run --repo owner/name --pr 7 --run 2 reads one retained run, and proofline history --repo owner/name --pr 7 reads all recorded runs. Both commands send the API the name without its owner, and use the response only when its repository choices list owner/name, or the Git remote's owner and name, among the organization's reviewed repositories. A repository with no reviews in the organization exits nonzero. proofline findings --pr 7 finds the pull request's newest review through the same route and counts only runs of the repository whose full name matches. None of these commands reads the organization's review list.

proofline rerun REVIEW_ID requests the original immutable subject and waits, while --no-wait returns its link. Reruns require reviews:rerun. proofline guidance --repo owner/name requires guidance:read, and proofline fix-prompt FINDING_ID requires findings:read. History, guidance, and fix prompts print JSON; prompt text remains untrusted.

proofline review --range BASE..HEAD --fail-on serious exits 3 when a complete review has an unresolved finding at or above the threshold. PR reviews use the server’s effective open-item counts; other reviews count unresolved findings. Incomplete and unavailable results retain their nonzero exits. --fail-on cannot be combined with --no-wait.

In GitHub Actions, proofline ci review --annotations prints unresolved findings as workflow annotations at verified cited lines. Findings without a verified head location appear on the job. The review link contains the full result.

For a CodePipeline execution or Amplify job, run proofline ci deploy --commit SHA --aws-run ID in a later pipeline. Add --environment-id UUID to select its Proofline environment. The output names the AWS provider and run ID. Proofline records a CodePipeline deploy only after the execution succeeds, so a reader inside that execution waits until its timeout and exits 2. On a GitHub workflow_run event, an explicit --aws-run disables the default Actions run and attempt filters.

proofline ci deploy --until 1h waits until Proofline has recorded the deploy checks of the job's commit through the hour check, then exits 0 when each recorded HEALTHY with no gap, 3 when a deploy failed or regressed, and 2 when the result is not established, including when a deploy reads a state this CLI version does not know. After a read that answered, the wait keeps reading through a read that fails in transport, times out or gets a 5xx answer, and exits 4 after five such failures in a row, naming the last error; the first read and a refusal end it at once. Without --timeout, a wait for --until landing, --until 20m or --until 1h lasts until that check is due for the selected deploys, and at least 30 minutes, so a landing check that reads the runtime again, up to 75 minutes after landing, is still read; --until 1d needs --timeout. --environment-id (the Proofline environment's UUID, the environment_id that --json prints for each deploy), --environment (the GitHub Environment name), --task, --deployment (the ID of the GitHub deployment a pipeline created), --run and --attempt select the deploy, and on a workflow_run event the commit, --run and --attempt default to the completed run's. When --run defaults to a completed run that did not succeed, the command waits at most 5 minutes for a deploy from that run, then exits 2 with a last line that names the run's conclusion and says it recorded no deploy; a deploy the run did record gets the usual wait for its check. --json prints the response. Each deploy prints one line per check. A deploy that rolled the environment back to an earlier commit first prints a rollback line with the page of the deploy it restores, when Proofline recorded one, and the pages of the deploys it rolled back. A deploy whose newest check found its service serving an earlier deploy again first prints a rolled back line, and stops printing it once a later check finds none; with --json the response carries it as rolled_back. Both lines can appear for one deploy. A rollback's exit code comes from its checks like any other deploy's; neither line changes it or means the rollback fixed anything. A deploy whose deploy checks ended without recording the --until check ends the wait at once with exit 2, and the last line names the check and the deploy's page; a check that is overdue while the checks still run keeps the wait going until the timeout.

Scans

Proofline cannot analyze a scan's files yet. An accepted scan reads the repository's files at its commit but analyzes none of them, so a scan of a repository with files ends FAILED or INCOMPLETE with no findings, and the command exits 2. That empty finding list says nothing about the code.

proofline scan --ref main --budget 200 scans the whole repository at one commit, not a pull request's change. GitHub resolves the ref once, when the request arrives, and the scan records that commit; --commit SHA names an exact full SHA instead, and you give one of the two. The command waits for the scan review and prints it like proofline review, while --no-wait prints its link and --json prints JSON.

--budget is required and has no default: it is the most credits the whole scan may spend, capped by the organization's on-demand scan limit, and a limit of 0 turns on-demand scans off. Results stay in Proofline and are never posted to GitHub. The token needs scans:request and live GitHub write access to the repository. The default sign-in omits that scope, so run proofline login --scope reviews:read --scope findings:read --scope reviews:request --scope scans:request; --scope replaces the defaults, so list every scope you want. A sign-in that holds only scans:request and a repository restriction can request a scan, but cannot read the review it produces, so the command prints the scan's link instead of waiting.

When the server refuses the scan request, the command prints the server's reason and exits 1. With the organization's limit at 0, it then asks you to have an organization administrator raise the on-demand scan limit in review settings. When GitHub does not show your account write access to the repository, it asks you to get that access from a repository administrator. Neither suggests signing in again, which cannot change either answer. A sign-in without scans:request still gets the proofline login --scope … command above, and one whose repositories exclude this one is told to check the token's repositories.

The CLI prints the request ID before it sends anything and never repeats the request. When the outcome is unknown (the connection failed, the server failed, or its answer was unreadable) the command exits 4; repeat it with --request-id ID to read the first resolution instead of paying for a second scan. If GitHub cannot resolve the ref, nothing starts and nothing is spent, but repeating that ID returns the same answer, so omit --request-id to ask again; with --json the resolution is still printed. Other exit codes match proofline review: 0 for a complete result, 2 for an incomplete or unfinished one and 1 for a refusal or error.

Fix verification and agent sessions

review and findings print each finding’s ID in text output for use with fix context, fix-prompt, and review --verify.

proofline fix list --repo owner/repository --pr 42
proofline fix context FINDING_ID
proofline fix verify --review REVIEW_ID --findings FINDING_ID --commit FULL_PUSHED_SHA
proofline fix status REQUEST_ID

fix list returns the open findings at the live pull-request head that Proofline can re-verify: ENV findings, migration compatibility findings and code findings whose reproduction kept its test as a check, including availability, assessment gaps, and truncation. fix context reads captured source excerpts and untrusted remediation. fix verify requests re-verification of 1 to 20 distinct findings from one review at the exact commit you pushed. The server confirms that the commit is the live head, and optional --note accepts 1 to 2,000 characters. The command makes one attempt; after an ambiguous failure, inspect the review before requesting again. For unpushed local changes, use review --verify. For a finding whose reproduction kept its test as a check, fix context and review --verify give the check's command and its last result, so you can run it against your fix.

These fix commands return MCP tool results as JSON, and isError: true exits nonzero. A successful read is not a verdict: PENDING, UNAVAILABLE, and NOT_VERIFIED retain their meaning. Only the server's recorded re-verification establishes a fix. Reads require reviews:read, while verification also requires reviews:request and current repository write access.

proofline session prompt FINDING_ID returns the protected prompt and eligible connections. After reviewing it, run proofline session start FINDING_ID --connection-id UUID --prompt-digest DIGEST. This command starts once and can incur vendor charges. proofline session get SESSION_ID reads status, and proofline session list FINDING_ID lists the finding's recorded sessions, such as after a start whose answer was lost. These commands require a personal token with agent_sessions:start; device sign-in cannot grant this authority.

Knowledge and plans

proofline wiki list --repo owner/name
proofline wiki get index --repo owner/name --commit FULL_COMMIT_SHA
proofline ask --repo owner/name 'Where is authentication enforced?'
proofline architecture ENVIRONMENT_ID
proofline plan get PLAN_ID
proofline plan implement PLAN_ID
proofline plan implementation IMPLEMENTATION_ID

Knowledge commands return the MCP tool result as JSON, including untrusted-text wrappers, citations, and isError. A refused tool exits nonzero. They use the same origin and credential as the MCP bridge and never retry a tool call. Knowledge reads require reviews:read and knowledge:read. Implementation also requires plans:implement, a personal token, and approval of the exact published plan version.

Configuration

proofline login --scope reviews:read --scope findings:read --scope guidance:read --scope reviews:request --scope setup:write --scope org:configure
proofline config get
proofline config get --environment ENVIRONMENT_ID
proofline config get --repo owner/name
proofline config operations --area REPOSITORY_REVIEW_SETTINGS --subject repository
proofline config describe OPERATION --param repo_id=REPOSITORY_ID
proofline config propose change.json
proofline config apply CHANGE_ID

All five commands print the hosted MCP tool result as JSON. get needs setup:write; describe and apply need org:configure; operations and propose accept either scope, although an ordinary proposal needs org:configure. Sign in as an organization administrator and approve these scopes in the browser. A missing scope prints the server's refusal and the sign-in command above. These scopes act for the browser sign-in that approved them and end when it ends, while review access continues. proofline status says whether they are active or ended and prints the sign-in command that renews them.

The change file is a JSON object with operation, parameters and input, plus optional expected_revision from describe and cited_files. Each citation names a repository_id, full commit_sha and repository-relative path. Omit input for an operation without a body. propose adds a fresh request_id on each invocation and prints the diff and change ID; a sensitive proposal also includes its browser approval link. An optional top-level organization_id must be a UUID matching the selected organization; a conflicting or invalid value is refused before any request. The file stays unchanged. Proposing applies nothing and exits successfully when the server records it. After an uncertain response, run proofline config get and read configuration.pending_changes before proposing again. It lists up to 20 of the newest sensitive changes still waiting for approval that you may see, with their approval links, and up to 20 ordinary proposals that apply can still apply, by change ID. A change missing from it may still have been recorded and since decided, expired or fallen outside the list, so check the console's approval list before proposing it again.

apply sends the change ID and selected organization. An ordinary change prints its route result; a sensitive change prints applied: false, the reason and approval link, then exits nonzero. An administrator must open that link and approve the exact diff in a fresh browser session. Server refusals, including stale revisions and another organization's resources, also exit nonzero. Commands use the existing MCP transport and its 8,192-byte request limit, and never retry a tool call.

Coverage uploads and analytics exports

Upload reports your CI produced for an exact commit:

proofline --org "$PROOFLINE_ORGANIZATION_ID" coverage upload \
  --repository-id "$PROOFLINE_REPOSITORY_ID" \
  --commit "$TESTED_COMMIT_SHA" --report coverage/lcov.info --json

Set PROOFLINE_TOKEN to a repository-restricted token with coverage:write. The token holder needs current GitHub write access to the repository. Uploads accept LCOV, Cobertura XML, JaCoCo XML, and Go cover profiles. Repeat --report for up to 50 UTF-8 files with distinct report names, and the JSON body cannot exceed 30 MiB. Relative paths retain their directories, so packages/a/lcov.info and packages/b/lcov.info are distinct. Leading ./ is removed, relative paths cannot contain .., and absolute paths use only the file name.

The command sends the exact 40-character lowercase SHA supplied by CI and does not resolve a branch or run tests. An identical upload returns the recorded report. Upload success records evidence; the server evaluates the coverage check separately.

proofline export reviews --from 2026-10-01T00:00:00Z --to 2026-10-25T00:00:00Z --format csv writes one export page to stdout and requires analytics:read. The datasets are reviews, findings, finding_outcomes, finding_validations, and spend. The default format is NDJSON, while CSV repeats its header on every page. The settled horizon and optional next cursor go to stderr. Repeat with --cursor and the same window and --group-by to continue. A failed page exits nonzero; never treat partial output from several invocations as a complete export.

Development and publishing

Build from source with cargo build --locked --release. rustup installs the pinned Rust toolchain. Run cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo test --locked, and cargo deny check before submitting a pull request. Adding an API operation exposes a CLI command only when a command in src/ declares and uses it.

GitHub Actions checks pull requests and main. Run Release on main with publish=false to build the Linux, macOS, and Windows archives. A vX.Y.Z tag equal to Cargo's version, or a main dispatch with publish=true, publishes the checked archives through the release environment. The commit must be on main.

The build jobs have no write credential. The publisher creates a GitHub draft to reserve the version and records artifact attestations. It then uploads the binaries and SHA256SUMS to the existing R2 download bucket and GitHub Releases. The bucket-scoped credential is the CLI_RELEASE_R2_CREDENTIALS environment secret, and CLOUDFLARE_ACCOUNT_ID is an environment variable. The publisher reserves R2 versions with a conditional write. Retry a failed publishing job with its original build artifacts; it verifies existing files, uploads missing ones, and advances the installer only after the archives match. Install and update URLs stay on proofline.sh.

License

Licensed under Apache-2.0.

About

Request pull request reviews, inspect findings, and verify fixes from the command line with Proofline.

Topics

Resources

Stars

20 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages