SC

syahrul84/codemap

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars 0 forks Качество 83 Тренд 20MIT

Code index for Laravel, Vue, Nuxt and Next.js projects, served to Claude over MCP: checks names before Claude uses them, finds usages and affected tests, runs a pre-release check and draws a code map.

Обзор

codemap reads a Laravel, Vue 2, Vue 3 or Nuxt (2/3/4) project and serves facts about it to Claude over MCP, so Claude checks what exists instead of guessing: - classes, interfaces, traits, enums, methods, functions, properties, constants, enum cases. Names are fully resolved, with signatures and doc summaries. - static analysis of withRouting(), RouteServiceProvider and route files, including groups, resources and includes. Optionally php artisan route:list. - table, fillable/guarded/hidden, casts, appends, relations, accessors, scopes, traits. - rebuilt by replaying migrations (and a squashed schema:dump), with the migration and line that created or last changed each column. - validation rules, linked to the controller methods that use them.

README

Показан фрагмент оригинального README. Открыть оригинал.

codemap — project index MCP server for Laravel, Vue, Nuxt, Next.js, Swift, Android and Rust

codemap gives your AI assistant the facts about your project (classes, routes, columns, components, screens, endpoints), so it looks them up instead of guessing. You get fewer made-up names in the code it writes, fewer tokens spent reading whole files, and a correct picture of the project from the first message.

Why use codemap

  1. It catches made-up names before they ship. When the AI invents a column, method, route, component or endpoint (a “hallucination”), verify returns not_found with the closest real name, and codemap misses shows which names it keeps getting wrong. These bugs look correct in review and only fail in production.
  2. It knows what a change will break. Before something is renamed or removed, find_usages lists every place it’s used, with file:line. After a change, it names the tests that cover it and gives the exact commands to run only those, not the whole suite.
  3. It checks the frontend against the backend. api_usage matches every API call in Vue, Nuxt or Next.js code to the Laravel route that serves it, and flags calls to routes that don’t exist, the wrong method, and fields the frontend reads that the backend never returns. Grep can’t find these.
  4. The AI knows your project from the first message, and spends fewer tokens. One project_overview call (about 1,200 tokens on a 1,200-file app) gives the framework and version, layout, models, screens, crates or modules, and the names the AI got wrong in earlier sessions. After that it asks for one class, component or table instead of reading whole files. In a real Laravel app, get_symbol on the Order model answers in 5.3 KB instead of the 19.3 KB model file, and get_schema for orders in 8.9 KB instead of the 61.8 KB of the 26 migrations that build the table. codemap usage shows the answer sizes for your own project.
  5. It catches problems before a release. verify with release_check: true gives one list: missing endpoints, fields not returned, missing translations, unused code added on the branch, migrations not yet run, new environment variables, and what the server needs (migrate, cache clear, restart).

The same tools work across Laravel, Vue, Nuxt, Next.js, Swift, Android and Rust. Nothing leaves your machine: your code is never sent anywhere, and the index stays local.

Five-minute start

# macOS Apple Silicon: aarch64-apple-darwin · Intel Mac: x86_64-apple-darwin
# Linux: x86_64-unknown-linux-gnu / aarch64-unknown-linux-gnu · Windows: see below
curl -fsSL https://github.com/syahrul84/codemap/releases/latest/download/codemap-aarch64-apple-darwin.tar.gz | tar xz
mkdir -p ~/.local/bin && mv codemap ~/.local/bin/
codemap setup --dry-run   # see what setup would change
codemap setup             # Claude Code: register the server, add the rule block and the search hook
Открыть полный README на GitHub

Установка

docker run -i --rm -v ${PWD}:/workspace:ro -v codemap-data:/data codemap:latest serve --project /workspace
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "codemap": { "command": "codemap", "args": ["serve", "--project", "${PWD}"] } } }