CLI Reference
Use this page when you need a quick map of the OAT CLI rather than the full command-by-command docs. It is intentionally shallow: each section points to the owning page that documents the detailed behavior.
The CLI is also a standalone value path. You can use oat init, oat sync, oat tools, docs commands, repo archive sync, and repo-analysis commands without adopting the full project workflow.
Contents
- CLI Bootstrap - Bootstrap a repo with
oat init, guided setup, and initial provider adoption. - Tool Packs - Install, update, inspect, and remove bundled OAT skills and agents.
- Config and Local State - Config, backlog, local paths, diagnostics, and related utility commands.
- Workflow Gates - Per-skill final commands, review gates, and cross-runtime prompt dispatch.
- Docs Tooling Commands - Docs app scaffolding, migration, index generation, and nav sync.
- Provider Sync - Sync behavior, provider capabilities, config, and drift management.
- Agentic Workflows - Tracked project execution, skills, ideas, and workflow routing.
- Workflow & Projects - Project lifecycle, artifacts, reviews, PR flow, and state-machine docs.
- Repository PR Comment Analysis - Detailed
oat repo pr-comments ...behavior.
Full CLI Reference Expansion Path
Keep this page as the command-family map. Fuller command coverage should live either in the owning section for a command family or in generated/semi-generated reference pages that link back here.
Each full command reference should include:
- exact arguments, flags, defaults, aliases, and mutually exclusive options
- output examples, including
--jsonshapes where the CLI supports JSON - exit behavior for success, validation errors, missing state, and non-interactive blockers
- side effects such as file writes, generated artifacts, config mutations, branch/commit behavior, and network calls
- non-interactive usage guidance, including required flags and scripting-safe forms
- source or test references for behavior that is easy to drift, marking unknown exit-code behavior as unknown instead of inventing a contract
The first practical expansion path is to keep improving the existing owners: Docs App Commands, Provider Interop Commands, Config and Local State, Tool Packs, Workflow & Projects, and Repository PR Comment Analysis.
Command Groups
| Command group | What it covers | Go deeper |
|---|---|---|
oat init | Bootstrap canonical OAT directories, sync config, optional hooks, and guided setup. | CLI Bootstrap |
oat tools ... | Install, inspect, update, and remove bundled OAT tool packs and assets. | Tool Packs |
oat pjm ... | Initialize the two-layer repo-reference surface (init), run enabled-pack reference diagnostics (doctor), and migrate legacy layouts to pjm/ + reference/ (migrate) after installing the project-management pack. | Install vs. initialize |
oat decision ... | Create, index, and migrate file-per-record repo decisions under reference/decisions/ (init, new, regenerate-index, migrate). | Config and Local State |
oat backlog ... / oat local ... | File-backed backlog helpers, local path sync, and local-only operational support. | Config and Local State |
oat config ... / oat instructions ... | Config discovery, source-aware config dumps, supported mutations, and instruction-integrity helpers. | Config and Local State |
oat gate ... | Per-skill final gate config, review-specific gate execution, exec-target registry writes, and cross-runtime prompt dispatch. | Workflow Gates |
oat state ... / oat index ... / internal | Repo dashboard refresh, repo indexing, validation helpers, and diagnostics. | Config and Local State |
oat docs ... | Docs app bootstrap, migration, index generation, nav sync, and docs workflow entrypoints. | Docs Tooling Commands |
oat status / oat sync / oat providers ... | Provider sync, drift inspection, provider configuration, and adoption behavior. | Provider Sync |
oat project ... / oat cleanup ... | Project scaffolding, active-project status inspection, tracked-project listing, plan validation, archive creation, and project/artifact cleanup commands. | Workflow & Projects |
oat review ... | Review artifact discovery helpers, including latest-review resolution for project and ad-hoc review flows. | Reviews |
oat repo ... | Repository-level workflows such as archive sync and PR-comment analysis. | Repository Analysis |
Notable commands introduced in the current CLI surface:
oat config dump --json- merged config with source attributionoat project status --json- full parsed state for the active tracked project. Stable contract for skills: the JSON output is a typed read interface for OAT skills; the field set consumed by migrated skills is locked byMIGRATED_FIELDSinpackages/cli/src/commands/project/status.test.ts. Removing or renaming any ofproject.{name, path, phase, phaseStatus, workflowMode, docsUpdated, lastCommit, prStatus, prUrl}is a breaking change and will fail the contract test.oat project status --field <path>- print one arbitrary dot-path field from the same status payload, e.g.project.workflowModeorproject.timestamps.stateUpdated. Missing/null fields printnull; object and array fields print compact JSON.oat project status --project-path <path>- read from a repo-relative or absolute project path instead of.oat/config.local.json's active project pointer. Combine it with--fieldor--shellwhen a skill has already resolved the target project path.oat project status --shell NAME=path ...- print shell-safe assignments for one or more fields from one status read, e.g.WORKFLOW_MODE='quick'. This is the preferred multi-field read API for skills. See Writing Skills → Reading project state for examples and thenpx-backedoatshim contract.oat review latest --json- find the newest review artifact byoat_generated_at, scanning the active or specified project'sreviews/andreviews/archived/directories plus ad-hoc review locations. Same-time candidates use target priority, then lifecycle recency (final> higher phase/task > lower phase/task). The JSON contract returnspath,scope,generatedAt,kind(projectoradhoc),archived, andactionable, withnullvalues when no review exists. Archived project reviews remain discoverable as history but returnactionable: false.oat project list --json- summary state for tracked projects under the configured projects rootoat project complete-state <project-path>- apply the canonical completed-state mutation to a project'sstate.md; used byoat-project-completeduring lifecycle closeoutoat project archive [project-path]- archive a tracked project through the same local move, summary export, and optional S3 upload path used by completion. When omitted, the project path falls back to the active project.oat repo archive sync [project-name]- hydrate archived project snapshots from the configured repo-scoped S3 archive into.oat/projects/archived/. The oldoat project archive syncpath remains as a deprecated shim.oat project validate-plan --project-path <path>- validatesoat_plan_parallel_groupsmetadata inplan.md; exits non-zero on invalid. See Implementation Execution.oat project set-mode— deprecated no-op. Execution mode is no longer user-selectable; emits a deprecation warning and preserves the--jsoncontract.oat gate review <prompt...>- run a stateful OAT review through the target registry, parse the produced review artifact, and exit nonzero for configured blocking findings. With--json, the result envelope on exit is the canonical completion signal:statusisok|blocked|review_failed|artifact_validation_failed|targeting_correlation_failed, alongsiderunId,generatedAt, andartifactPathwhen available. Invokeoat-project-review-receiveonly when all three conditions hold:statusisokorblocked,receiveEligibleistrue, andhandoffis non-null. Forartifact_validation_failed, correct the artifact and rerun the gate for successful revalidation before receive.targeting_correlation_failedsetsreceiveEligible: false; do not run review-receive even if it reports an artifact path. Orchestrators should read the structured result rather than poll the filesystem. The command runs standalone (for example,--review-scope final), not only insideoat-project-implement. See Workflow Gates → Gate completion signal.oat gate target set <id> --invocation-model <model|provider-default> --invocation-reasoning-effort <effort|provider-default>- persist optional configured invocation metadata alongside an exec target without inferring it from the target command.oat gate target list --json- inspect resolved gate targets without selecting or executing a reviewer. Each entry reports its config origin, whether it is explicitly configured and enabled, current availability, and normalized configured invocation values (unknownwhen omitted).oat gate cross-provider-exec <prompt...>- choose an available exec target while avoiding the current runtime by default, then run the prompt with the chosen target's configured base command and exit with the child status.
oat config surface flags
oat config set supports mutually exclusive surface flags that control which config file receives the write:
--shared— write to.oat/config.json(committed team repo settings)--local— write to.oat/config.local.json(per-developer repo state, gitignored)--user— write to~/.oat/config.json(user-level fallback, applies across all repos)
When no flag is passed, the CLI picks a sensible default per key type: structural keys (projects.root, documentation.*, etc.) go to shared, state keys (activeProject, etc.) go to local, workflow preferences (workflow.*) go to local. Pass at most one flag — the command rejects multiple surface flags.
Per-key restrictions apply: structural keys can only be written at shared scope, most state keys can only be written at local scope (activeIdea is the exception — it accepts both local and user), and workflow preference keys accept any non-auto surface. Legacy autoReviewAtCheckpoints remains shared-only; prefer workflow.autoReviewAtHillCheckpoints.
workflow.* preference keys
The workflow.* namespace holds user-facing workflow preferences that let you answer repetitive confirmation prompts once and have OAT skills respect the answer automatically. Common keys:
workflow.hillCheckpointDefault(every|final) — default HiLL checkpoint behavior inoat-project-implementworkflow.archiveOnComplete(boolean) — skip the archive prompt inoat-project-completeworkflow.createPrOnComplete(boolean) — skip the "Open a PR?" prompt inoat-project-completeworkflow.postImplementSequence(legacywait|summary|pr|docs-pr, or structured{preApproval, postApproval}arrays) — approval-aware post-implementation chainingworkflow.reviewExecutionModel(subagent|inline|fresh-session) — default final-review execution modelworkflow.autoReviewAtHillCheckpoints(boolean) — auto-run the extra lifecycle review at HiLL checkpointsworkflow.autoNarrowReReviewScope(boolean) — auto-narrow re-review scope to fix-task commitsworkflow.autoArtifactReview.plan(boolean, defaulttrue) — auto-run the boundedplan.mdartifact-review loop before implementation handoffworkflow.autoArtifactReview.analysis(boolean, defaulttrue) — auto-run the bounded accuracy-review loop for generated analysis artifacts before apply workflows consume them
These workflow keys resolve through config files and defaults (local > shared > user > default). Some config keys have explicit environment aliases, but workflow.autoArtifactReview.plan and workflow.autoArtifactReview.analysis do not. See Workflow preferences in the Configuration guide for full descriptions, surface guidance, and cross-repo foot-gun examples.