Docs/CLI reference

CLI reference

tama clean

Scans target repositories, delegates actionable violations to one headless model agent per repository and round, rejects rule-gaming, and re-scans until clean or the round limit is reached.

Scans target repositories, delegates actionable violations to one headless model agent per repository and round, rejects rule-gaming, and re-scans until clean or the round limit is reached.

#Invocation

tama clean (--repo <path> | --tree <dir> | --owner <gh-owner> | --me) [...]
           [--model codex|kimi] [--max-rounds <n>] [--skip <fragment>]
           [--note <text>] [--dry-run] [--json] [--hook <path>] [--clone-dir <dir>]

Target, hook, clone, and JSON options match find-violations. The default model is codex and the default maximum is three rounds. --skip is repeatable, --note adds an operator instruction, and --dry-run prints the agent brief without spawning an agent.

#Output and state

A live run lets the selected agent edit each repository, journals rounds and final state, and uses a per-repository lock. Text output reports CLEAN, remaining findings, or LOCKED (another clean in progress); JSON returns results and discovery problems. Unresolved, locked, or discovery-problem results exit 1.

#Refusals and failures

TAMA_CLEAN_DISABLED=1 writes tama clean is disabled (TAMA_CLEAN_DISABLED=1), performs no cleanup, and exits 0. Unsupported models, a --max-rounds value below 1 or not a number, missing targets or option values, and unknown arguments print usage and exit 2. Missing hook, repo, and tree paths use the same exact ... not found: <path> refusals as the scanner. Rule-gaming rounds are rejected and fed into the next round rather than accepted as clean.

Return to the complete CLI command tree.