| guardian init [--mode shared|branches] [--router …] [--quadro …] [--wiki …] [--decisoes …] [--trabalho …] [--claims …] [--handoffs …] [--quadro-max-linhas N] | Idempotent bootstrap of the structure and the working mode; writes the layout to guardian.json. |
| guardian doctor | Validates the structure and runs the audit; fails with exit ≠ 0 if there is an error. |
| guardian hook install [--max-files N] | Installs the pre-commit hook (idempotent; respects core.hooksPath). |
| guardian hook uninstall | Removes only the guardian block from the pre-commit hook. |
| guardian hook run {pre-commit} [--actor A] [--max-files N] | Runs the hook; this is what the script in .git/hooks calls. |
| guardian audit [--json] | Deterministic discipline audit (no LLM). |
| guardian index rebuild [--semantic|--lexical] | Rebuilds the SQLite index from the markdown files; incremental by sha256. |
| guardian index search <query> [--limit N] [--kind K] [--tool T] [--semantic|--lexical] [--json] | Full-text/hybrid top-k search; --tool filters kind=instrucao documents. |
| guardian instrucoes status | Per-folder table: files, lines, which tool family sees which. |
| guardian instrucoes sync | Creates/updates pointer blocks in the gaps found (idempotent). |
| guardian claim --actor A [--task T] [--minutes N] scope [scope ...] | Reserves a file scope (lease); refuses overlap with another actor. |
| guardian release [--actor A] claim_id | Releases an active claim. |
| guardian handoff create --actor A --to D --work-item W --summary S [--files ...] | Creates a continuity handoff between sessions. |
| guardian handoff accept --actor A handoff_id | Accepts a pending handoff (single acceptance). |
| guardian signup [--api-url U] [--email E] [--name N] [--repo R] [--invite C] [--aceito-termos] | Creates the account, the first installation and saves the connection (the normal way in). |
| guardian login [--api-url U] [--email E] [--repo R] [--new] [--yes] | Signs in to an existing account and connects this repository; reissues the key. |
| guardian reset-password [--api-url U] [--email E] | Sends the password reset link to the account email. |
| guardian configure --api-url U --api-key K | Configures the server connection manually (key issued by another login/admin). |
| guardian report [--actor A] | Audits and sends the report (metrics only) to the server; queues it if offline. |
| guardian sync-patterns | Syncs local patterns with the server: only slug/title/sha256/embedding, never the body. |
| guardian contribute <arquivo.md> [--tags a,b] [--yes] [--no-embedding] | Proposes a decision/rule to the curated library; anonymizes, shows the text and asks for confirmation. |
| guardian proposals list|show|approve|reject | Curation of the proposal queue (admin; token in GUARDIAN_ADMIN_TOKEN). |
| guardian embed <texto> [--semantic|--hashing] [--json] | Generates a local 384-dimension embedding (for inspection/debugging). |
| guardian license [--force] | Checks the license state (validated once a day, with cache and offline grace). |
| guardian benchmark [--casos F] [--gerar-casos F] [--cenarios ...] [--json F] [--markdown F] | Compares token usage: nothing (grep) × code graph × router × guardian index. |
| guardian brief "<tarefa>" [--tool claude|agents|gemini|cursor] [--limit N] [--max-tokens N] [--saida F] [--json] | Markdown context package to paste into a plan or a review briefing. |
| guardian obsidian-setup [vault_path] [--yes] [--json] | Configures the integration with an Obsidian vault (auto-detects it or uses the given path). |
| guardian obsidian-monitor vault_path [--daemon] [--debounce S] | Monitors the Obsidian vault in the background. |