DocsCoreCLI reference

CLI reference

Every command the shipped binary accepts, and what it returns.

Commands

Some take a path, a few a subcommand of their own.

bash
pretense scan .
pretense scan ci

Set up

CommandWhat it does
initScan the codebase and write pretense.yaml
quickstartinit, git hooks and next steps in one go
loginAuthenticate. Takes --key, or opens a browser
logoutRemove stored credentials
authlogin, logout, status, and licence for air-gap
installInstall the pre-commit and pre-push git hooks
ignoreAdd patterns to .pretenseignore
configlist, get and set configuration values

Every day

CommandWhat it does
scanScan a file, a directory or a git range
reviewShow the mutations that would be applied
mutateSwap the secrets in 1 file for synthetics
reverseRestore a mutated file from its map

The proxy

CommandWhat it does
runRun an AI tool through the proxy. Alias: with
startStart the proxy
stopStop the running proxy
statusWhether it is running, and on which port

You rarely start the proxy by hand. run starts one, points the tool at it, and stops the one it started.

Records and plan

CommandWhat it does
auditRecent mutation entries, filterable by framework
logsRecent audit log entries
usagePlan usage against limits for the period
creditsRemaining mutation budget. Alias: tokens
policyList and inspect compliance frameworks
completionPrint the tab-completion script for a shell
versionPrint the version. Same as --version
upgradeCompare plans and change your subscription
There is no self-update command

upgrade is about your subscription, not your binary. To move to a newer version, run the install command from the Quickstart again.

Flags

Flags belong to the command they follow. These are the ones you will reach for.

FlagOnWhat it does
--jsonscan, review, audit, logs, status, usage, creditsMachine-readable output
--policy <preset>scan, initApply a compliance preset
--severity <lvl>scanMinimum severity to report
-l, --limit <n>audit, logsHow many entries to show
-p, --port <port>start, runPreferred port. Default 9339
--provider <name>runForce anthropic, openai or google

Mutating a single file

-i writes the result back to the file instead of printing it. --map <path> chooses where the reversal map is written, and where reverse reads it from.

bash
pretense mutate -i src/config.ts
pretense reverse src/config.ts -i --map ~/.pretense/maps/<hash>.json

mutate prints the second line for you, with the real path filled in.

Keep the map

With no --map given, an in-place mutation writes one into ~/.pretense/maps/ and prints the exact command that restores the file. reverse asks for that map and will not run without it, which is what stops a mutated file becoming an unrecoverable one. See How it works.

Exit codes

The 2 scanning forms report findings with different codes. A gate that checks for the wrong one passes while secrets sit in the diff.

CommandCleanFindings
scan01
scan ci02

Gate on the first. scan ci reads only what git tracks, so it exits 0 with an untracked secret still on disk — Automation has the detail.

Known limits

  • mutate takes a file, not a directory.
  • A directory scan skips .md files. Naming one directly does scan it, so a secret pasted into a README passes a repository scan and fails a scan of that file.