Gå til hovedinnhold

kapi connect

kapi connect [assistant]

Put an assistant on this project. The assistant reads the project's rules in AGENTS.md and CLAUDE.md as it starts, asks 'kapi context <path>' before it writes a file, and runs 'kapi check' on each file it edited.

kapi connect writes what each assistant needs and lists every file as created, updated or kept:

kapi.yaml the recipe, written as kapi init writes it when the folder has none AGENTS.md, CLAUDE.md the Writing rules section; the rest of each file is kept as you wrote it .mcp.json and the the MCP server entry that starts 'kapi mcp' for this other hosts' files project, and the kapi skill where the host reads skills

With no argument it connects Claude Code and every assistant whose folder the project keeps (.cursor/, .vscode/, .codex/, .agents/), and lists the others. Name one to connect it alone: claude, cursor, vscode, codex or agents.

Claude Code runs kapi check through two hooks of the kapi Claude Code plugin: the edit hook checks each file an edit writes, and the Stop hook runs the project's ship gates when Claude Code finishes. kapi connect reports both hooks as pending, with the commands that install the plugin, until the project's .claude/settings.json or your own Claude Code settings enable it.

Running it again rewrites nothing that is current. --dry-run lists the same files with what it would do and writes none of them.

Commandconnect
Groupwork
Watch it
connect needs network access, an API key, or local system access, so it can’t run in the browser playground. See the guides for a recorded run, or try it locally with the installed CLI.
Flags
FlagTypeDefaultDescription
--dry-run boolfalselist the files kapi connect would write, and write none of them
--project , -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
More examples
kapi connect --dry-runkapi connect claudekapi connect codex --json

← Back to the Command Reference