Skip to content

CLI reference

slopcop [flags] # check the working tree (same as slopcop check)
slopcop [command] [flags]

Running slopcop with no subcommand runs the check. slopcop --help and slopcop <command> --help print the same text as this page. slopcop completion <shell> generates shell completion.

FlagMeaning
--service URLthe SlopCop check service URL (also SLOPCOP_SERVICE); default https://slopcop.com
-v, --versionprint the version and exit
-h, --helphelp for the command

Check the working tree through the hosted check API. See Run a check.

Terminal window
slopcop
slopcop check --format json
slopcop --root ../repo --base origin/main
FlagMeaning
--root PATHrepository path to check (default .)
--base REVbranch or revision the change started from; the base is its merge base with HEAD (default: merge base with the upstream branch, then with origin/HEAD, then HEAD)
--base-exact REVexact base commit or revision, used without taking a merge base
--format human|json|sarifreport format (default human)
--fail-on never|finding|note|warning|errorexit 1 when a new finding is at or above this level (default finding)
--policy PATHrepository-relative .rqlp policy file to evaluate (repeatable)
--no-policy-discoverydo not include .slopcop/policies rules automatically
--timeout DURATIONhow long to wait for the result; a check still running then exits 3 (default 10m0s)
-w, --workspace NAME|IDworkspace to run in, and bill, by name or id, instead of the one this login is bound to (also SLOPCOP_WORKSPACE)
--add-repositoryadd the repository to the workspace --workspace names, which then pays for it, without asking at a terminal; pass it once the user has approved that
--verboseprint the resolved request to stderr, and name each inconclusive check in human

Exit codes: 0 clean, 1 new findings, 2 incomplete or failed, 3 still running, 4 refused and a person must act, 130/143 interrupted. See Exit codes.

Sign in to the SlopCop check service. With no flags, starts the browser device flow: prints a link that opens the approval page with the code filled in, then waits for approval. Also installs the agent skill into every well-known skills directory whose harness is installed here, as every check does. See Sign in.

FlagMeaning
--token TOKENstore an existing token instead of starting the browser flow

Forget the stored credential.

Show the account behind this login, the workspace it is bound to (the one its checks and ignores run in, and bill), that workspace’s plan, and the service URL. Run it before a check when it matters which workspace pays.

FlagMeaning
--format human|jsonoutput format (default human); json has service, account, workspace, plan

List your account’s workspaces, or bind this login to another of them. See Workspaces.

CommandMeaning
workspace list [--format human|json]the account’s workspaces; * marks this login’s
workspace use <name|id> [--format human|json]bind this login to another workspace; moves every agent and script using the login, so it asks [y/N] and refuses when stdin is not a terminal

List the repositories of this login’s workspace, or of the one --workspace names, or enable or disable one. See Repositories.

CommandMeaning
repo list [--format human|json]the workspace’s repositories and whether each is active, disabled, or enabled over the limit
repo enable <owner/name|id>enable a repository, within the workspace’s active limit (owner only; asks you to type the name)
repo disable <owner/name|id>disable a repository: it is not checked or charged (owner only; asks you to type the name)

All take -w/--workspace. enable and disable take --format for their answer, and refuse when stdin is not a terminal.

Stop reporting one finding that is a false positive. The id is the one a check printed. Ignoring covers that one finding in its repository for your workspace, not its rule. Takes -w/--workspace. Exits 0 with a confirmation, 2 with the service’s message otherwise. See False positives.

Install the agent skill that ships inside this binary, and a Claude Code and Codex Stop hook that checks what a session wrote when the agent stops. See The agent skill and The Stop hook.

FlagMeaning
--no-skilldo not install or update the agent skill
--no-hooksdo not install or update the automatic check hook
--remove-hooksremove SlopCop’s automatic check hook and nothing else

Run a check from a Claude Code or Codex Stop hook. It reads the hook’s input on stdin and answers in the harness’s hook protocol. slopcop init installs it as slopcop hook claude || true and slopcop hook codex || true; it is not meant to be run by hand.

Print the version. A release binary prints its tag; a plain go install prints dev.

VariableMeaning
SLOPCOP_TOKENa token for this run; wins over the stored credential
SLOPCOP_SERVICEthe service URL; --service wins over it
SLOPCOP_WORKSPACEthe workspace for check, ignore, and repo; -w wins over it
SLOPCOP_NO_UPDATE_NOTICEany non-empty value silences the upgrade notice
CLAUDE_CODE_SESSION_ID, CLAUDE_CONFIG_DIRset by Claude Code; name the session the CLI reads model attribution from
CODEX_THREAD_ID, CODEX_HOMEset by Codex; the same

See Configuration for precedence and the files the CLI writes.