Repo Map
CLI ToolFree** -🐧 🪟 🍎 - An MCP server (and command-line tool) to provide a dynamic map of chat-related files from the repository with their function prototypes and related files in order of relevance. Based on the "Repo Map" functionality in Aider.chat
Capabilities9 decomposed
tree-sitter-based code definition extraction with language-specific query files
Medium confidenceExtracts function, class, module definitions and reference calls from source code using Tree-sitter parsers with language-specific query files (@definition.function, @definition.class, @reference.call). The system maintains a Tag namedtuple structure (rel_fname, fname, line, name, kind) that captures extracted code entities with their locations and types. This enables structurally-aware parsing across 40+ languages without regex-based heuristics, producing precise AST-based extraction that preserves semantic relationships.
Uses Tree-sitter AST parsing with language-specific query files (get_tags_raw method in repomap_class.py) instead of regex or heuristic-based extraction, enabling structurally-aware definition and reference extraction across 40+ languages with consistent semantics. The Tag namedtuple structure preserves full context (relative filename, absolute filename, line number, entity name, entity kind) for downstream processing.
More accurate than regex-based code extraction and faster than LSP-based approaches because it parses locally without network overhead; more portable than language-specific parsers because Tree-sitter provides unified interface across languages.
pagerank-based code importance ranking with dependency graph analysis
Medium confidenceAnalyzes code dependency graphs using PageRank algorithm to rank files and functions by importance, identifying which components are most central to understanding the repository. The system builds a directed graph from function calls and class references extracted by Tree-sitter, then applies iterative PageRank computation to assign importance scores. This graph-based approach recognizes that frequently-called functions and heavily-referenced classes are more important for LLM context than isolated utility functions.
Applies PageRank algorithm (from Aider.chat) to code dependency graphs to rank importance, treating the codebase as a directed graph where edges represent function calls and class references. This graph-based approach identifies central components more accurately than heuristics like file size or modification time, and integrates seamlessly with the Tree-sitter extraction pipeline.
More sophisticated than simple heuristics (file size, recency) because it understands code structure; more efficient than full semantic analysis because it operates on extracted call graphs rather than re-parsing code.
token-optimized context window packing with binary search
Medium confidenceIntelligently selects and formats code content to fit within LLM context windows using binary search over token counts. The try_tags() function performs binary search on ranked code entities, progressively including more code while monitoring token consumption via tiktoken or equivalent tokenizer. This ensures the output respects token limits while maximizing the amount of relevant code included, formatting results with function prototypes and file relationships in order of PageRank importance.
Uses binary search (try_tags function in repomap_class.py) to efficiently pack code into token-limited context windows, iteratively including ranked entities while monitoring token consumption. This approach balances code coverage with token constraints more efficiently than greedy selection, and integrates with the PageRank ranking to ensure most-important code is included first.
More efficient than greedy token packing because binary search finds optimal cutoff point; more flexible than fixed-size summaries because it adapts to available token budget; more intelligent than random sampling because it respects PageRank importance ordering.
persistent disk-based caching with file modification tracking
Medium confidenceCaches extracted code tags and PageRank computations to disk using diskcache library, with automatic invalidation based on file modification times. The load_tags_cache() and save_tags_cache() methods manage persistent storage, checking file mtimes to determine cache validity. This avoids re-parsing and re-ranking unchanged files across multiple invocations, significantly accelerating repeated analyses of the same codebase while ensuring cache freshness when files change.
Implements persistent caching with file modification time tracking (load_tags_cache/save_tags_cache in repomap_class.py) using diskcache, automatically invalidating cache entries when source files change. This approach avoids expensive re-parsing and re-ranking while maintaining correctness across tool invocations.
More efficient than in-memory caching because it persists across process invocations; more accurate than time-based cache expiration because it tracks actual file changes; more practical than no caching because it significantly speeds up repeated analyses.
command-line interface for on-demand repo map generation
Medium confidenceProvides a CLI tool that accepts repository paths and optional configuration parameters, generating formatted repo maps for immediate use or piping to other tools. The CLI interface wraps the RepoMap class, exposing methods like get_repo_map() with configurable token limits, file filters, and output formats. This enables developers to quickly analyze any codebase from the terminal, integrate RepoMapper into shell scripts, or use it as a preprocessing step for other tools.
Exposes RepoMap core engine as a CLI tool that wraps the RepoMap class methods (get_repo_map, get_ranked_tags_map_uncached) with command-line argument parsing, enabling direct terminal access to repo map generation without writing Python code. Supports piping output to other tools and integration into shell scripts.
More accessible than Python API for shell-based workflows; more flexible than web-based tools because it runs locally without network overhead; more scriptable than GUI tools because it integrates with standard Unix pipes and redirection.
model context protocol (mcp) server for continuous integration with llm tools
Medium confidenceImplements an MCP server that exposes RepoMapper functionality as callable tools for LLM-powered applications and agents. The MCP server wraps RepoMap methods as MCP tools with standardized schemas, enabling seamless integration with Claude, other LLMs, and MCP-compatible applications. This allows LLMs to request repo maps on-demand during conversations, with automatic caching and incremental updates, without requiring the LLM to understand RepoMapper's internal architecture.
Implements MCP server interface that exposes RepoMap functionality as standardized callable tools, enabling LLMs and MCP-compatible applications to request repo maps on-demand. This architecture allows seamless integration with Claude and other LLM-powered tools without requiring them to understand RepoMapper's internal implementation.
More integrated than CLI-based approaches because LLMs can call it directly; more standardized than custom API endpoints because it uses MCP protocol; more flexible than hardcoded context because it allows dynamic repo map generation during conversations.
language-agnostic code entity extraction with configurable language support
Medium confidenceSupports code extraction across 40+ programming languages through Tree-sitter grammar integration, with a pluggable architecture for adding new languages. The system maintains language-specific query files that define how to extract definitions and references for each language, allowing consistent extraction semantics across Python, JavaScript, TypeScript, Go, Rust, Java, C++, and others. New language support can be added by defining query files without modifying core extraction logic.
Provides pluggable language support through Tree-sitter query files, enabling extraction across 40+ languages with consistent semantics. New languages can be added by defining query files without modifying core extraction logic, making the system extensible for emerging languages.
More flexible than language-specific tools because it supports multiple languages with unified interface; more maintainable than hardcoded language support because query files are declarative; more future-proof because it can easily add new languages as Tree-sitter grammars improve.
file prioritization and filtering with configurable rules
Medium confidenceAllows users to specify which files should be included or excluded from repo map generation through configurable filtering rules. The system supports patterns for ignoring common non-essential files (node_modules, .git, __pycache__, etc.) and prioritizing important files (main entry points, configuration files). This enables focused analysis of relevant code while reducing noise from dependencies and generated files, with rules that can be customized per repository.
Provides configurable file filtering and prioritization rules that operate at the file level before extraction, allowing users to exclude dependency directories and generated files while prioritizing important source files. This reduces noise in repo maps and focuses analysis on relevant code.
More flexible than hardcoded exclusion lists because rules are configurable; more efficient than post-processing filtering because it excludes files before expensive parsing; more practical than no filtering because it handles common patterns (node_modules, .git, etc.).
formatted output generation with function prototypes and relationship metadata
Medium confidenceGenerates human-readable repo maps that include function/class prototypes, file relationships, and importance rankings in a structured text format. The get_repo_map() method formats extracted code entities with their signatures, line numbers, and relationships to other code, organized by importance. This output is designed to be comprehensible to both humans and LLMs, providing enough context to understand code structure without overwhelming with full source code.
Generates formatted repo maps that include function/class prototypes extracted from AST, file relationships derived from call graphs, and importance rankings from PageRank, organized in a structure optimized for both human comprehension and LLM processing. The formatting balances information density with readability.
More informative than raw code listings because it includes prototypes and relationships; more readable than full source code because it summarizes structure; more LLM-friendly than unstructured text because it uses consistent formatting and metadata.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with Repo Map, ranked by overlap. Discovered automatically through the match graph.
Scaffold
** - Scaffold is a Retrieval-Augmented Generation (RAG) system designed to structural understanding of large codebases. It transforms your source code into a living knowledge graph, allowing for precise, context-aware interactions that go far beyond simple file retrieval.
claude-context
Code search MCP for Claude Code. Make entire codebase the context for any coding agent.
code-review-graph
Local knowledge graph for Claude Code. Builds a persistent map of your codebase so Claude reads only what matters — 6.8× fewer tokens on reviews and up to 49× on daily coding tasks.
CodeGraphContext
An MCP server plus a CLI tool that indexes local code into a graph database to provide context to AI assistants.
OpenDevin
OpenDevin: Code Less, Make More
plandex
Open source AI coding agent. Designed for large projects and real world tasks.
Best For
- ✓developers building LLM-aware code analysis tools
- ✓teams needing language-agnostic codebase indexing
- ✓projects requiring precise AST-based code understanding without language-specific parsers
- ✓LLM-powered code assistants needing to select most-relevant code snippets
- ✓teams analyzing codebase architecture and dependency patterns
- ✓developers building context-aware code analysis tools with token budgets
- ✓LLM-powered code assistants with fixed context windows
- ✓teams building context-aware code analysis with token budgets
Known Limitations
- ⚠Tree-sitter grammar coverage varies by language; some languages have incomplete or experimental grammars
- ⚠Query file maintenance required when adding new language support; no automatic grammar detection
- ⚠Performance degrades on very large files (>10K lines) due to AST traversal overhead
- ⚠Extraction accuracy depends on Tree-sitter grammar quality; edge cases in language syntax may be missed
- ⚠PageRank computation adds ~50-200ms overhead per analysis depending on codebase size
- ⚠Algorithm assumes call graph is representative of importance; may rank utility libraries lower than deserved
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
About
** -🐧 🪟 🍎 - An MCP server (and command-line tool) to provide a dynamic map of chat-related files from the repository with their function prototypes and related files in order of relevance. Based on the "Repo Map" functionality in Aider.chat
Categories
Alternatives to Repo Map
Are you the builder of Repo Map?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →