CLI Commands
oak init
Section titled “oak init”Initialize Open Agent Kit in the current project. Creates the .oak directory structure with configuration, agent command directories, and team intelligence data.
Options:
| Flag | Description |
|---|---|
--agent, -a | Choose AI agent(s) — can be specified multiple times (claude, vscode-copilot, codex, cursor, gemini, windsurf) |
--force, -f | Force re-initialization |
--no-interactive | Skip interactive prompts and use defaults |
Language selection happens interactively during oak init when you choose which AST parsers to install.
Examples:
# Interactive mode with multi-select checkboxesoak init
# With specific agentoak init --agent claude
# Multiple agentsoak init --agent claude --agent vscode-copilot
# Add agents to existing installationoak init --agent cursoroak upgrade
Section titled “oak upgrade”Upgrade Open Agent Kit templates and agent commands to the latest versions.
What gets upgraded:
- Agent commands: Updates command templates with latest features
- Feature templates: Replaced with latest versions
- Agent settings: Smart merge with existing settings (your custom settings are preserved)
- Database migrations: Applied automatically (schema changes, cleanup tasks)
Options:
| Flag | Description |
|---|---|
--commands, -c | Upgrade only agent command templates |
--templates, -t | Upgrade only RFC templates |
--dry-run, -d | Preview changes without applying them |
--force, -f | Skip confirmation prompts |
Examples:
oak upgrade --dry-run # Preview changesoak upgrade # Upgrade everythingoak upgrade --commands # Upgrade only commandsAI Agent Skills
Section titled “AI Agent Skills”Skills provide specialized capabilities to your AI agent:
- oak — Semantic search, impact analysis, memory, and database queries against the team intelligence database
- project-governance — Create and maintain project constitutions, agent instruction files, and RFC/ADR documents
- context-engineering — Prompt and context engineering guidance using the four strategies (Write, Select, Compress, Isolate)
- swarm — Cross-project search for collective knowledge, patterns, and decisions across swarm-connected projects
oak skill list # List available skillsoak skill install <n> # Install a skilloak skill remove <n> # Remove a skilloak skill refresh # Refresh all installed skillsRules Management
Section titled “Rules Management”Manage project constitutions and agent instruction files:
oak rules analyze # Analyze project for constitution creationoak rules analyze --json # Output JSON for agent parsingoak rules sync-agents # Sync agent instruction files with constitutionoak rules sync-agents --dry-run # Preview changesoak rules detect-existing # Detect existing agent instruction filesoak rules analyze
Section titled “oak rules analyze”Performs comprehensive project analysis to determine if the project is greenfield, brownfield-minimal, or brownfield-mature. Useful for understanding the project context before creating a constitution.
Options:
| Flag | Description |
|---|---|
--json | Output JSON for agent parsing |
oak rules sync-agents
Section titled “oak rules sync-agents”Ensures all configured agents have instruction files that reference the project constitution. Creates files for agents that don’t have one, appends references to existing files.
Options:
| Flag | Description |
|---|---|
--json | Output JSON for agent parsing |
--dry-run | Show what would be done without making changes |
oak rules detect-existing
Section titled “oak rules detect-existing”Checks for existing agent instruction files (.github/copilot-instructions.md, CLAUDE.md, AGENTS.md, etc.) and reports what exists.
Options:
| Flag | Description |
|---|---|
--json | Output JSON for agent parsing |
Language Parsers
Section titled “Language Parsers”Add language support for better code understanding:
oak languages list # List parsers and statusoak languages add python javascript # Add parsersoak languages add --all # Install all 13 languagesoak languages remove ruby php # Remove parsersSupported languages: Python, JavaScript, TypeScript, Java, C#, Go, Rust, C, C++, Ruby, PHP, Kotlin, Scala
Team (Daemon Lifecycle)
Section titled “Team (Daemon Lifecycle)”These commands manage the daemon lifecycle. Once the daemon is running, use the Dashboard for configuration, search, and memory management.
oak team start # Start the daemonoak team start -o # Start and open dashboard in browseroak team stop # Stop the daemonoak team restart # Restart the daemonoak team status # Show daemon status and index statisticsoak team reset # Clear all indexed dataoak team logs -f # Follow daemon logsTeam Relay
Section titled “Team Relay”oak team cloud-init # Deploy relay Worker and connect (turnkey)oak team cloud-init --force # Re-scaffold and re-deploy with latest templateoak team cloud-connect [url] # Connect to a specific Worker URLoak team cloud-disconnect # Disconnect from the relayoak team cloud-status # Show relay connection stateoak team cloud-url # Print Worker URL (for scripting)Team Members
Section titled “Team Members”oak team members status # Show team sync statusoak team members list # List online team membersMCP Server
Section titled “MCP Server”oak team mcp # Start the MCP server (used by agents)CI (Index & Data)
Section titled “CI (Index & Data)”These commands manage the codebase index, search, and data operations.
oak ci sync # Sync daemon after OAK upgrade (re-indexes if needed)oak ci port # Show the daemon's port numberoak ci backup # Create a backupoak ci restore # Restore from backupoak ci index # Rebuild the codebase indexoak ci config # Manage CI configurationoak ci search QUERY # CLI semantic searchoak ci memories # Query stored memoriesoak ci sessions # Query session historyAgent Client Protocol (ACP)
Section titled “Agent Client Protocol (ACP)”OAK can act as a coding agent in ACP-compatible editors like Zed. See the ACP documentation for full details.
oak acp serve # Start the ACP agent server (stdio transport for editors)The ACP server requires the daemon to be running (oak team start). It communicates with the daemon over HTTP and translates between the ACP JSON-RPC protocol and the daemon’s REST API.
Swarm enables cross-project federation — connecting multiple OAK projects into a unified search and agent network via a Cloudflare Worker.
oak swarm create -n NAME # Create a new swarm configurationoak swarm deploy -n NAME # Deploy the swarm Worker to Cloudflareoak swarm destroy -n NAME # Remove the swarm Workeroak swarm start -n NAME # Start the swarm daemonoak swarm stop -n NAME # Stop the swarm daemonoak swarm restart -n NAME # Restart the swarm daemonoak swarm status -n NAME # Show swarm status and connected nodesoak swarm mcp # Start the swarm MCP serverProject Removal
Section titled “Project Removal”oak remove # Remove OAK configuration and files from the projectThis removes:
.oak/directory (including the daemon port file and all CI data)- Agent command files and settings (
.claude/commands/,.cursor/commands/, etc.) - Agent task YAML files in
oak/agents/that were created by OAK - OAK-managed hooks, MCP registrations, and skills
It does not remove user content in oak/ (RFCs, constitution, insights, etc.) or the CLI tool itself.