setup route

Bootstrap, validate, and upgrade the repo.

Six commands cover initial setup through ongoing maintenance: this, init, up, check, sync, and doctor. Every flag and artifact below comes from src/main.js and the dispatched command modules.

dispatch src/main.js baseline writer src/core/commands.js readiness src/core/toolchain.js

Six commands, each with a narrow job.

Flags listed are parsed in src/main.js and forwarded to the dispatch target. Booleans are present-when-true unless marked with a default.

bootstrap

this

Dispatch: src/core/bootstrap.js · runBootstrapCommand(args).

Flags: --provider <value>, --root <path>, --dry-run, --json.

Writes: .agentify.yaml, managed .gitignore block, .agentignore, .guardrails, .agentify/, docs/modules/.

agentify this --provider codex
baseline

init

Dispatch: src/core/commands.js · ensureBaselineArtifacts(root, config).

Flags: --provider, --root, --dry-run, --json.

Writes: same baseline as this, without macOS bootstrap probing.

agentify init --provider codex
refresh

up

Dispatch: src/core/commands.js · runUpdate(root, config, { skipCodeBodyChanges: args.hook }).

Flags: --provider, --root, --dry-run, --docs (default true), --headers, --hook, --json, --timeout, --fail-on-stale.

Writes: .agentify/index.db, AGENTIFY.md, docs/repo-map.md, per-module docs.

agentify up --provider local --docs=false
validate

check

Dispatch: src/core/commands.js · runValidate(root, config, { skipCodeBodyChanges: args.hook }).

Flags: --root, --hook, --dry-run, --json, --strict (default false).

Reads: .agentify/index.db, .agentify.yaml, source files. Writes nothing.

agentify check --hook
upgrade

sync

Dispatch: src/core/repo-sync.js · runRepoSync(root, config, { provider: args.provider }).

Flags: --provider, --root, --dry-run, --json.

Writes: updates .agentify.yaml, .agentignore, .guardrails, managed .gitignore block to current Agentify version.

agentify sync --provider codex --dry-run
readiness

doctor

Dispatch: src/core/toolchain.js · runDoctor(root, config, { semantic, failOnStale }).

Flags: --root, --semantic, --fail-on-stale, --json.

Reads: Node/pnpm versions, provider CLI availability, .agentify/index.db freshness, capability tier.

agentify doctor --semantic --json

Pick the command that matches the checkpoint.

this vs init

this probes the macOS host (Homebrew, provider CLI) before writing the baseline. init only writes the baseline files; it does not require a non-local provider.

up vs check

up mutates state: scan, optional docs, validate, run detected tests. check validates only; it never writes. Use --hook on either to skip body-change comparison after intentional edits.

sync vs init

sync upgrades an already-Agentified repo after the CLI itself changes. init creates baseline artifacts in a fresh repo. Run sync after every Agentify upgrade.

doctor

Read-only health summary. Use before this/init on a new machine, or to check the analysis capability tier (with --semantic).

Files written under repo root.

.agentify.yaml Project config: provider defaults, validation, hooks, ignore rules.
.agentignore Patterns excluded from indexing and validation.
.guardrails Repo-scoped safety rules consulted by check and runtime.
.agentify/index.db SQLite index produced by up; read by query, risk, plan.
AGENTIFY.md Generated repo overview written by up.
docs/repo-map.md, docs/modules/ Module map and per-module docs refreshed by up --docs.