Frictionless, one-command capture of your AI coding-CLI sessions — Claude Code and Aider — as readable Markdown notes. Library-first; Obsidian by default, but works with any Markdown folder.
⚠️ Security — transcripts are captured verbatim.alkhamdoes not redact. Never capture sessions containing live API keys, tokens, or other secrets: they will be written into your notes as-is. (Path-traversal and Markdown/YAML-injection from hostile log content are sanitized so a transcript can't corrupt your vault — seedocs/ARCHITECTURE.md§10.)
Your best architectural reasoning, hard-won debugging insights, and the
why behind decisions are trapped in raw JSONL/history files you never read
again (and Claude Code deletes after ~30 days). alkham turns those
disposable terminal logs into clean, chronological, human-legible notes
you'll actually return to — and it's the only tool capturing Claude Code
and Aider through one pluggable engine.
pip install alkham
alkham init # pick an output folder + flavor, toggle features
alkham sync # capture your most recent Claude Code or Aider session✓ Captured 2026-05-14_add-jwt-refresh_a1b2c3.md crowdflow
Capture is a single alkham sync today; automatic capture (alkham watch)
arrives post-launch.
The obsidian flavor emits wikilinks, tags, and a zero-orphan Map-of-Content.
The plain flavor emits portable Markdown that opens cleanly in VS Code,
Logseq, Notion, or any folder. Every behavior — routing, Auto-MOC, tagging,
frontmatter — is independently toggleable, so alkham fits an existing
knowledge base instead of overwriting it.
from alkham.parsers import get_parser_for
session = get_parser_for("chat_log.jsonl").parse()
print(session.messages) # -> list[Message]
print(session.files_modified) # tool-use breadcrumbsget_parser_for auto-detects the source and raises UnknownSourceError on an
unrecognized file. The Session dataclass is a stability commitment.
| Command | Purpose |
|---|---|
alkham init |
First-run wizard (output dir, flavor, toggles) |
alkham sync [-t FILE] [-n] |
Capture the latest (or a specific) session; -n dry-runs |
alkham backfill [--since DATE] [--project NAME] |
Batch-capture history |
alkham config [--edit] |
Show (or edit) the config |
alkham moc --project NAME |
Rebuild a project's MOC |
alkham install-close-command |
Install the /close prompt (Claude Code) |
docs/PRODUCT_SPEC.md— what it does, for whom, how it feels to usedocs/ARCHITECTURE.md— how it's built (the technical source of truth)docs/ROADMAP.md— the phased build planCONTRIBUTING.md— incl. how to add a parser for a new tool
MIT © Ali Alkhamees