{"repo":"horiacristescu/nub","free":true,"listed":false,"github":"https://github.com/horiacristescu/nub","clone":"git clone https://github.com/horiacristescu/nub.git","description":null,"language":"Python","stars":27,"topics":["agentic-search","ai-agents","claude-code","cli-tool","code-exploration","context-window","level-of-detail","llm-tools","python","rag-alternative"],"license":"MIT","category":"ai-agents","readme_excerpt":"Nub Structure-aware compression for AI agents. Any content, any size, fit to a budget. Agents have to work through large, messy artifacts: entire repositories, long logs, chat sessions, and sprawling codebases. But their context windows are limited. Chunking for retrieval breaks structure. Head-and-tail summaries strip away meaning. What's left is often fragments without a sense of how they fit together. Nub approaches the problem differently. It compresses any content to a fixed character budget while keeping the structure that actually matters. Code retains its function signatures, folders still show meaningful previews, and markdown keeps its headings. An agent can skim at 100:1 to get oriented, then zoom to full detail where needed. It works less like a summary and more like a map — Google Maps, but for text. Install Requires Python 3.11+. Zero runtime dependencies. Quick start Compress a Python file (604 lines down to a structural overview): The --shape flag controls the output geometry: 80:8 means 80 characters wide, 8 lines tall. The budget is width height characters. How it works Nub parses content into a tree, scores each node by position, topology, and optional grep relevance, then allocates the character budget proportionally using softmax. As budget shrinks, detail degrades gracefully through four levels: - Focus (1:1) — full source, nothing removed - Detailed (2:1) — signatures with body sketches - Regional (10:1) — signatures and docstrings - Overview (100:1) — ","default_branch":null,"files":null,"tree":[],"storefront":"/r/horiacristescu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/horiacristescu/nub/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}