Skip to content

CLI Commands

CLI

Initialize .archcore/ in the current directory.

Terminal window
archcore init

What it does:

  1. Creates .archcore/ directory with settings.json
  2. Auto-detects installed coding agents
  3. Installs MCP server config for detected agents
  4. Installs session hooks for supported agents

If no agents are detected, falls back to Claude Code configuration. See archcore init for the deep dive.


Check .archcore/ structure and document health.

Terminal window
archcore status

Checks performed:

  • Directory structure exists
  • File naming follows <slug>.<type>.md pattern
  • Slugs are lowercase alphanumeric with hyphens only
  • Document types are valid (one of the 18 types)
  • YAML frontmatter has required title and status fields
  • Frontmatter is valid YAML
  • Sync manifest JSON structure
  • Orphaned relations (documents referenced but not on disk)

When orphaned relations are found, status hints: “Run ‘archcore doctor —fix’ to remove orphaned relations”


Comprehensive health check with optional fix.

Terminal window
archcore doctor [--fix]

Runs all validation checks plus:

  • Verifies settings.json exists and is valid
  • Checks server reachability (if server URL is configured)
  • Reports tag hygiene issues (invalid format, singleton tags that may be typos)

Returns a non-zero exit code if any issues are found.

Flags:

FlagDescription
--fixRemove orphaned relations from the manifest before running checks

Manage configuration.

Terminal window
archcore config # Show current sync type
archcore config get <key> # Read a config value
archcore config set <key> <value> # Set a config value

Available keys:

KeyValuesDescription
syncnone, cloud, on-premSync type (currently locked)
project_idintegerProject ID for sync (currently locked)
archcore_urlURLServer URL for on-prem (currently locked)
languagelanguage codeLanguage for document content (e.g., en, ru)

Examples:

Terminal window
archcore config set language ru
archcore config get language

Run the MCP server or install MCP config.

Terminal window
archcore mcp # Start stdio MCP server
archcore mcp install # Install MCP config for all detected agents
archcore mcp install --agent <id> # Install for a specific agent

The archcore mcp command starts a stdio MCP server that coding agents connect to. It’s not meant to be run manually — agents launch it as a subprocess.

Agent IDs: claude-code, cursor, copilot, gemini-cli, opencode, codex-cli, roo-code, cline

See MCP server for details.


Manage agent hooks.

Terminal window
archcore hooks install # Install hooks for all detected agents
archcore hooks install --agent <id> # Install for a specific agent

Agent hook commands (called by agents, not manually):

Terminal window
archcore hooks claude-code session-start
archcore hooks cursor <event>
archcore hooks gemini-cli <event>
archcore hooks copilot <event>

See hooks for details.


Validate every document in .archcore/ against the schema (frontmatter, slug, type, tags). Used by hooks after each mutation.

Terminal window
archcore validate

Returns non-zero on any validation failure.


Check for and install the latest version.

Terminal window
archcore update

Queries GitHub releases, compares versions, downloads the binary for your OS/architecture, verifies the checksum, and updates in place.


Display the current version.

Terminal window
archcore --version

Show help with all available commands.

Terminal window
archcore --help