Skip to main content

Frictionless, one-command capture of AI coding-CLI sessions (Claude Code + Aider) as readable Markdown notes. Library-first.

Project description

alkham

PyPI CI Python License: MIT

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. alkham does 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 — see docs/ARCHITECTURE.md §10.)

Why alkham

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.

Quickstart

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.

Works with or without Obsidian

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.

Use it as a library

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 breadcrumbs

get_parser_for auto-detects the source and raises UnknownSourceError on an unrecognized file. The Session dataclass is a stability commitment.

CLI surface

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)

Documentation

  • docs/PRODUCT_SPEC.md — what it does, for whom, how it feels to use
  • docs/ARCHITECTURE.md — how it's built (the technical source of truth)
  • docs/ROADMAP.md — the phased build plan
  • CONTRIBUTING.md — incl. how to add a parser for a new tool

License

MIT © Ali Alkhamees

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alkham-0.1.0.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alkham-0.1.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file alkham-0.1.0.tar.gz.

File metadata

  • Download URL: alkham-0.1.0.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for alkham-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8495147c6062000983ff8e567e408af736754855bad870eb5d10903050606fba
MD5 fd08ee01cf7614d5461f271fcedee1e6
BLAKE2b-256 e7b807b44375d790208c228bc7fc3075adf11e99a58754d1fdfcdae4a1c1f0c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkham-0.1.0.tar.gz:

Publisher: publish.yml on AliAA1444/alkham

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alkham-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: alkham-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for alkham-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5de772774a80ebdb4bb351bb8c72fdcf68c96050edb1672323be938c45bdef2
MD5 577242252d7204b4140c03a040cdf516
BLAKE2b-256 cf75fcc6b299416eedcadaf53584dc050c118692c6c2d0a6d68d86bc0b8d129d

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkham-0.1.0-py3-none-any.whl:

Publisher: publish.yml on AliAA1444/alkham

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page