codi-cli / adapters
adapters
Variables
ALL_ADAPTERS
const ALL_ADAPTERS: AgentAdapter[];
Defined in: adapters/index.ts:31
The canonical registry of all supported agent adapters.
This array is the single source of truth for which agents Codi supports.
Order determines auto-detection priority: earlier entries are checked first
when codi generate scans the project for active agents.
Example
import { ALL_ADAPTERS } from 'codi-cli';
const ids = ALL_ADAPTERS.map(a => a.id);
// ["claude-code", "cursor", "codex", "windsurf", "cline", "copilot"]
claudeCodeAdapter
const claudeCodeAdapter: AgentAdapter;
Defined in: adapters/claude-code.ts:75
Adapter for Claude Code — Anthropic’s official CLI for Claude.
Detects presence of CLAUDE.md or a .claude/ directory.
Generates CLAUDE.md (primary instruction file), .claude/rules/, .claude/skills/,
.claude/agents/, and .mcp.json (MCP server config).
clineAdapter
const clineAdapter: AgentAdapter;
Defined in: adapters/cline.ts:42
Adapter for Cline — VS Code AI coding extension.
Detects presence of .clinerules file or .cline/ directory.
Generates .clinerules (primary instruction file) and .cline/skills/.
Does not support MCP server configuration.
codexAdapter
const codexAdapter: AgentAdapter;
Defined in: adapters/codex.ts:62
Adapter for Codex — OpenAI’s coding agent.
Detects presence of AGENTS.md or a .agents/ directory.
Generates AGENTS.md (primary instruction file) and .codex/agents/.
copilotAdapter
const copilotAdapter: AgentAdapter;
Defined in: adapters/copilot.ts:238
Adapter for GitHub Copilot — CLI and VS Code/JetBrains Chat.
Detects presence of .github/copilot-instructions.md, .github/prompts/, .github/agents/, or .github/skills/.
Generates:
.github/copilot-instructions.md(repo-wide instructions).github/instructions/{name}.instructions.md(path-specific scoped rules).github/prompts/{name}.prompt.md(VS Code Prompt Files — Copilot Chat / IDE).github/skills/{name}/SKILL.md+ supporting dirs (Agent Skills — Copilot Coding Agent / CLI).github/agents/{name}.agent.md(custom agents).vscode/mcp.json(MCP server configuration).github/hooks/codi-hooks.json(Copilot hooks)
cursorAdapter
const cursorAdapter: AgentAdapter;
Defined in: adapters/cursor.ts:60
Adapter for Cursor — AI-powered code editor.
Detects presence of .cursor/ directory or .cursorrules file.
Generates .cursorrules (primary instruction file), .cursor/rules/*.mdc,
and .cursor/mcp.json (MCP server config).
windsurfAdapter
const windsurfAdapter: AgentAdapter;
Defined in: adapters/windsurf.ts:42
Adapter for Windsurf — Codeium’s AI editor.
Detects presence of .windsurfrules file.
Generates .windsurfrules (primary instruction file) and .windsurf/skills/.
Does not support MCP server configuration.
Functions
registerAllAdapters()
function registerAllAdapters(): void;
Defined in: adapters/index.ts:53
Registers all built-in adapters into the global adapter registry.
Must be called once before any generator operations. The CLI calls this
automatically during startup. Library consumers must call it explicitly
before using resolveConfig() or generate().
Returns
void
Example
import { registerAllAdapters } from 'codi-cli';
registerAllAdapters();