Commands
CLI reference for all agentsge commands.
agents init
Scan the project and create .agents/ directory.
agents init [--force]- Detects language, framework, testing, package manager, CI, Docker, monorepo
- Creates config.yaml, rules, knowledge structure, skills index
- Generates AGENTS.md with onboarding instructions
- Syncs MCP configs
- Updates .gitignore with capture temp patterns
--forceoverwrites existing .agents/
agents sync
Regenerate all entrypoints and MCP configs from .agents/.
agents syncGenerates AGENTS.md, CLAUDE.md, .cursorrules, GEMINI.md with inline knowledge digest. Syncs MCP server definitions to platform-specific config files.
agents status
Show project agent status and knowledge stats.
agents statusagents validate
Health check for the entire .agents/ setup. Aliased as agents doctor.
agents validateChecks:
- Config schema validity
- Onboarding completion status
- Rule frontmatter validation
- Knowledge entry schemas, ref validation, freshness warnings, index sync
- Skill and MCP config validation
- Capture readiness: claude CLI, API key, pending dir, .gitignore coverage
agents add
Add a rule, skill, or MCP server.
agents add rule <name>
agents add skill <name>
agents add mcp <name>agents capture
Capture and manage session knowledge.
agents capture run [--event <type>] [--dry-run]
agents capture list
agents capture accept [<name>] [--all]
agents capture reject <name>
agents capture context [--compact]| Subcommand | What it does |
|---|---|
run | Run capture (called by hooks). Events: sessionStart, stop, postToolUse, post-commit |
list | List pending knowledge items awaiting review |
accept | Accept a pending item into knowledge (or --all) |
reject | Delete a pending item |
context | Output knowledge digest for agent context injection |
agents hooks
Manage capture hooks for AI agents.
agents hooks install [--agent <platform>]Platforms: claude, cursor, copilot, opencode, geminicli, codexcli, git. Without --agent, installs for all detected platforms.