infiniloom-0.4.3 is not a library.
Infiniloom
Transform codebases into optimized context for LLMs
Installation · Quick Start · Features · Documentation
Infiniloom extracts code, symbols, and structure from repositories and outputs them in formats optimized for Claude, GPT, Gemini, and other LLMs.
- Fast — Pure Rust, processes 1000+ files in <500ms
- Smart — AST-based symbol extraction (21 languages), PageRank ranking
- Secure — Automatic secret detection and redaction
- Flexible — XML, Markdown, JSON, YAML output formats
Installation
&&
| Method | Command | Notes |
|---|---|---|
| npm | npm install -g infiniloom |
Easiest, cross-platform |
| Homebrew Cask | brew install --cask infiniloom |
macOS, pre-built binary |
| Homebrew Formula | brew install infiniloom |
macOS, builds from source |
| Cargo | cargo install infiniloom |
Rust users |
| pip | pip install infiniloom |
Python library |
| npm library | npm install infiniloom-node |
Node.js library |
From source:
&&
Quick Start
# Pack repository for Claude (XML format)
# Scan repository statistics
# Generate symbol map with PageRank ranking
# Get context for staged changes (AI code review)
Output Formats
Performance
| Repository | Files | Tokens | Time |
|---|---|---|---|
| infiniloom | 174 | 667K | 420ms |
| medium project | 1,200 | 1.8M | 1.8s |
Benchmarks on M2 MacBook Pro, including full AST parsing and symbol extraction.
Features
Model-Specific Optimization
| Model | Format | Optimizations |
|---|---|---|
| Claude | XML | Prompt caching hints, CDATA sections |
| GPT-4/4o | Markdown | Tables, code fences, hierarchical headers |
| Gemini | YAML | Query at end, structured hierarchy |
| Any | TOON | ~40% smaller than JSON |
Smart Filtering
Security Scanning
Automatically detects and redacts API keys, tokens, private keys, and credentials:
Git Integration
Diff Context for AI Code Reviews
| Language | Symbols Extracted |
|---|---|
| Python | Functions, Classes, Methods, Decorators |
| JavaScript/TypeScript | Functions, Classes, Interfaces, Types |
| Rust | Functions, Structs, Enums, Traits, Impl blocks |
| Go | Functions, Methods, Structs, Interfaces |
| Java | Classes, Interfaces, Methods, Enums |
| C/C++ | Functions, Structs, Classes |
| C# | Classes, Methods, Interfaces, Properties |
| Ruby | Classes, Modules, Methods |
| PHP | Classes, Functions, Methods |
| Kotlin | Classes, Functions, Interfaces |
| Swift | Classes, Structs, Functions, Protocols |
| Scala | Classes, Objects, Traits, Functions |
| Haskell | Functions, Types, Data, Typeclasses |
| Elixir | Modules, Functions, Macros |
| Clojure | Functions, Macros, Vars |
| OCaml | Functions, Modules, Types |
| Lua | Functions, Tables |
| R | Functions, Classes |
| Bash | Functions |
Exact tokenization (tiktoken):
- GPT-5.2, GPT-5.1, GPT-5, O4-mini, O3, O1 (o200k_base)
- GPT-4o, GPT-4o-mini (o200k_base)
- GPT-4, GPT-3.5-turbo (cl100k_base)
Calibrated estimation:
- Claude (Anthropic)
- Gemini (Google)
- Llama 3/4, CodeLlama (Meta)
- Mistral, Mixtral (Mistral AI)
- DeepSeek V3/R1
- Qwen (Alibaba)
- Cohere Command R+
- Grok (xAI)
| Level | Reduction | What's Removed |
|---|---|---|
none |
0% | Nothing |
minimal |
10-20% | Empty lines, trailing whitespace |
balanced |
30-40% | Comments, redundant whitespace |
aggressive |
50-60% | Docstrings, inline comments |
extreme |
70-80% | Everything except signatures |
Language Bindings
Python
=
=
Node.js
const = require;
const context = ;
const stats = ;
Configuration
Create .infiniloom.yaml with infiniloom init:
output:
format: xml
model: claude
compression: balanced
token_budget: 100000
scan:
include:
exclude:
security:
scan_secrets: true
redact_secrets: true
See Configuration Guide for all options.
Documentation
| Document | Description |
|---|---|
| Command Reference | All CLI commands |
| Configuration | Config files and environment variables |
| Output Formats | Format specifications |
| Architecture | System design |
Contributing
Contributions welcome! See CONTRIBUTING.md.
License
MIT — see LICENSE.
Acknowledgments
- Tree-sitter — Fast, reliable parsing
- tiktoken-rs — Accurate token counting
- Aider — Repo-map concept inspiration
Made with care by Topos Labs