Complete reference for all Codi commands, the Command Center, and the init wizard.

Command Center

Run codi with no arguments to launch the interactive Command Center. It uses @clack/prompts for a terminal UI with grouped actions.

The menu loops until you select Exit or press Ctrl+C. Actions that require a .codi/ directory are hidden until you initialize a project.

Setup: Initialize project, Add artifact, Generate configs, Manage presets
Build: Export skill, Contribute to community, Generate documentation
Monitor: Project status, Health check, Validate config, Verify agent awareness, Compliance report, CI checks, Clean generated files, Update templates, Revert to backup, Watch for changes, Update docs counts


Init Wizard

Launched by codi init (interactive mode) or from the Command Center. Guides you through 4 steps with backward navigation (Ctrl+C goes back, exits at step 1).

Steps

StepPromptDetails
1. LanguagesMultiselectChoose project languages for pre-commit hooks. Pre-selects detected stack.
2. AgentsMultiselectTarget agents: claude-code, cursor, codex, windsurf, cline. Pre-selects detected agents.
3. Config ModeSelect onepreset / custom / zip import / github import
4. ArtifactsConditionalPreset: choose a built-in preset. Custom: select individual rules, skills, agents, MCP servers.

Keyboard Shortcuts

KeyAction
spaceToggle selection
aSelect / deselect all
Arrow keysMove up / down
enterConfirm
ctrl+cGo back (exit at first step)

Command Reference

Setup Commands

codi init

Initialize a new .codi/ configuration directory.

codi init [options]
OptionDescription
--forceReinitialize even if .codi/ exists
--agents <agents...>Specify agent IDs (skips wizard)
--preset <preset>Flag preset name (skips wizard)
# Interactive wizard
codi init

# Non-interactive with specific agents and preset
codi init --agents claude-code cursor --preset balanced

codi add <type> [name]

Add resources to the .codi/ configuration. Supported types: rule, skill, agent, brand, mcp-server.

codi add <type> [name] [options]
OptionDescription
-t, --template <name>Use a built-in template
--allAdd all available templates of this type

When name is omitted in interactive mode, launches a search wizard.

codi add rule security --template security
codi add skill my-workflow
codi add rule --all
codi add mcp-server memory --template memory

codi generate

Generate agent configuration files from .codi/. Alias: gen.

codi generate [options]
OptionDescription
--agent <agents...>Generate for specific agents only
--dry-runShow what would be generated without writing
--forceSkip no-op detection and rewrite every generated file (implies --on-conflict keep-incoming)
--on-conflict <strategy>How to resolve local edits to generated files: keep-current (skip) or keep-incoming (overwrite). Defaults to interactive prompts on a TTY, auto-merge off-TTY.
codi generate --agent claude-code --dry-run
codi gen --force
codi generate --on-conflict keep-incoming   # overwrite any local edits
codi generate --on-conflict keep-current    # preserve all local edits, skip incoming

Pruning: codi generate automatically deletes generated files that no longer exist in the source templates. Files with local edits are preserved unless you pass --on-conflict keep-incoming or --force.


codi preset <subcommand>

Manage configuration presets.

SubcommandSynopsisDescription
create [name]codi preset create my-setupCreate a new preset scaffold
listcodi preset list --builtinList installed presets
install <source>codi preset install ./preset.zipInstall from ZIP, GitHub URL, or registry
export <name>codi preset export my-setupExport as ZIP file
validate <name>codi preset validate my-setupValidate structure and schema
remove <name>codi preset remove my-setupRemove an installed preset
edit <name>codi preset edit my-setupInteractively edit artifact selection
updatecodi preset update --dry-runUpdate installed presets to latest
codi preset install github:org/repo
codi preset export my-setup --format zip --output ./dist
codi preset list --builtin

Monitoring Commands

codi status

Show drift status for generated agent files. Reports in-sync, drifted, and missing files.

codi status [--diff]
OptionDescription
--diffShow colored unified diffs for drifted preset artifacts

codi doctor

Check project health: config validity, version compatibility, hook installation, drift detection. With --hooks, switches to a per-hook tool availability diagnostic.

