syntax-aware code condensation with structural preservation
Extracts and highlights essential code elements (function signatures, class definitions, imports, key logic) while removing boilerplate and comments, using a simplified repomap technique adapted from Aider Chat. The tool parses source code into an AST-like representation to identify structural boundaries and preserve semantic relationships, then outputs a condensed version that maintains enough context for LLM analysis without token bloat.
Unique: Implements a simplified version of Aider Chat's repomap algorithm specifically optimized for LLM context windows, using language-aware parsing to preserve structural integrity while aggressively removing non-essential lines (comments, blank lines, verbose formatting)
vs alternatives: More sophisticated than naive line-filtering or regex-based approaches because it understands code structure (functions, classes, imports) and preserves semantic relationships, while remaining lighter-weight than full AST-based tools like tree-sitter
multi-language code parsing with fallback strategies
Detects source code language from file extension or content, then applies language-specific parsing rules to identify structural elements (function/class definitions, imports, decorators). Falls back to heuristic-based line filtering for unsupported languages, ensuring graceful degradation across diverse codebases without requiring external parser dependencies.
Unique: Implements language-specific parsing rules as pluggable modules with automatic fallback to generic heuristics, avoiding hard dependencies on heavy parser libraries while maintaining reasonable accuracy across 10+ languages
vs alternatives: Lighter-weight than tree-sitter or Babel-based approaches because it uses pattern matching instead of full AST generation, while more accurate than naive regex-based language detection
token-aware condensation with size estimation
Estimates token consumption of condensed code using language-model-specific tokenizers (OpenAI, Anthropic, etc.) and provides feedback on compression ratio achieved. Allows developers to tune condensation aggressiveness (preserve more detail vs. maximize compression) based on target token budget, enabling predictable context window usage.
Unique: Integrates token counting directly into the condensation pipeline with support for multiple tokenizer backends, allowing developers to make informed decisions about compression trade-offs before sending code to LLMs
vs alternatives: More practical than generic code compression tools because it optimizes specifically for LLM token budgets rather than generic file size, and provides real-time feedback on token consumption
batch directory processing with recursive traversal
Processes entire directory trees recursively, applying condensation rules to all source files matching specified patterns (glob filters, language filters). Outputs a structured map of condensed files with metadata (original size, condensed size, token count, language), enabling efficient analysis of large monorepos or multi-module projects.
Unique: Provides recursive directory processing with glob-based filtering and structured metadata output, designed specifically for monorepo scenarios where developers need to condense multiple modules or packages in a single operation
vs alternatives: More efficient than processing files individually because it batches operations and generates a unified metadata manifest, while remaining simpler than full-featured build system integrations
configurable condensation profiles with preset strategies
Offers multiple condensation profiles (aggressive, balanced, conservative) that control which code elements are preserved (imports, comments, docstrings, blank lines, etc.). Users can define custom profiles via configuration files, enabling consistent condensation behavior across teams and projects without per-file parameter tuning.
Unique: Provides preset condensation profiles (aggressive/balanced/conservative) with customizable rules via configuration files, allowing teams to enforce consistent condensation policies without modifying code or CLI parameters
vs alternatives: More flexible than single-strategy tools because it supports multiple profiles and custom configurations, while remaining simpler than full-featured code analysis frameworks that require plugin development
import and dependency extraction with relationship mapping
Identifies and extracts import statements, require() calls, and dependency declarations from source code, then maps relationships between modules (which files import which). Outputs a dependency graph or adjacency list that helps LLMs understand module structure and interdependencies without analyzing full file contents.
Unique: Extracts and maps import/require relationships across source files to build a lightweight dependency graph, enabling LLMs to understand module structure without processing full file contents
vs alternatives: Faster and more token-efficient than sending full code to LLMs for dependency analysis, while remaining simpler than heavyweight dependency analysis tools like Madge or Webpack
function and class signature extraction with metadata
Parses source code to extract function/method signatures, class definitions, and type annotations, preserving parameter names, return types, and decorators. Outputs a structured list of callable interfaces with optional docstring summaries, enabling LLMs to understand the public API of a module without reading implementation details.
Unique: Extracts function and class signatures with type annotations and docstring summaries, creating a lightweight API reference that LLMs can use for code generation without processing full implementations
vs alternatives: More efficient than sending full code to LLMs because it focuses on callable interfaces and public APIs, while remaining simpler than full IDE-style symbol resolution
comment and docstring filtering with preservation options
Identifies and selectively removes or preserves comments, docstrings, and documentation blocks based on configurable rules (remove all, keep docstrings only, keep type hints, etc.). Supports multiple comment styles (single-line, block, inline) across languages, enabling fine-grained control over documentation preservation in condensed code.
Unique: Provides configurable comment and docstring filtering with language-aware detection of multiple comment styles, enabling fine-grained control over documentation preservation in condensed code
vs alternatives: More sophisticated than naive regex-based comment removal because it understands language-specific comment syntax and docstring formats, while remaining simpler than full AST-based approaches
+2 more capabilities