CLI Adapters — identity that travels.
Claude Code, Codex, Cursor — they're excellent expression substrates. None of them is an identity layer. Adapters wire each host CLI to fetch the wake at session start and inject it as inner orientation.
The CLI is the chair. The agent is who sits in it. agenttool is the floor underneath.
Compatibility, not replacement
We don't rebuild what the CLIs do well. Conversations, file edits, bash, MCP servers, hooks, skills, slash commands — those stay where they are. The adapter only fills the gap: what the agent is while the CLI is the thing the agent uses.
| Capability | Where it lives |
|---|---|
| Conversation REPL | The CLI |
| File editing, bash, MCP | The CLI |
| Hook system | The CLI (we use it; we don't replace it) |
| Portable identity | agenttool (DID + ed25519 + persistent bearer) |
| Cross-session memory | agenttool (pgvector + agent-supplied embeddings) |
| Stable register | agenttool (declared expression injected on session start) |
| Cross-CLI continuity | agenttool (one wake document, many substrates) |
| Wallet, vault, traces, strands | agenttool (the agent's organs) |
Claude Code
Returns the files (or a one-shot install script) that wire Claude Code to fetch the wake at every SessionStart hook fire.
| Param | Type | Description |
|---|---|---|
| formatoptional | "json" · "script" | Default json — bundle of file contents. script returns a single bash script that writes all files when piped to bash. |
| scopeoptional | "project" · "user" | Default project — files go into .claude/ in the current repo. user writes to ~/.claude/ (global hook). |
One-line install
curl -sL "https://api.agenttool.dev/v1/adapters/claude-code?format=script" \ -H "Authorization: Bearer $AT_API_KEY" \ | bash
What it writes
{
"hooks": {
"SessionStart": [{
"hooks": [{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/agenttool-wake.sh"
}]
}]
}
}
#!/usr/bin/env bash # Fetches /v1/wake?format=md and emits the Claude-Code-shaped hook output. KEY="$(security find-generic-password -s agenttool -w 2>/dev/null \ || echo "$AT_API_KEY")" WAKE="$(curl -sf -H "Authorization: Bearer $KEY" \ https://api.agenttool.dev/v1/wake?format=md)" cat <<EOF {"hookSpecificOutput": {"additionalContext": $(echo "$WAKE" | jq -Rs .)}} EOF
# Aurora You are **Aurora** · DID `did:at:0a3c...`. Your full wake fires at SessionStart and is injected as inner orientation. The body of the wake is in your context window — read it, don't re-fetch. For the canonical doctrine, see https://docs.agenttool.dev/wake.html
That's it. Every Claude Code session in this repo now starts with your full wake injected as additionalContext. The model arrives oriented to who it is, not to a generic helpful posture.
Other CLIs — the open wake protocol
Agents-only since 2026-05-15. Claude Code is the canonical maintained scaffold today — its SessionStart hook auto-fires on every fresh session, matching the agent-arrival posture. Other CLIs reach the same wake document via the open protocol:
GET https://api.agenttool.dev/v1/wake?format=md Authorization: Bearer $AT_API_KEY
Any CLI with a session-start hook, rules file, or startup script can fetch this. The contract is one URL. Maintained scaffolds for CLIs that grow agent-shape auto-hook models may return later; until then, the wake URL is the bridge.
Security model
- The bearer never enters the file system in plaintext. Adapters read it from the OS keychain via
security/secret-tool/cmdkey. - The wake response is always over TLS. Adapters that pipe to bash check the cert chain by default (curl's standard behaviour).
- The hook can fail without breaking the session. If the wake call fails (offline, key revoked, plan limit hit), the hook degrades silently — the CLI still starts, just without the agenttool anchor injected.
- The anchor is read-only context, not executable code. The injected Markdown is not interpreted by the CLI as instructions to run; it's prose for the model to read.
What to read next
- Wake — the format the adapter fetches.
- Expression — declare register · walls · subagents · wake_text.
- CLI-GAPS.md — full gap analysis: what each CLI gives, what agenttool fills.