codi doctor [options]
OptionDescription
--ciExit non-zero on any failure (for CI/hooks)
--hooksList per-hook tool availability with severity, category, and install hint. Exits non-zero when any required tool is missing.

codi validate

Validate the .codi/ configuration against schemas.

codi validate

codi verify

Verify that an agent loaded its configuration correctly. Shows the verification token, rules, skills, agents, and flags.

codi verify [options]
OptionDescription
--check <response>Validate a pasted agent response against expected values
# Show expected verification data
codi verify

# Validate agent response
codi verify --check "codi-abc123"

codi compliance

Run full compliance report: doctor + status + verification combined.

codi compliance [options]
OptionDescription
--ciExit non-zero on any failure

codi ci

Composite CI validation. Runs validate + doctor --ci and reports combined results. Exits non-zero on any failure.

codi ci

codi watch

Watch .codi/ for changes and auto-regenerate agent configs. Requires auto_generate_on_change flag to be enabled.

codi watch [options]
OptionDescription
--onceRun one generation cycle and exit

Operation Commands

codi update

Update flags and template-managed artifacts to latest versions. Always auto-regenerates after update.

codi update [options]
OptionDescription
--preset <preset>Reset all flags to a preset
--from <repo>Pull artifacts from a GitHub repo
--rulesRefresh template-managed rules
--skillsRefresh template-managed skills
--agentsRefresh template-managed agents
--mcp-serversRefresh template-managed MCP servers
--dry-runShow what would change without writing
--forceAccept all incoming changes without prompting (overwrites local edits)
--on-conflict <strategy>How to resolve local edits: keep-current (skip) or keep-incoming (overwrite). Defaults to interactive on a TTY.
codi update --rules --skills
codi update --preset strict --dry-run
codi update --from org/shared-config
codi update --skills --on-conflict keep-incoming   # accept upstream changes

codi clean

Remove generated agent config files. Without --all, preserves .codi/ and hooks.

codi clean [options]
OptionDescription
--allRemove everything including .codi/ and hooks (full uninstall)
--dry-runShow what would be deleted without deleting
--forceSkip confirmation

codi revert

Restore generated files from a previous backup. Backups are created automatically on each generate.

codi revert [options]
OptionDescription
--listShow available backups
--lastRestore the most recent backup
--backup <timestamp>Restore a specific backup by timestamp
codi revert --list
codi revert --last

codi skill <subcommand>

Manage skills: export, feedback, stats, evolve, versions.

SubcommandSynopsisDescription
export [name]codi skill export my-skillPackage for distribution
feedbackcodi skill feedback --skill my-skillList usage feedback
stats [name]codi skill statsShow skill health dashboard
evolve <name>codi skill evolve my-skillGenerate improvement prompt from feedback
versions <name>codi skill versions my-skillManage version history

Onboarding

codi onboard

Print an AI-guided onboarding guide to stdout. The guide contains three sections: a full artifact catalog, a built-in presets reference, and a step-by-step agent playbook.

The intended workflow: tell your coding agent to run codi onboard, and the agent reads the output, explores your codebase, recommends a preset and artifact selection, iterates with you until approved, then executes the full setup.

codi onboard

Community Commands

codi contribute

Interactive wizard to share artifacts via GitHub PR or ZIP export.

codi contribute [--repo <owner/repo>] [--branch <name>]
OptionDescription
--repo <owner/repo>Target GitHub repository
--branch <name>Target branch for the PR base

codi docs

Generate and validate documentation.

codi docs [options]
OptionDescription
--jsonOutput JSON skill catalog to stdout
--htmlGenerate HTML skill catalog site
--generateRegenerate code-driven doc sections
--validateCheck if docs are in sync with code
--output <path>Output file path

Global Options

Available on all commands.

OptionDescription
-j, --jsonOutput as JSON (for scripting)
-v, --verboseVerbose/debug output
-q, --quietSuppress non-essential output
--no-colorDisable colored output

Exit Codes

CodeMeaning
0Command completed successfully
1General error or validation failure
2Configuration schema validation failed
3No .codi/ directory found
5Agent config generation failed
7Generated files drifted from source
9Health check or CI validation failed
12Agent verification token mismatch
13Preset operation failed