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 --if-enabled
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)
--if-enabledcheck only if the repository is active in the workspace; otherwise exit 0 without sending a check
--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. A check without it never adds a repository
--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.

Add the repository the origin remote names to the workspace that checks and bills it, and run its first check. A repository already added but disabled is enabled again. The command names the workspace and the cost, asks you to type the repository’s owner/name, and refuses when stdin is not a terminal. It exits with the first check’s result. A check never adds a repository by itself. See Repositories.

FlagMeaning
--root PATHrepository path (default .)
-w, --workspace NAME|IDworkspace to add it to, by name or id, instead of the one this login is bound to (also SLOPCOP_WORKSPACE)

Show the account and workspace that bill checks, and whether the repository the origin remote names is added to that workspace and active. It is the quick way to answer whether a checkout is handled by SlopCop. See Repositories.

FlagMeaning
--root PATHrepository path (default .)
--format human|jsonoutput format (default human)
-w, --workspace NAME|IDworkspace to inspect, by name or id, instead of the one this login is bound to (also SLOPCOP_WORKSPACE)

States: active; disabled; enabled, over the limit; not added (run slopcop enable from the checkout to add it); and unsupported (SlopCop checks repositories on github.com, gitlab.com and bitbucket.org). json carries the same state as active, disabled, over_limit, not_added, or unsupported, with the repository’s url, fullName, provider, id, enabled, and active. Exits 2 when the checkout has no origin, or the service cannot answer.

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.

Undo an ignore: later checks of the repository report the finding again. The id is the one it was ignored from, or the same finding’s id from any later check. Unignoring a finding that is not ignored is fine. Takes -w/--workspace, and exits like ignore. See False positives.

List the findings your workspace ignored in this repository (the one origin names), newest first, 25 per page: each one’s finding id for unignore, severity, location, rule, title, and when and by whom. A finding the service no longer records has no id. Flags: --page <n> (from 1), --format human|json, --root <path>, -w/--workspace. Exits 0, or 2 with the service’s message.

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, unignore, ignored, 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
OPENCODE_SESSION_ID, OPENCODE_DB, XDG_DATA_HOMEset by OpenCode or you; the same

See Configuration for precedence and the files the CLI writes.