PitchHut logo
Visualize your codebase with a structured brain map for LLMs.
Pitch

codemap is a powerful CLI tool that generates a compact 'brain map' of your codebase, making it easier for Large Language Models to understand project architecture. With features like smart highlighting, noise reduction, and efficient token usage, codemap delivers rich context without overwhelming complexity.

Description

codemap is a powerful CLI tool that generates a compact, visually structured "brain map" of your codebase, specifically designed to provide Large Language Models (LLMs) with immediate architectural context without incurring excessive token costs. By creating a concise, tree-like representation of the project's structure, codemap highlights essential files while filtering out unnecessary clutter.

Features

  • Brain Map Output: Offers a visual overview of the project's codebase in a single, easily digestible block.
  • Token Efficient: Systematically clusters files and omits file extensions to maximize vertical space utilization.
  • Smart Highlighting: Automatically identifies and highlights the top five largest source code files for quick reference.
  • Smart Flattening: Merges empty intermediate directories (e.g., src/main/java) to streamline the output.
  • Rich Context: Employs color coding by programming language, facilitating quick scanning and comprehension.
  • Noise Reduction: Automatically excludes common directories and files such as .git, node_modules, and various asset types, ensuring a cleaner output.

Usage

To generate a brain map, simply run codemap in the terminal from any directory:

codemap

Alternatively, specify a project path:

codemap /path/to/my/project

Example Output

The output presents a clear hierarchy, showing file sizes and selectively marking significant files:

codemap
ā”œā”€ā”€ šŸ“‚ .claude/ (100.0B)
│   └── ā­ļø settings.local.json
ā”œā”€ā”€ šŸ“‚ renderer/ (12.3KB)
│   └── ā­ļø render.py
ā”œā”€ā”€ šŸ“‚ scanner/ (3 files, 3.7KB)
│   └── ā­ļø go.mod ā­ļø main.go
│       go.sum
└── ā­ļø Makefile

By utilizing codemap, developers can efficiently navigate and understand complex codebases, making it an invaluable tool for maintaining clarity and organization within software projects.

0 comments

No comments yet.

Sign in to be the first to comment.