@sirasagi62/chizu
v0.1.2
Published
A command-line tool that summarizes the code contained in a repository
Maintainers
Readme
🗺️ chizu
chizu (Japanese for "map") is a lightweight CLI tool to generate a concise repository map of your codebase. It extracts key entities like classes, functions, and methods while respecting your project's structure—perfect for giving LLMs (like ChatGPT, Claude, or Gemini) and coding agents (like Claude Code, Gemini CLI or opencode) the right context without wasting tokens.
Powered by code-chopper.
✨ Features
- AST-based Extraction: Uses Tree-sitter to identify meaningful code boundaries rather than just regex patterns.
- AI-Optimized: Generates a high-density "map" of your repo to help AI understand your codebase's architecture.
- Smart Filtering: Automatically respects
.gitignoreand ignores noisy directories (node_modules, .git, etc.). - Safe Concurrency: Built-in concurrency control to prevent
EMFILEerrors even on massive repositories. - Compress Mode: A dedicated mode to show only signatures for maximum token efficiency.
- Targeted Search: Filter the map by specific keywords to find relevant functions or classes instantly.
🚀 Quick Start
You can run it instantly via npx:
npx @sirasagi62/chizu [directory]Or install it globally:
npm install -g @sirasagi62/chizu📖 Usage
Basic Map
Generate a map of the current directory:
chizuCompress Mode
Show only signatures/definitions (ideal for large repos):
chizu --compressSpecific Directory
chizu ./srcSearch by Keyword
Find only entities containing "fetch" (useful for identifying API logic):
chizu -q fetchCase-Insensitive Search
Search without worrying about uppercase/lowercase:
chizu -q user -i🛠️ CLI Options
| Option | Shorthand | Description | Default |
| :--- | :--- | :--- | :--- |
| directory | - | The target directory to map | . |
| --compress | -c | Only show signatures and hide docs/bodies | false |
| --query <text> | -q | Filter entities and files by a search keyword | - |
| --ignore-case | -i | Ignore case distinctions when searching | false |
| --help | -h | Display help information | - |
💡 Why chizu?
When working with AI, pasting entire files is often overkill and hits context limits. chizu creates a "table of contents" for your code, allowing the AI to see how everything connects before you dive into specific implementation details. Instead of mapping the whole repo, use --query to pinpoint specific logic across multiple files, giving the AI exactly the context it needs for a specific task.
Acknowledgement
This tool is inspired by aider's repomap.
License
MIT
