anatomia-cli
v0.1.0
Published
Auto-generated AI context for codebases
Maintainers
Readme
Anatomia CLI
Auto-generate AI context for your codebase
Anatomia creates .ana/ context folders that help AI understand your project's patterns, architecture, and conventions.
Install
npm install -g anatomia-cliOr try without installing:
npx anatomia-cli analyzeQuick Start
1. Initialize context:
cd your-project/
ana init2. Reference modes in your AI tool:
@.ana/modes/code.md "Implement user authentication"AI reads your patterns and writes code that matches your style.
Commands
ana init [options]
Initialize .ana/ folder with templates.
Options:
-y, --yes- Skip prompts, use defaults-f, --force- Overwrite existing .ana/
Creates 10 files:
.ana/
├── ENTRY.md # Project orientation
├── node.json # Project metadata
├── modes/
│ ├── architect.md # System design mode
│ ├── code.md # Implementation mode
│ ├── debug.md # Debugging mode
│ ├── docs.md # Documentation mode
│ └── test.md # Testing mode
└── context/
├── main.md # Project overview
├── patterns.md # Code patterns
└── conventions.md # Coding standardsFill context/*.md with your project details. Reference modes/*.md when working with AI.
ana analyze
Detect project type, framework, and structure.
Usage:
ana analyzeOutput:
{
"projectType": "python",
"framework": "fastapi",
"structure": {
"entryPoints": ["app/main.py"],
"architecture": "layered"
},
"parsed": {
"files": [...],
"totalParsed": 15
}
}What it detects:
- Project type (Python, Node, Go, Rust, Ruby, PHP)
- Framework (FastAPI, Next.js, Express, Django, and more)
- Entry points
- Architecture pattern
- Code structure (functions, classes, imports)
ana mode <name>
Display mode file path and information.
ana mode code
# Output: .ana/modes/code.md - Implementation modeana --version
Show CLI version.
ana --help
Show all commands.
Mode System
Each mode has a specific purpose:
- architect - System design (doesn't implement)
- code - Implementation (doesn't design architecture)
- debug - Root cause analysis (doesn't implement fixes)
- docs - Documentation (doesn't create features)
- test - Test writing (doesn't implement features)
Templates
Templates use Handlebars for dynamic content:
{{#if (eq framework "fastapi")}}
FastAPI-specific guidance here
{{/if}}Supported frameworks:
- FastAPI, Django, Flask (Python)
- Next.js, Express, Nest.js, Fastify (Node.js)
- Gin, Echo, Chi, Cobra (Go)
See TEMPLATE_GUIDE.md for details.
Documentation
Development
Run tests:
pnpm testBuild:
pnpm buildContributing
See CONTRIBUTING.md
License
MIT
