Open-source CLI for Claude Code: capture sessions, ship transcripts to your memory pipeline, and synthesize Claude-ready prompts.
contextify is the capture half of Contextify — a closed-loop prompt factory and project memory for Claude Code. It hooks into Anthropic Claude Code sessions on your machine, ships transcripts to your memory pipeline, and turns drafts into Claude-ready prompts grounded in everything your project has already learned.
The CLI is MIT-licensed and contribution-friendly. The backend (web app, worker, prompt synthesizer) is closed-source.
- Claude Code transcript capture — every
SessionStart,Stop, andSessionEndevent is shadowed and streamed without disrupting your flow. - Project memory grounding — turn a one-line draft into a multi-section, memory-augmented Claude Code prompt with
contextify prompt. - Zero per-project config —
project_idis derived from each session'scwdat fire-time. Install once, capture everywhere. - Bring your own server — point
CONTEXTIFY_SERVER_URLathttps://contextify.liveor self-host the backend.
pnpm add -g @furkankoykiran/contextify-cli
# or
npm i -g @furkankoykiran/contextify-cli- Create an API key at https://contextify.live/dashboard/keys.
- Export the key and the server URL:
export CONTEXTIFY_API_KEY="ctx_live_..." export CONTEXTIFY_SERVER_URL="https://contextify.live"
- Install the Claude Code hooks (once per machine):
contextify install
That's it — every Claude Code session is now captured. Inspect captures and synthesized memories at https://contextify.live/dashboard.
| Command | What it does |
|---|---|
contextify install [--key <ctx_live_...>] [--server <url>] [--dry-run] |
Wires SessionStart / Stop / SessionEnd into ~/.claude/settings.json. Run once per machine. |
contextify init [projectId] [--name <name>] [--server <url>] |
Pin a project id by writing .contextify.json in the current directory. |
contextify wrap -- <cmd> [args...] |
Run any command, mirror its output, and ship the capture in batches. |
contextify login --key <ctx_live_...> |
Persist a key to ~/.contextify/credentials.json (chmod 600). |
contextify ship --once |
Flush locally-spooled batches left over from offline runs. |
contextify prompt <draft|-> [--top-k N] [--show-memories] [--json] |
Build an XML prompt augmented with project memories. Pass - to read from stdin. |
contextify hooks <session-start|stop|session-end> |
Internal — invoked by Claude Code hook scripts. |
contextify --version |
Print the CLI version. |
| Variable | Purpose |
|---|---|
CONTEXTIFY_API_KEY |
Bearer key used to authenticate every request. Wins over ~/.contextify/credentials.json. |
CONTEXTIFY_SERVER_URL |
Target server. Defaults to https://contextify.live. |
CONTEXTIFY_PROJECT_ID |
Override the auto-derived project id. |
CONTEXTIFY_STATE_DIR |
Override the ~/.contextify state directory. |
CLAUDE_SETTINGS_PATH |
Override the ~/.claude/settings.json path (useful for tests). |
Project id resolution stack, first match wins:
CONTEXTIFY_PROJECT_ID(env).contextify.jsonin the current dir or an ancestor (projectIdfield)- Git remote URL of the enclosing repo
realpathof the current directory
git clone https://github.com/furkankoykiran/contextify-cli.git
cd contextify-cli
pnpm install
pnpm build
pnpm testSee CONTRIBUTING.md for the full workflow.
- Contextify — the hosted prompt factory + project memory.
- Anthropic Claude Code — the official CLI this tool hooks into.
MIT © Furkan Köykıran