Thanks for your interest in contributing. This document covers everything you need to get started.
devmap/
├── apps/
│ └── web/ ← landing page (post-MVP, not active yet)
├── packages/
│ └── cli/ ← core CLI — this is where you'll work
│ ├── src/
│ │ ├── commands/ ← one file per CLI command
│ │ ├── analyzers/ ← static analysis logic
│ │ ├── ai/ ← AI provider abstraction
│ │ ├── cache/ ← file hashing + snapshot
│ │ └── utils/ ← output, config, helpers
│ └── test/
│ └── fixtures/ ← dummy projects for testing
├── docs/ ← architecture, commands, roadmap
└── README.md
Most contributions will be inside packages/cli/src/.
Requirements: Node.js 22.12+, pnpm
# Clone the repo
git clone https://github.com/itsflaid/devmap
cd devmap
# Install dependencies
pnpm install
# Link CLI globally so you can test it like a real user
cd packages/cli
pnpm link --global
# Verify it works
devmap --version# Run CLI in development (no build needed)
cd packages/cli
pnpm dev
# Or run a specific command directly
npx tsx src/index.ts analyze
# Build for production
pnpm build
# Run tests
pnpm testAlways test against real projects, not just the fixtures.
# Go to any real project on your machine
cd ~/projects/some-nextjs-app
# Run devmap against it
devmap analyze
devmap doctorThe fixture projects in test/fixtures/ are for automated tests.
Manual testing against real projects catches things fixtures miss.
Before submitting a PR, test against at least:
- A Next.js project
- An Express project
- A project with many files (100+)
- Create
packages/cli/src/commands/yourcommand.ts - Implement the command logic
- Register it in
packages/cli/src/index.ts - Add documentation to
docs/COMMANDS.md - Add test fixtures if needed
Follow the pattern of existing commands — use output.ts utilities
for all terminal output, never console.log directly.
- Create
packages/cli/src/ai/yourprovider.ts - Implement the provider interface:
export async function complete(options: CompleteOptions): Promise<string>
export async function isAvailable(): Promise<boolean>
export function getModels(): string[]- Register the provider in
packages/cli/src/ai/provider.ts - Add the provider to
devmap initoptions inpackages/cli/src/commands/init.ts - Update the provider table in
README.md
Framework detection lives in packages/cli/src/analyzers/frameworkDetector.ts.
Each framework needs:
- Detection logic (from
package.json+ file patterns) - Entry point patterns specific to that framework
- Test fixture in
test/fixtures/
Before adding a new framework, open an issue first to discuss. Framework support affects output quality significantly — better to do one framework well than many frameworks poorly.
- TypeScript strict mode is enabled — no
anywithout a comment explaining why - Use
output.tsutilities for all terminal output - Keep command files thin — business logic belongs in
analyzers/orai/ - Prompts belong in
ai/prompts.ts, never inline in command files - One responsibility per file
Small PRs are easier to review. If you're adding a big feature, open an issue first to discuss the approach before writing code.
PR checklist:
- Tested against a real Next.js project
- Tested against a real Express project
- No raw
console.login command files - New commands documented in
docs/COMMANDS.md -
devmap doctorstill passes after your changes
Run devmap doctor first and include the output in your bug report.
This gives all the context needed to reproduce the issue.
Open an issue with:
devmap doctoroutput- What command you ran
- What you expected to happen
- What actually happened
Check docs/ROADMAP.md before requesting a feature —
it might already be planned.
For features not in the roadmap, open an issue with:
- The problem you're trying to solve
- Why existing commands don't solve it
- What the command/output would look like
Features that solve real problems with clear use cases get prioritized over features that are technically interesting.
By contributing, you agree your contributions will be licensed under MIT.