CLI tool for LLM context loading from codebases
Top 89.7% on sourcepulse
Glimpse is a command-line utility designed to efficiently extract and process code from local directories, Git repositories, and web pages, primarily for feeding into Large Language Models (LLMs). It offers parallel processing, tree-view navigation, token counting, and flexible output options, making it valuable for developers and researchers working with LLM-based code analysis or generation.
How It Works
Glimpse leverages Rust's concurrency features for fast, parallel file processing. It respects .gitignore
by default and allows custom include/exclude patterns. For token counting, it integrates with OpenAI's tiktoken
and HuggingFace's tokenizers, providing estimates for LLM context window usage. Web content is processed by converting HTML to Markdown, with options for traversing linked pages.
Quick Start & Requirements
cargo install glimpse
, brew install glimpse
, or via Nix.cargo
install.glimpse /path/to/project
or glimpse https://example.com
.Highlighted Details
tiktoken
(OpenAI) and HuggingFace (any model or local file).Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The tool's effectiveness for web content processing, especially complex sites, may vary. While it supports various Git providers, performance on very large repositories might require tuning thread counts or exclude patterns.
1 month ago
1 day