ACP CLI Documentation

Reference + How-To

Document Type: Reference + How-To
Status: OUTLINE — Content to be added
Last Updated: December 2025


Overview

The ACP CLI is the primary tool for working with the AI Context Protocol. It provides commands for initialization, indexing, querying, and integration with AI coding assistants.


Installation

TODO: Expand each section with detailed instructions

npm

npm install -g @acp-protocol/cli

Homebrew

brew install acp-protocol/tap/acp

Cargo

cargo install acp-cli

Binary Downloads

  • Add download links for each platform
  • Add verification instructions (checksums)
  • Add shell completion setup

Commands Reference

acp init

Initialize ACP in a project.

Synopsis:

acp init [options]

Options:

FlagDescriptionDefault
--forceOverwrite existing configfalse
--template <name>Use a preset templatedefault
--no-gitignoreDon't update .gitignorefalse

TODO: Add examples, common use cases, error handling


acp index

Generate or update the cache file.

Synopsis:

acp index [options] [path]

Options:

FlagDescriptionDefault
--forceRegenerate from scratchfalse
--watchWatch for changesfalse
--output <path>Custom output path.acp/acp.cache.json
--statsShow detailed statisticsfalse

TODO: Add performance considerations, incremental indexing, large codebase handling


acp query

Query the cache using jq expressions.

Synopsis:

acp query <expression> [options]

Options:

FlagDescriptionDefault
--rawRaw output (no formatting)false
--cache <path>Custom cache path.acp/acp.cache.json

TODO: Add common query patterns, examples, jq cheatsheet


acp constraints

Check constraints for a file or symbol.

Synopsis:

acp constraints <target> [options]

Options:

FlagDescriptionDefault
--jsonJSON outputfalse
--verboseInclude inheritance chainfalse

TODO: Add output examples, integration with CI/CD


acp sync

Synchronize ACP context to AI tool files.

Synopsis:

acp sync [options]

Options:

FlagDescriptionDefault
--tools <list>Specific toolsAuto-detect
--dry-runPreview without writingfalse
--budget <tokens>Token budget500

TODO: Add tool-specific configurations, custom templates


acp primer

Generate primer content for AI assistants.

Synopsis:

acp primer [options]

Options:

FlagDescriptionDefault
--budget <tokens>Token budget500
--preset <name>Preset (safe, balanced, detailed)balanced
--previewShow selection matrixfalse
--compare <budgets>Compare multiple budgets-

TODO: Add primer customization, weight tuning


acp validate

Validate ACP files and annotations.

Synopsis:

acp validate [options] [files...]

Options:

FlagDescriptionDefault
--strictStrict mode (fail on warnings)false
--fixAuto-fix issuesfalse

TODO: Add validation rules, common errors


acp start

Start the ACP proxy server for AI tool integration.

Synopsis:

acp start [options]

Options:

FlagDescriptionDefault
--port <port>Proxy portauto
--daemonRun in backgroundfalse

TODO: Add proxy architecture, tool configuration


Configuration

TODO: Expand with full .acp.config.json reference

Minimal Configuration

{
  "version": "1.0.0"
}

Full Configuration Template

{
  "version": "1.0.0",
  "include": [],
  "exclude": [],
  "error_handling": {},
  "constraints": {},
  "domains": {},
  "limits": {}
}

Environment Variables

VariableDescriptionDefault
ACP_CONFIGCustom config path.acp.config.json
ACP_CACHECustom cache path.acp/acp.cache.json
ACP_LOG_LEVELLog verbosityinfo
ACP_NO_COLORDisable color outputfalse

Exit Codes

CodeMeaning
0Success
1General error
2Configuration error
3Validation error
4File not found

Sections to Add

  • Troubleshooting: Common issues and solutions
  • Performance: Optimizing for large codebases
  • CI/CD Integration: GitHub Actions, GitLab CI examples
  • Shell Completion: Bash, Zsh, Fish, PowerShell
  • Logging: Debug logging, log file locations
  • Upgrade Guide: Migrating between versions

This document is an outline. Contribute content →