Understand any codebase in minutes, not days.
DevMap is a CLI that combines static analysis with optional AI-powered interpretation. It maps project structure, generates reusable context, and answers focused questions without sending an entire repository to an AI model.
Version 0.1.0 is an early beta focused on Next.js and Express projects.
npm install --global devmapOr run without a global install:
npx devmap --help- Node.js 18 or newer
- A Groq or OpenRouter API key for AI-powered analysis and answers
Static analysis still works when AI is not configured.
Run these commands from the root of the project you want to understand:
devmap init
devmap analyze
devmap ask "How does authentication work?"
devmap onboarding
devmap doctordevmap init selects a provider, validates its key, stores configuration locally, prepares
.devmap/, generates DEVMAP.md, and integrates with AGENTS.md safely.
Choose Groq or OpenRouter with the arrow keys during:
devmap initGroq keys are available at https://console.groq.com/keys. OpenRouter keys are available at https://openrouter.ai/keys.
For OpenRouter, DevMap prompts:
OpenRouter model [openrouter/free]:Press Enter to use the free router, or type any free or paid OpenRouter model ID. The selected model is saved and used as the primary choice.
For non-interactive Groq setup:
GROQ_API_KEY="your-key" devmap initOn PowerShell:
$env:GROQ_API_KEY="your-key"
devmap init
Remove-Item Env:GROQ_API_KEYFor non-interactive OpenRouter setup:
OPENROUTER_API_KEY="your-key" devmap initThe key is stored locally in ~/.devmap/config.json. Requests go directly from
your machine to the selected provider. DevMap does not send the key to a
DevMap-owned server.
devmap init
devmap analyze
devmap analyze --deep
devmap analyze --fresh
devmap ask "Where is payment logic handled?"
devmap onboarding --write
devmap onboarding --write --language id
devmap doctor
devmap config model autoGroq automatic routing uses a fast model for focused questions and larger models for architecture analysis. OpenRouter uses the model selected during init. Change either provider's model with:
devmap config model <model-id>
devmap config model autoDevMap generates:
.devmap/index.jsonfor lightweight AI-agent navigation.devmap/features/*.jsonfor focused feature maps and source priority.devmap/snapshot.jsonfor the full structured project analysis archiveDEVMAP.mdfor human and AI-agent usage guidance- a small DevMap block in
AGENTS.mdonly after confirmation when the file already exists
Existing AGENTS.md and DEVMAP.md files are never overwritten.
Read .devmap/index.json first, open the relevant feature map, and inspect its
sourcePriority files. Use .devmap/snapshot.json only when the lightweight
navigation layer is insufficient.
Use --json for scripts, editors, CI, or AI agents:
devmap analyze --json
devmap ask "Where is authentication handled?" --json
devmap onboarding --json
devmap doctor --jsonJSON mode writes one parseable JSON document to stdout without ANSI colors, terminal decoration, or streamed partial output.
- Next.js
- Express
Other frameworks may be detected partially and are not part of the 0.1.0
support promise.
- Project analysis runs locally before AI interpretation.
- Full repository source is not sent to the selected provider.
askselects a small set of relevant files..envfiles and common generated directories are ignored.- API keys are stored locally and should never be committed.
- Repository: https://github.com/itsflaid/devmap
- Issues: https://github.com/itsflaid/devmap/issues
- Changelog: https://github.com/itsflaid/devmap/blob/main/CHANGELOG.md
MIT