Skip to main content
Glama

The first command you run after git clone.

Built by Muhammad Fadil (@itsflaid) · www.flaid.my.id


The Problem

Before doing real work, developers and AI agents need context.

They open files, trace dependencies, follow feature flows, and rebuild understanding of the project.

The process repeats every time you:

  • start a new session

  • switch AI tools

  • bring in a new agent

  • revisit a project weeks later

The code stays the same.

The context gets rebuilt again and again.


Related MCP server: codex-memory-intelligence

The Solution

DevMap turns project knowledge into reusable context.

It analyzes your codebase and generates structured project intelligence that can be reused across developers, sessions, and AI agents.

Instead of rediscovering the codebase every time, agents and developers start with:

  • An operation map: what each endpoint, page and action checks, reads and writes

  • Project overview and entry points

  • Critical files

  • Feature maps

  • Architecture summaries

  • Onboarding guidance

Analyze once.

Reuse everywhere.


Operation Map

Before changing what a request does, ask for its card. This one is from a real Next.js project:

$ devmap trace "POST /api/snippets/[id]/copy"

POST /api/snippets/[id]/copy
  file     apps/web/src/app/api/snippets/[id]/copy/route.ts:5
  access   requireUserId (apps/web/src/lib/apiAuth.ts) -> 401
  reads    Snippet.findFirst [where id, userId]  :10
  writes   Snippet.update [where id]  :16
  errors   401, 404
  used by  apps/web/src/components/snippet/shared/CopyButton.tsx, ...
  screens  /dashboard, /explore, /share/[shareId], /workspaces/[id]

devmap data <Model> answers the other direction: every operation that reads or writes a model, with the filter keys of each query.

Cards come from static reading of JavaScript and TypeScript. They name what was seen, with a file and line, and say where reading stopped. no check found does not mean a route is public: global middleware and hooks are only noted. Coverage and limits are in docs/commands.md.


Without DevMap:

Repository
   ↓
Claude explores files
   ↓
Context rebuilt

Repository
   ↓
Codex explores files
   ↓
Context rebuilt

Repository
   ↓
New session
   ↓
Context rebuilt

With DevMap:

Repository
   ↓
devmap analyze
   ↓
Shared Project Context
   ├─ Claude Code
   ├─ OpenAI Codex
   ├─ Gemini CLI
   ├─ Cursor
   ├─ Windsurf
   └─ Future Agents

How It Works

devmap init
  → configures provider
  → generates DEVMAP.md
  → prepares project

devmap analyze
  → runs static analysis
  → builds the operation map
  → builds project intelligence
  → generates navigation files
  → generates reusable context

devmap trace / devmap data
  → answer one question from that context

Generated Context
  → reusable across sessions
  → reusable across agents
  → reusable across developers

Generated Files

File

Role

DEVMAP.md

DevMap project documentation

AGENTS.md

Agent instructions

.devmap/index.json

Agent entry point

