whatisgithub

What is semble_rs?

johunsang/semble_rs — explained in plain English

Analysis updated 2026-05-18

86RustAudience · developerComplexity · 2/5Setup · easy

In one sentence

A Rust CLI tool that finds relevant code and compresses output so AI coding agents use far fewer tokens.

Mindmap

mindmap
  root((semble_rs))
    What it does
      Searches code with BM25 and embeddings
      Compresses directory trees
      Shrinks build and test output
    Tech stack
      Rust
      BM25
      Model2Vec
    Use cases
      Reduce tokens sent to an AI agent
      Find relevant code chunks fast
      Compress CI logs and test output
    Audience
      AI coding agent developers
      Developers on large codebases

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Search a large codebase for the chunks most relevant to a plain-English question

USE CASE 2

Replace a directory listing with a collapsed tree view to save tokens

USE CASE 3

Compress build and test output while preserving error messages and stack traces

USE CASE 4

See what other code would be affected if a given file changed

What is it built with?

RustBM25Model2Vec

How does it compare?

johunsang/semble_rskonippi/servo-fetchl0ng-ai/papr
Stars868788
LanguageRustRustRust
Setup difficultyeasyeasyeasy
Complexity2/53/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Single binary with no external services, API keys, or GPU required.

The README does not state a license.

So what is it?

semble_rs is a command-line code search tool written in Rust, designed specifically to help AI coding agents like Claude Code, Codex, and Cursor work more efficiently inside large codebases. The core problem it solves is that when an AI agent explores a codebase using standard tools like grep, cat, or ls, it sends enormous amounts of text back to the language model, consuming a huge number of tokens (the units that determine AI processing cost and context window limits) without necessarily finding the most relevant code. The tool addresses this with three main capabilities. The search command uses a hybrid approach combining BM25 (a keyword relevance algorithm) and static semantic embeddings from a model called Model2Vec to find the code chunks most relevant to a plain-English question, returning only the useful portions rather than entire files. The tree command replaces the standard directory listing, collapsing irrelevant folders like build outputs and node_modules to reduce what might be 400,000 characters down to 500, a reduction of up to 747 times. The digest command compresses build and test output from tools like cargo, pytest, and GitHub Actions by collapsing progress lines while always preserving error messages and stack traces, achieving up to 99 percent size reduction on real CI logs. It also includes a dependency graph feature showing what a file imports and what other code would be affected if it changed. The tool runs as a single binary with no external services, no API keys, and no GPU required. An AI coding agent or developer trying to reduce token usage when working with large repos would use this.

Copy-paste prompts

Prompt 1
Use semble_rs to search this codebase for code relevant to a specific question
Prompt 2
Show me how the tree command in this repo collapses irrelevant folders like node_modules
Prompt 3
Help me pipe my CI logs through the digest command in this repo to shrink them
Prompt 4
Explain how the dependency graph feature in semble_rs works for a given file

Frequently asked questions

What is semble_rs?

A Rust CLI tool that finds relevant code and compresses output so AI coding agents use far fewer tokens.

What language is semble_rs written in?

Mainly Rust. The stack also includes Rust, BM25, Model2Vec.

What license does semble_rs use?

The README does not state a license.

How hard is semble_rs to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is semble_rs for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.