RepoLens: Interactive Local Codebase Packer and Token Optimizer (TUI/CLI) in Go

RepoLens is a new open-source, zero-dependency Go tool that packs a local codebase into a single file optimized for LLM context windows. It features an Elm-architecture TUI built on Charm's Bubble Tea, along with several smart context-optimization mechanisms.
Key Features
- Interactive File Explorer (TUI): Select files and folders recursively with the spacebar. Expand/collapse nested folders visually.
- Live Tiktoken Counter: A dynamic progress bar estimates context limit consumption (GPT-4o encoding) in real time as you select files.
- Smart Comment Stripping: Automatically removes comments and docstrings for Go, Python, TypeScript, JavaScript, Shell, HTML, and CSS, while keeping executable shebangs (
#!/bin/bash). Benchmark on thespf13/cobrarepo: prompt size shrunk from 621 KB to 518 KB (17.2% token savings). - Token-based File Splitting: If your codebase exceeds a token threshold (e.g.,
--max-tokens 50000), RepoLens splits output into sequential parts, automatically prepending the tree layout diagram to every part. - Local Secret Scanner: Flags potential AWS keys, OpenAI keys, Slack webhooks, and generic passwords. In TUI mode, blinks a yellow
⚠️ [SECRET!]warning next to the file. - Robust XML Formatting: Safely wraps code payloads inside
<![CDATA[ ... ]]>blocks and escapes nested brackets to prevent prompt formatting breakdown.
Quick Start
Install via Go:
go install github.com/catball912/repolens@latestOr run in direct CLI mode:
repolens -n -d . -i "*_test.go,*.log" -o output.mdWho It's For
Developers who need to feed a local codebase into an LLM (e.g., for code review, refactoring, or documentation generation) without uploading files to a third-party service, and who want a lightweight, compiled tool with no runtime dependencies.
📖 Read the full source: r/openclaw
👀 See Also

WeAreHere Browser Extension and MCP Tools Scan Website Privacy Practices
Two open-source tools—barebrowse and wearehere—scan websites for trackers, fingerprinting, and data broker connections. The wearehere browser extension shows real-time privacy scores (0-100) as you browse, while MCP servers enable AI assistants to assess any site on command.

Task-observer: A Meta-Skill That Automates Skill Improvement for AI Coding Agents
Task-observer is a meta-skill that self-improves all your AI agent's skills, including itself. It logged 600 skill improvements across 40 skills in 3 months and automates skill creation from work gaps.

Opendesk: MCP + SOM algorithm for AI desktop control via Claude Code
Opendesk gives AI agents eyes and hands on your desktop via an MCP server with a custom SOM algorithm. Integrates with Claude Code or any agentic harness for mouse/keyboard control, learning, replay, and scheduling.

Alfred Beta Launches: Simplified OpenClaw Alternative for Non-Technical Users
Alfred is a new beta tool that provides approximately 70% of OpenClaw's functionality with significantly reduced complexity, featuring simple defaults for app connections, memory, usage modes, and infrastructure while allowing customization.