.devmap/features/*.json

Feature-level navigation

.devmap/snapshot.json

Complete project intelligence, including the operation map

Recommended navigation order for agents:

index.json
   ↓
devmap trace / devmap data
   ↓
the files and lines they name
   ↓
feature maps, then snapshot.json, when the map does not cover the task

The snapshot remains the complete project context and can also be copied into web-based AI tools when needed.


For AI Agents

DevMap provides reusable project context that works across tools.

Instead of exploring a repository from scratch, agents start with generated project intelligence.

Supported workflows include:

  • Claude Code

  • OpenAI Codex

  • Gemini CLI

  • Cursor

  • GitHub Copilot

  • etc.

Without DevMap:

Agent
   ↓
Explore repository
   ↓
Trace dependencies
   ↓
Guess architecture
   ↓
Start task

With DevMap:

Agent
   ↓
index.json
   ↓
devmap trace / devmap data
   ↓
named files and lines
   ↓
Start task

One analysis.

Reusable across sessions, tools, and agents.


MCP Server

Run DevMap as an MCP server and agents can query the project map with tool calls instead of reading a dumped context file.

# Claude Code
claude mcp add devmap -- npx -y @flaid/devmap mcp
{
  "mcpServers": {
    "devmap": { "command": "npx", "args": ["-y", "@flaid/devmap", "mcp"] }
  }
}

devmap init --mcp opencode,claude,cursor writes this entry for you (opencode.json, .mcp.json, .cursor/mcp.json) and merges into an existing file without touching other servers. Interactive devmap init offers it too.

The server is read-only and static by default (no AI provider is contacted unless you start it with --allow-ai).

Tool

Answers

devmap_overview

What is this project? Entry points, critical files, features, flows

devmap_trace

What does this endpoint, page or action check, read, write and answer?

devmap_data

Which operations read and write this model?

devmap_map

How is this feature or file wired?

devmap_flow

How does this request or feature work end to end?

devmap_routes

Which pages and API routes exist?

devmap_impact

What breaks if I change this file?

devmap_find

Where is the code for this concept?

devmap_analyze

Refresh the snapshot when it is stale

devmap_explain

Explain this file, feature or function (needs --allow-ai)

Every answer says whether the snapshot is stale. Setup for Claude Code, Cursor, opencode and Codex, plus the privacy model, is in docs/mcp.md.


Vision

DevMap is not an AI coding assistant.

AI coding assistants help write code.

DevMap helps developers and AI agents understand how codebases are organized, how features connect, and where work should begin.

Use DevMap to understand the project.

Use your preferred AI tool to change it.

DevMap is a shared project context layer for developers and AI agents.


Supported Stacks

Full support — framework detection + route mapping

  • Next.js (App Router and Pages Router)

  • Astro

  • Nuxt

  • SvelteKit

  • Remix

  • React Router v7 (framework mode)

  • TanStack Router and TanStack Start

  • Expo Router

  • SolidStart

  • Qwik City

  • Angular

  • Express

  • Fastify

  • Hono

  • Elysia

  • Koa

  • AdonisJS

  • NestJS

SPA client-side routing — routes read from the client router

  • React (Create React App, Vite) — React Router <Route> trees and createBrowserRouter, TanStack Router code-based routes

  • Vue — Vue Router route arrays

  • Svelte — svelte-spa-router maps

Operation map

Endpoints, pages and server actions of the frameworks above, plus tRPC procedures. JavaScript and TypeScript only.

Databases

Database layer

Schema (entities)

Reads and writes in the operation map

Prisma

Fields and relations

Yes

Drizzle

Columns and foreign keys

Yes

TypeORM

Detected

Repository calls

Supabase

Detected

.from() queries

Raw SQL (pg, mysql2, better-sqlite3)

Table names

Listed without table names (Prisma raw queries)

Mongoose

Detected

No

Planned

  • PHP (Laravel)

  • Python, Go, Java, Rust, Dart, C#


AI Provider Setup

DevMap is free and open source.

The API key is optional. Static analysis, the generated files and the MCP server work without one; AI-written narration and devmap explain need a provider key. DevMap uses Groq by default — analysis runs on free-tier infrastructure.

Provider

Status

Groq

MVP

OpenRouter

MVP

Custom (any OpenAI-compatible)

MVP

devmap init lets you choose Groq, OpenRouter, or a custom OpenAI-compatible endpoint with the arrow keys. Groq shows the available model list and stores the selected model. For OpenRouter, pressing Enter at OpenRouter model [openrouter/free]: keeps the free router; typing another model ID uses that free or paid model instead. Change it later with devmap config model <model-id>.

Press Enter at the key prompt to skip AI and add a key later with devmap config key (or devmap config key <key>; it also reads GROQ_API_KEY / OPENROUTER_API_KEY).

API keys are stored locally:

~/.devmap/config.json

DevMap does not require a backend server.

Requests go directly from your machine to the selected provider.


Installation

# npm
npm install -g @flaid/devmap

# pnpm
pnpm add -g @flaid/devmap

# run without installing
npx @flaid/devmap analyze

Requirements:

Node.js 22.12+

Documentation


Contributing

DevMap is open source and welcomes contributions.

git clone https://github.com/itsflaid/devmap
cd devmap

pnpm install
pnpm link --global

devmap analyze

Before contributing:

  1. Read docs/architecture.md

  2. Read CONTRIBUTING.md


License

MIT License — use it, fork it, improve it, build on top of it.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Read-only MCP server that provides AI agents with context about Unity project relationships, including scenes, prefabs, scripts, GUIDs, and code impact analysis.
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that analyzes codebases to provide dependency graphs, impact analysis, and file insights across 15+ programming languages, enabling AI assistants to understand project structure and navigate code efficiently.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A local, read-only MCP server that provides AI coding agents with structural evidence about a repository, including dependency analysis and impact assessment, while naming the boundary of every answer without any LLM calls.
      19 npm
      Apache 2.0