OhMyCode is a minimal Claude Code–style clone in roughly 3,000 lines of Python. It supports a REPL, streaming output, tool execution, a permissions pipeline, context compression, a memory system, and skills.
- Architecture and module relationships → read
agent_docs/ARCHITECTURE.md - Core interfaces → read
agent_docs/KEY-MODULES.md - Gotchas → read
agent_docs/GOTCHAS.md - Development conventions → read
docs/DEVELOPMENT_GUIDE.md - Design docs → read project design docs committed in this repository
- Project architecture and module docs under
agent_docs/ - Development workflow and conventions in
docs/DEVELOPMENT_GUIDE.md
Python 3.9+, asyncio, openai SDK, anthropic SDK, rich, prompt_toolkit, tiktoken, httpx, pydantic
./scripts/setup-cli.sh # install + register CLI
ohmycode # start REPL
ohmycode -p "hello" # single-shot prompt
python3 -m pytest tests/ -v # run tests (currently 72)CLI policy: always run via ohmycode command.
Persistent, project-level knowledge lives under agent_docs/ for all tasks:
ARCHITECTURE.md— overall architecture, modules, data flowKEY-MODULES.md— responsibilities and interfaces of core modulesGOTCHAS.md— pitfalls, counterintuitive design, common mistakes
After changing core project logic, update the relevant docs in agent_docs/.
The project ships seven built-in skills to guide AI agents extending OhMyCode:
add-tool— add a custom tooladd-provider— integrate a new LLM provideradd-feature— add any new feature (points todocs/DEVELOPMENT_GUIDE.md)customize-system-prompt— customize AI behaviorcustomize-response-style— customize terminal output stylecommit-conventions— commit message conventionsdebug-ohmycode— troubleshoot issues
- Keep files < 500 lines and functions < 50 lines
- TDD: write tests → see them fail → implement → see them pass
- Commits: Conventional Commits, e.g.
feat(tools): add xxx - New tools/providers are auto-discovered via registries; no edits elsewhere required
- Details:
docs/DEVELOPMENT_GUIDE.md
Each development task uses a numbered folder under dev/:
dev/
└── NNN-task-name/
├── plan.md # goals, approach, status
├── context.md # background and progress
└── tasks.md # checklist
When resuming work, read plan.md, context.md, and tasks.md before coding.