Skip to main content

Repo-native memory and context compiler for coding agents.

Project description

oh-no-my-claudecode (onmc)

CI PyPI version Python 3.11+ License: MIT AI-Ready

Repo-native memory for AI coding agents.
Your agent knows your codebase history, not just its current state.


Get started

pip install oh-no-my-claudecode
onmc setup

That's it. onmc setup reads your git history, extracts architectural decisions and invariants, generates CLAUDE.md, and connects to Claude Code — all in one interactive wizard.


What it does

Your coding agent starts every session like it has never seen your codebase before. It doesn't know why the code looks the way it does, what was tried and failed, or which files are dangerous to change. ONMC fixes that.

It reads your git history, docs, and code structure with an LLM and builds a structured memory store. That memory travels with the repo. Every agent — Claude Code, Cursor, Codex — gets it.


Works with every coding agent

Agent Integration
Claude Code onmc hooks install + onmc serve --mcp
Cursor Pipe onmc brief output to .cursorrules
Codex CLI Pass onmc brief output via AGENTS.md
Cloud agents (Codex, GitHub Coding Agent) onmc sync --restore in container startup
Gitpod / Codespaces Add onmc sync --restore to .gitpod.yml

Commands

Setup and health

onmc setup              # full onboarding wizard — run this first
onmc doctor             # health check: memory freshness, hooks, MCP, CLAUDE.md
onmc status             # repo root, ingest state, memory counts

Memory extraction

onmc ingest             # scan git history, docs, source — extract structured memory
onmc ingest --files x   # re-ingest specific files
onmc ingest --install-hook  # auto-ingest on every commit
onmc mine               # extract memory from Claude Code session transcripts
onmc mine --github      # extract decisions and gotchas from GitHub PRs

Memory management

onmc memory list                    # browse all memory
onmc memory list --kind hotspot     # filter by kind
onmc memory list --type did_not_work
onmc memory show <id>               # full record with provenance
onmc memory confirm <id>            # mark as verified useful
onmc memory reject <id>             # mark as wrong or stale
onmc memory edit <id>               # update the summary
onmc memory add <task_id> --type fix --title "..." --summary "..."

CLAUDE.md

onmc claude-md generate  # generate CLAUDE.md from memory store
onmc claude-md update    # refresh stale sections, preserve user-written ones
onmc claude-md preview   # show what would be generated without writing
onmc claude-md --watch   # auto-regenerate when memory changes

Tasks and attempts

onmc task start --title "..." --description "..."
onmc task list / show / status / end
onmc attempt add <task_id> --summary "..." --kind fix_attempt --status tried
onmc attempt list / show / update

Brief compilation

onmc brief --task "fix the cache invalidation bug"
# LLM-ranked, annotated with relevance reasons
# Written to .onmc/compiled/ and rendered in terminal

Agent modes (optional LLM)

onmc solve --task "..." --task-id <id>     # next best engineering approach
onmc review --task "..." --input-file plan.md
onmc teach --task "..."                     # staff-engineer explanation
onmc teach --task "..." --interactive       # follow-up Q&A loop

Claude Code integration

onmc hooks install      # compaction hooks — context survives every compact
onmc hooks status
onmc serve --mcp        # read-only MCP server for mid-session memory queries

Git-portable memory

onmc sync --commit      # export memory to .agent-memory/ (commit this)
onmc sync --restore     # restore memory on a fresh machine or cloud env
onmc sync --install-hook

LLM provider

onmc llm configure --provider anthropic --model claude-sonnet-4-5
onmc llm status

Python API

import onmc

repo = onmc.init(".")
repo.ingest()
brief = repo.brief(task="fix the cache invalidation bug")
memories = repo.memory.search(files=["src/cache.py"])
task = repo.task.start(title="Fix cache bug")
repo.sync.commit()

How memory travels with your repo

onmc sync --commit
git add .agent-memory/
git commit -m "chore: export agent memory"
git push

Any machine that clones this repo — cloud agent, new teammate, ephemeral container — runs:

onmc init && onmc sync --restore

And gets the full memory store instantly. No accounts. No cloud. No config.


Local state

.onmc/            ← gitignored (binary SQLite + logs)
.agent-memory/    ← commit this (readable JSON exports)
CLAUDE.md         ← commit this (generated by onmc claude-md generate)

Platform support

macOS and Linux. Windows support planned for v0.4.0.


Development

git clone https://github.com/adaline-ankit/oh-no-my-claudecode
cd oh-no-my-claudecode
pip install -e ".[dev]"
pytest
ruff check .
mypy src

Contributing

See CONTRIBUTING.md. Good first issues are labeled in the tracker.

Areas actively looking for contributors:

  • Cursor hook adapter
  • Embedding-based memory ranking (opt-in)
  • VS Code extension for brief display
  • Semantic transcript-to-task linking

License

MIT. See LICENSE.

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

oh_no_my_claudecode-0.3.0.tar.gz (130.7 kB view details)

Uploaded Source

Built Distribution

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

oh_no_my_claudecode-0.3.0-py3-none-any.whl (110.0 kB view details)

Uploaded Python 3

File details

Details for the file oh_no_my_claudecode-0.3.0.tar.gz.

File metadata

  • Download URL: oh_no_my_claudecode-0.3.0.tar.gz
  • Upload date:
  • Size: 130.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for oh_no_my_claudecode-0.3.0.tar.gz
Algorithm Hash digest
SHA256 437f817ac6fcdca8fd57bb9bd71691d94791a23f625757dfd93229de8660a888
MD5 8d4a818c8a1a293536d0b1b56a413142
BLAKE2b-256 d8c0aee8c78fd50ea74045fb97d678bd3c3eeb9962882956596be87aaf8df7ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for oh_no_my_claudecode-0.3.0.tar.gz:

Publisher: release.yml on adaline-ankit/oh-no-my-claudecode

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

File details

Details for the file oh_no_my_claudecode-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for oh_no_my_claudecode-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 740a3ec3278a1092d18842f4fa1fd823cb3be556463250a0f822bc80a832e7bd
MD5 d8b0bd330fb71cea4c91780ceed02c2d
BLAKE2b-256 a7c615dca5256d9465cafc591dcb3dd2ad15c63c101ab06c679442b826408c74

See more details on using hashes here.

Provenance

The following attestation bundles were made for oh_no_my_claudecode-0.3.0-py3-none-any.whl:

Publisher: release.yml on adaline-ankit/oh-no-my-claudecode

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