â All postsâ Alle BeitrĂ€ge
One command turns any Git repository into a full RAG server for your AI IDE: keyword search that works with zero API keys, cited AI answers, code symbol lookup across five languages, and file outlines â all backed by persistent SQLite indexes and a locked-down sandbox.
Related reading: pipe-docs MCP â the same architecture, but hard-wired to the Pipe language docs · RAG in ~10 Lines â the minimal pattern this server generalizes
Our pipe_docs_server answers questions about Pipe itself. But the moment you work on a different project, you want the same experience there: point an AI agent at
any repository and let it search, read, and reason about the code without dumping files into context windows. That is exactly what
examples/repo_rag_server.pipe
does â one Pipe file, no dependencies beyond the docs-pipe
module (auto-fetched from the registry), published indexes, and a hardened sandbox.## đ Quickstart: 60 seconds to your own repo RAG
curl -fsSL https://raw.githubusercontent.com/MachuraHarry/pipe/master/install.sh | sh
export REPO_RAG_URL="https://github.com/your-user/your-repo"
pipe examples/repo_rag_server.pipe
The first run clones the repository shallowly, prunes junk directories, builds three persistent SQLite indexes, then locks itself into a read-only sandbox and serves MCP over stdio. Register it in your MCP client:
{
"mcpServers": {
"repo-rag": {
"command": "pipe",
"args": ["examples/repo_rag_server.pipe"],
"env": {
"REPO_RAG_URL": "https://github.com/your-user/your-repo",
"OPENROUTER_API_KEY": "sk-or-..."
}
}
}
}
curl -fsSL https://raw.githubusercontent.com/MachuraHarry/pipe/master/install.sh | sh
export REPO_RAG_URL="https://github.com/dein-user/dein-repo"
pipe examples/repo_rag_server.pipe
Der erste Lauf klont das Repository flach, entfernt Junk-Verzeichnisse, baut drei persistente SQLite-Indexe, verriegelt sich dann in eine Read-only-Sandbox und serviert MCP ĂŒber stdio. Registriere den Server in deinem MCP-Client:
{
"mcpServers": {
"repo-rag": {
"command": "pipe",
"args": ["examples/repo_rag_server.pipe"],
"env": {
"REPO_RAG_URL": "https://github.com/dein-user/dein-repo",
"OPENROUTER_API_KEY": "sk-or-..."
}
}
}
}
đ§° The tools: 11 ways into your codebase #
| Tool | Needs key | What it does |
|---|---|---|
search_docs(query) |
optional* | Markdown search across README, docs/, wikis â semantic hybrid with a key, keyword-only without |
ask_docs(question) |
yes | Cited RAG answer grounded in the documentation |
read_doc(path) |
no | Read any Markdown file |
list_docs() |
no | List all discovered .md /.mdx files |
search_code(query) |
no | Find functions, types, classes, structs, enums, tests in Go, Pipe, Python, JS/TS, Rust + generic fallback |
file_symbols(path) |
no | New: outline of ONE file â every indexed declaration with kind, name, line and declaration text |
read_source(path, offset) |
no | Source view with line numbers, paginated at 500 lines |
list_sources() |
no | All recognized source files |
repo_info() |
no | URL, ref, detected languages, readiness |
index_status() |
no | Index statistics + last sync counts |
refresh_index() |
no | Incremental re-sync from the cached checkout |
* keyword mode needs no key at all â the documentation of any public repo is searchable out of the box.
The typical agent loop looks like: list_sources
â file_symbols("pkg/server/handler.go")
to understand a file's structure â read_source
for the interesting region â search_code
when hunting for a name. Every answer stays small and targeted instead of flooding the context window.
| Tool | Key nötig | Was es tut |
|---|---|---|
search_docs(query) |
optional* | Markdown-Suche ĂŒber README, docs/, Wikis â semantisch-hybrid mit Key, sonst rein per Keyword |
ask_docs(question) |
ja | Zitierte RAG-Antwort auf Basis der Doku |
read_doc(path) |
nein | Beliebige Markdown-Datei lesen |
list_docs() |
nein | Alle gefundenen .md /.mdx -Dateien |
search_code(query) |
nein | Functions, Types, Classes, Structs, Enums, Tests in Go, Pipe, Python, JS/TS, Rust + generischem Fallback |
file_symbols(path) |
nein | Neu: Outline einer Datei â jede indizierte Deklaration mit Art, Name, Zeile und Deklarationstext |
read_source(path, offset) |
nein | Quellcode-Ansicht mit Zeilennummern, paginiert Ă 500 Zeilen |
list_sources() |
nein | Alle erkannten Quelldateien |
repo_info() |
nein | URL, Ref, erkannte Sprachen, Bereitschaft |
index_status() |
nein | Index-Statistiken + letzte Sync-Counts |
refresh_index() |
nein | Inkrementeller Re-Sync aus dem gecachten Checkout |
* Der Keyword-Modus braucht gar keinen Key â die Doku jedes öffentlichen Repos ist damit out-of-the-box durchsuchbar.
Die typische Agent-Schleife: list_sources
â file_symbols("pkg/server/handler.go")
zum Verstehen der Dateistruktur â read_source
fĂŒr die interessante Region â search_code
bei der Jagd nach einem Namen. Jede Antwort bleibt klein und gezielt, statt das Kontextfenster zu fluten.
âïž Under the hood: three SQLite indexes, zero re-indexing pain #
On startup the server builds up to three persistent databases in its cache directory:
â every declaration (function, class, struct, enum, test) with file, line range, language and source text. Synced incrementally: each file's SHA-256 decides whether it gets rescanned, so a warm start costs a few hash checks.code.db
â heading-aware Markdown chunks for keyword retrieval. Works withdocs-kw.db
no API key whatsoever; scores weight heading hits 3Ă and normalize by query token count so single-hit chunks don't truncate to zero.â semantic embedding index viadocs.db
docs-pipe
, only built when a provider with an embeddings endpoint is configured.
Persistence has one subtlety: the pure-Pipe sqlite module flushes on db_close
, while serve handles stay open for the process lifetime. The server therefore runs each index through a throwaway build handle whose close persists, then reopens a serving handle â and if the filesystem is already read-only at that point, a try/catch
falls back to in-memory resync. A killed process loses nothing; a restart reports unchanged: N
instead of re-indexing.
Beim Start baut der Server bis zu drei persistente Datenbanken in seinem Cache-Verzeichnis:
â jede Deklaration (Funktion, Klasse, Struct, Enum, Test) mit Datei, Zeilenbereich, Sprache und Quelltext. Inkrementell synchronisiert: Der SHA-256 jeder Datei entscheidet ĂŒber einen Rescan â ein Warm Start kostet nur wenige Hash-PrĂŒfungen.code.db
â Heading-bewusste Markdown-Chunks fĂŒr Keyword-Retrieval. Funktioniertdocs-kw.db
ganz ohne API-Key; Scores gewichten Heading-Treffer 3Ă und normalisieren ĂŒber die Query-Token, sodass Ein-Treffer-Chunks nicht auf Score 0 abschneiden.â semantischer Embedding-Index viadocs.db
docs-pipe
, nur gebaut wenn ein Provider mit Embeddings-Endpunkt konfiguriert ist.
Bei der Persistenz gibt es einen Kniff: Das Pure-Pipe-sqlite-Modul flushed bei db_close
, wÀhrend Serve-Handles prozesslang offen bleiben. Deshalb lÀuft jeder Index durch einen Wegwerf-Build-Handle, dessen close
persistiert, danach wird ein frisches Serve-Handle geöffnet â und wenn das Filesystem zu dem Zeitpunkt schon read-only ist, fĂ€ngt ein try/catch
das mit In-Memory-Resync ab. Ein gekillter Prozess verliert nichts; ein Neustart meldet unchanged: N
statt neu zu indizieren.
đ Security: least privilege by construction #
An MCP server that clones arbitrary repositories must be paranoid. The server declares two sandbox profiles and locks the harder one before serving:
(startup): filesystem full, exec restricted torag-build
git
andrm
, network limited to Git hosts and AI provider APIs. The repository URL is validated against a strict character allowlist before it ever touches a shell command.(locked): filesystem read-only, exec completely disabled, network narrowed to the configured AI providers. Even a prompt-injected model cannot write files, run commands, or phone home elsewhere.rag-serve
Path arguments pass through a resolver gate that rejects absolute paths and ..
traversal, so read_source("/etc/passwd")
fails cleanly.
Ein MCP-Server, der beliebige Repositories klont, muss paranoid sein. Der Server deklariert zwei Sandbox-Profile und verriegelt das hÀrtere, bevor er serviert:
(Startup): Filesystem voll, exec aufrag-build
git
undrm
beschrĂ€nkt, Netz auf Git-Hosts und AI-Provider-APIs begrenzt. Die Repository-URL wird vor jedem Shell-Kontakt gegen eine strikte Zeichen-Allowlist validiert.(verriegelt): Filesystem read-only, exec komplett deaktiviert, Netz auf die konfigurierten AI-Provider eingedampft. Selbst ein prompt-injiziertes Modell kann keine Dateien schreiben, keine Kommandos ausfĂŒhren und nirgendwohin telefonieren.rag-serve
Pfad-Argumente laufen durch ein Resolver-Gate, das absolute Pfade und ..
-Traversal ablehnt â read_source("/etc/passwd")
scheitert sauber.
đ€ AI providers: including OpenRouter free models #
Any of three keys enables the AI tier:
/DEEPSEEK_API_KEY
â full experience: semantic hybridOPENAI_API_KEY
search_docs
plus groundedask_docs
.â chat completions through OpenRouter, ideal with the free tier. SetOPENROUTER_API_KEY
REPO_RAG_MODEL
to pick a model (defaultnvidia/nemotron-3-super-120b-a12b:free
; browse others with the:free
suffix).
One honest caveat: OpenRouter exposes no embeddings endpoint, so the semantic layer stays dormant there. Instead of letting answers degrade to general knowledge, ask_docs
detects empty semantic retrieval and falls back to the keyword chunk index â answers remain grounded in the actual repository with numbered citations:
{
"answer": "Widgets are components or concepts described as great in the Alpha Doc [1] and explored in detailâincluding their lifecycle and tipsâin the Beta Doc [2].",
"sources": [
{ "path": "a.md", "score": 0.4, "line_start": 1 },
{ "path": "b.md", "score": 0.2, "line_start": 1 }
]
}
Real output from a live test against a two-file fixture repository, produced by a free-tier model. Free models share an upstream rate-limit pool, so expect occasional 429s â pick another :free
slug via REPO_RAG_MODEL
or retry shortly.
Drei Keys schalten die KI-Ebene frei:
/DEEPSEEK_API_KEY
â das volle Erlebnis: semantisch-hybridesOPENAI_API_KEY
search_docs
plus groundedask_docs
.â Chat-Completions ĂŒber OpenRouter, ideal fĂŒr den Free-Tier. MitOPENROUTER_API_KEY
REPO_RAG_MODEL
wÀhlst du das Modell (Defaultnvidia/nemotron-3-super-120b-a12b:free
; weitere mit:free
-Suffix).
Ein ehrlicher Hinweis: OpenRouter bietet keinen Embeddings-Endpunkt, dort bleibt also die semantische Ebene auĂen vor. Statt Antworten aufs Allgemeinwissen abrutschen zu lassen, erkennt ask_docs
die leere semantische Treffermenge und fĂ€llt auf den Keyword-Chunks-Index zurĂŒck â Antworten bleiben im echten Repository verankert, mit nummerierten Zitationen (siehe JSON-Beispiel oben).
Echte Ausgabe eines Live-Tests gegen ein Zwei-Dateien-Fixture-Repo, produziert von einem Free-Tier-Model. Free-Models teilen sich einen Upstream-Rate-Limit-Pool â gelegentliche 429s sind normal: entweder kurz warten oder ĂŒber REPO_RAG_MODEL
einen anderen :free
-Slug wÀhlen.
â Quality: parity-tested, not vibes-tested #
The server ships with a 41-test suite (scripts/repo-rag-code-index-test.pipe
) covering chunking, syncing, searching and persistence. The suite runs byte-identically under the tree-walker and the bytecode VM â which is not a given: getting there surfaced and fixed four real engine bugs (module symbol isolation, a while-body terminator defect, builtin masking in module scope, and double-emitted index operands). The server itself was smoke-tested end-to-end over stdio JSON-RPC: cold start, warm start, cited AI answers against a live OpenRouter key, sandbox-locked refreshes.
Der Server kommt mit einer 41-Test-Suite (scripts/repo-rag-code-index-test.pipe
): Chunking, Sync, Suche und Persistenz. Sie lĂ€uft byte-identisch unter dem Tree-Walker und der Bytecode-VM â was nicht selbstverstĂ€ndlich ist: Auf dem Weg dorthin kamen vier echte Engine-Bugs ans Licht (Modul-Symbol-Isolation, ein While-Body-Terminator-Defekt, Builtin-Masking im Modul-Scope und doppelt emittierte Index-Operanden). Der Server selbst wurde End-to-End per stdio-JSON-RPC gesmoket: Cold Start, Warm Start, zitierte KI-Antworten gegen einen echten OpenRouter-Key, Sandbox-verriegelte Refreshes.
đșïž Try it #
Everything lives in the repository:
-
Server:
examples/repo_rag_server.pipe -
Library:
examples/lib/repo_rag_lib.pipe -
Test suite:
scripts/repo-rag-code-index-test.pipe -
Docs: MCP chapter §25.8 in
docs/en/25-mcp.md
Clone Pipe, export REPO_RAG_URL
, run the server, and give your AI IDE eyes into any codebase. If you build something with it â or want more tools (reference search? git-log integration?) â issues and PRs are welcome.
Alles liegt im Repository:
-
Server:
examples/repo_rag_server.pipe -
Bibliothek:
examples/lib/repo_rag_lib.pipe -
Test-Suite:
scripts/repo-rag-code-index-test.pipe -
Doku: MCP-Kapitel §25.8 in
docs/de/25-mcp.md
Pipe klonen, REPO_RAG_URL
exportieren, Server starten â und deiner KI-IDE Augen in jede Codebase geben. Wenn du etwas damit baust â oder mehr Tools willst (Referenzsuche? git-log-Integration?) â Issues und PRs sind willkommen.
Ein Befehl verwandelt ein beliebiges Git-Repository in einen vollwertigen RAG-Server fĂŒr deine KI-IDE: Keyword-Suche ganz ohne API-Key, zitierte KI-Antworten, Code-Symbol-Lookup in fĂŒnf Sprachen und File-Outlines â alles auf persistenten SQLite-Indexen und in einer verriegelten Sandbox.
Weiterlesen: pipe-docs MCP â dieselbe Architektur, aber fest auf die Pipe-Doku verdrahtet · RAG in ~10 Zeilen â das minimale Muster, das dieser Server verallgemeinert
Unser pipe_docs_server beantwortet Fragen zu Pipe selbst. Aber sobald du an einem anderen Projekt arbeitest, willst du dort dasselbe Erlebnis: einen KI-Agenten auf
ein beliebiges Repository zeigen lassen und ihn suchen, lesen und ĂŒber den Code nachdenken lassen â ohne Dateien in Kontextfenster zu kippen. Genau das macht
examples/repo_rag_server.pipe
: eine Pipe-Datei, keine AbhĂ€ngigkeiten auĂer dem docs-pipe
-Modul (holt sich der Registry automatisch), publizierte Indexe und eine gehÀrtete Sandbox.
curl -fsSL https://raw.githubusercontent.com/MachuraHarry/pipe/master/install.sh | sh
export REPO_RAG_URL="https://github.com/your-user/your-repo"
pipe examples/repo_rag_server.pipe
The first run clones the repository shallowly, prunes junk directories, builds three persistent SQLite indexes, then locks itself into a read-only sandbox and serves MCP over stdio. Register it in your MCP client:
{
"mcpServers": {
"repo-rag": {
"command": "pipe",
"args": ["examples/repo_rag_server.pipe"],
"env": {
"REPO_RAG_URL": "https://github.com/your-user/your-repo",
"OPENROUTER_API_KEY": "sk-or-..."
}
}
}
}
đ Quickstart: In 60 Sekunden zum eigenen Repo-RAG #
curl -fsSL https://raw.githubusercontent.com/MachuraHarry/pipe/master/install.sh | sh
export REPO_RAG_URL="https://github.com/dein-user/dein-repo"
pipe examples/repo_rag_server.pipe
Der erste Lauf klont das Repository flach, entfernt Junk-Verzeichnisse, baut drei persistente SQLite-Indexe, verriegelt sich dann in eine Read-only-Sandbox und serviert MCP ĂŒber stdio. Registriere den Server in deinem MCP-Client:
{
"mcpServers": {
"repo-rag": {
"command": "pipe",
"args": ["examples/repo_rag_server.pipe"],
"env": {
"REPO_RAG_URL": "https://github.com/dein-user/dein-repo",
"OPENROUTER_API_KEY": "sk-or-..."
}
}
}
}
| Tool | Needs key | What it does |
|---|---|---|
search_docs(query) |
optional* | Markdown search across README, docs/, wikis â semantic hybrid with a key, keyword-only without |
ask_docs(question) |
yes | Cited RAG answer grounded in the documentation |
read_doc(path) |
no | Read any Markdown file |
list_docs() |
no | List all discovered .md /.mdx files |
search_code(query) |
no | Find functions, types, classes, structs, enums, tests in Go, Pipe, Python, JS/TS, Rust + generic fallback |
file_symbols(path) |
no | New: outline of ONE file â every indexed declaration with kind, name, line and declaration text |
read_source(path, offset) |
no | Source view with line numbers, paginated at 500 lines |
list_sources() |
no | All recognized source files |
repo_info() |
no | URL, ref, detected languages, readiness |
index_status() |
no | Index statistics + last sync counts |
refresh_index() |
no | Incremental re-sync from the cached checkout |
* keyword mode needs no key at all â the documentation of any public repo is searchable out of the box.
The typical agent loop looks like: list_sources
â file_symbols("pkg/server/handler.go")
to understand a file's structure â read_source
for the interesting region â search_code
when hunting for a name. Every answer stays small and targeted instead of flooding the context window.
đ§° Die Tools: 11 Wege in deine Codebase #
| Tool | Key nötig | Was es tut |
|---|---|---|
search_docs(query) |
optional* | Markdown-Suche ĂŒber README, docs/, Wikis â semantisch-hybrid mit Key, sonst rein per Keyword |
ask_docs(question) |
ja | Zitierte RAG-Antwort auf Basis der Doku |
read_doc(path) |
nein | Beliebige Markdown-Datei lesen |
list_docs() |
nein | Alle gefundenen .md /.mdx -Dateien |
search_code(query) |
nein | Functions, Types, Classes, Structs, Enums, Tests in Go, Pipe, Python, JS/TS, Rust + generischem Fallback |
file_symbols(path) |
nein | Neu: Outline einer Datei â jede indizierte Deklaration mit Art, Name, Zeile und Deklarationstext |
read_source(path, offset) |
nein | Quellcode-Ansicht mit Zeilennummern, paginiert Ă 500 Zeilen |
list_sources() |
nein | Alle erkannten Quelldateien |
repo_info() |
nein | URL, Ref, erkannte Sprachen, Bereitschaft |
index_status() |
nein | Index-Statistiken + letzte Sync-Counts |
refresh_index() |
nein | Inkrementeller Re-Sync aus dem gecachten Checkout |
* Der Keyword-Modus braucht gar keinen Key â die Doku jedes öffentlichen Repos ist damit out-of-the-box durchsuchbar.
Die typische Agent-Schleife: list_sources
â file_symbols("pkg/server/handler.go")
zum Verstehen der Dateistruktur â read_source
fĂŒr die interessante Region â search_code
bei der Jagd nach einem Namen. Jede Antwort bleibt klein und gezielt, statt das Kontextfenster zu fluten.
On startup the server builds up to three persistent databases in its cache directory:
â every declaration (function, class, struct, enum, test) with file, line range, language and source text. Synced incrementally: each file's SHA-256 decides whether it gets rescanned, so a warm start costs a few hash checks.code.db
â heading-aware Markdown chunks for keyword retrieval. Works withdocs-kw.db
no API key whatsoever; scores weight heading hits 3Ă and normalize by query token count so single-hit chunks don't truncate to zero.â semantic embedding index viadocs.db
docs-pipe
, only built when a provider with an embeddings endpoint is configured.
Persistence has one subtlety: the pure-Pipe sqlite module flushes on db_close
, while serve handles stay open for the process lifetime. The server therefore runs each index through a throwaway build handle whose close persists, then reopens a serving handle â and if the filesystem is already read-only at that point, a try/catch
falls back to in-memory resync. A killed process loses nothing; a restart reports unchanged: N
instead of re-indexing.
âïž Unter der Haube: drei SQLite-Indexe, kein Re-Indexierungs-Stress #
Beim Start baut der Server bis zu drei persistente Datenbanken in seinem Cache-Verzeichnis:
â jede Deklaration (Funktion, Klasse, Struct, Enum, Test) mit Datei, Zeilenbereich, Sprache und Quelltext. Inkrementell synchronisiert: Der SHA-256 jeder Datei entscheidet ĂŒber einen Rescan â ein Warm Start kostet nur wenige Hash-PrĂŒfungen.code.db
â Heading-bewusste Markdown-Chunks fĂŒr Keyword-Retrieval. Funktioniertdocs-kw.db
ganz ohne API-Key; Scores gewichten Heading-Treffer 3Ă und normalisieren ĂŒber die Query-Token, sodass Ein-Treffer-Chunks nicht auf Score 0 abschneiden.â semantischer Embedding-Index viadocs.db
docs-pipe
, nur gebaut wenn ein Provider mit Embeddings-Endpunkt konfiguriert ist.
Bei der Persistenz gibt es einen Kniff: Das Pure-Pipe-sqlite-Modul flushed bei db_close
, wÀhrend Serve-Handles prozesslang offen bleiben. Deshalb lÀuft jeder Index durch einen Wegwerf-Build-Handle, dessen close
persistiert, danach wird ein frisches Serve-Handle geöffnet â und wenn das Filesystem zu dem Zeitpunkt schon read-only ist, fĂ€ngt ein try/catch
das mit In-Memory-Resync ab. Ein gekillter Prozess verliert nichts; ein Neustart meldet unchanged: N
statt neu zu indizieren.
An MCP server that clones arbitrary repositories must be paranoid. The server declares two sandbox profiles and locks the harder one before serving:
(startup): filesystem full, exec restricted torag-build
git
andrm
, network limited to Git hosts and AI provider APIs. The repository URL is validated against a strict character allowlist before it ever touches a shell command.(locked): filesystem read-only, exec completely disabled, network narrowed to the configured AI providers. Even a prompt-injected model cannot write files, run commands, or phone home elsewhere.rag-serve
Path arguments pass through a resolver gate that rejects absolute paths and ..
traversal, so read_source("/etc/passwd")
fails cleanly.
đ Sicherheit: Least Privilege by Construction #
Ein MCP-Server, der beliebige Repositories klont, muss paranoid sein. Der Server deklariert zwei Sandbox-Profile und verriegelt das hÀrtere, bevor er serviert:
(Startup): Filesystem voll, exec aufrag-build
git
undrm
beschrĂ€nkt, Netz auf Git-Hosts und AI-Provider-APIs begrenzt. Die Repository-URL wird vor jedem Shell-Kontakt gegen eine strikte Zeichen-Allowlist validiert.(verriegelt): Filesystem read-only, exec komplett deaktiviert, Netz auf die konfigurierten AI-Provider eingedampft. Selbst ein prompt-injiziertes Modell kann keine Dateien schreiben, keine Kommandos ausfĂŒhren und nirgendwohin telefonieren.rag-serve
Pfad-Argumente laufen durch ein Resolver-Gate, das absolute Pfade und ..
-Traversal ablehnt â read_source("/etc/passwd")
scheitert sauber.
Any of three keys enables the AI tier:
/DEEPSEEK_API_KEY
â full experience: semantic hybridOPENAI_API_KEY
search_docs
plus groundedask_docs
.â chat completions through OpenRouter, ideal with the free tier. SetOPENROUTER_API_KEY
REPO_RAG_MODEL
to pick a model (defaultnvidia/nemotron-3-super-120b-a12b:free
; browse others with the:free
suffix).
One honest caveat: OpenRouter exposes no embeddings endpoint, so the semantic layer stays dormant there. Instead of letting answers degrade to general knowledge, ask_docs
detects empty semantic retrieval and falls back to the keyword chunk index â answers remain grounded in the actual repository with numbered citations:
{
"answer": "Widgets are components or concepts described as great in the Alpha Doc [1] and explored in detailâincluding their lifecycle and tipsâin the Beta Doc [2].",
"sources": [
{ "path": "a.md", "score": 0.4, "line_start": 1 },
{ "path": "b.md", "score": 0.2, "line_start": 1 }
]
}
Real output from a live test against a two-file fixture repository, produced by a free-tier model. Free models share an upstream rate-limit pool, so expect occasional 429s â pick another :free
slug via REPO_RAG_MODEL
or retry shortly.
đ€ AI-Provider: inklusive OpenRouter-Free-Models #
Drei Keys schalten die KI-Ebene frei:
/DEEPSEEK_API_KEY
â das volle Erlebnis: semantisch-hybridesOPENAI_API_KEY
search_docs
plus groundedask_docs
.â Chat-Completions ĂŒber OpenRouter, ideal fĂŒr den Free-Tier. MitOPENROUTER_API_KEY
REPO_RAG_MODEL
wÀhlst du das Modell (Defaultnvidia/nemotron-3-super-120b-a12b:free
; weitere mit:free
-Suffix).
Ein ehrlicher Hinweis: OpenRouter bietet keinen Embeddings-Endpunkt, dort bleibt also die semantische Ebene auĂen vor. Statt Antworten aufs Allgemeinwissen abrutschen zu lassen, erkennt ask_docs
die leere semantische Treffermenge und fĂ€llt auf den Keyword-Chunks-Index zurĂŒck â Antworten bleiben im echten Repository verankert, mit nummerierten Zitationen (siehe JSON-Beispiel oben).
Echte Ausgabe eines Live-Tests gegen ein Zwei-Dateien-Fixture-Repo, produziert von einem Free-Tier-Model. Free-Models teilen sich einen Upstream-Rate-Limit-Pool â gelegentliche 429s sind normal: entweder kurz warten oder ĂŒber REPO_RAG_MODEL
einen anderen :free
-Slug wÀhlen.
The server ships with a 41-test suite (scripts/repo-rag-code-index-test.pipe
) covering chunking, syncing, searching and persistence. The suite runs byte-identically under the tree-walker and the bytecode VM â which is not a given: getting there surfaced and fixed four real engine bugs (module symbol isolation, a while-body terminator defect, builtin masking in module scope, and double-emitted index operands). The server itself was smoke-tested end-to-end over stdio JSON-RPC: cold start, warm start, cited AI answers against a live OpenRouter key, sandbox-locked refreshes.
â QualitĂ€t: ParitĂ€t statt Vibes #
Der Server kommt mit einer 41-Test-Suite (scripts/repo-rag-code-index-test.pipe
): Chunking, Sync, Suche und Persistenz. Sie lĂ€uft byte-identisch unter dem Tree-Walker und der Bytecode-VM â was nicht selbstverstĂ€ndlich ist: Auf dem Weg dorthin kamen vier echte Engine-Bugs ans Licht (Modul-Symbol-Isolation, ein While-Body-Terminator-Defekt, Builtin-Masking im Modul-Scope und doppelt emittierte Index-Operanden). Der Server selbst wurde End-to-End per stdio-JSON-RPC gesmoket: Cold Start, Warm Start, zitierte KI-Antworten gegen einen echten OpenRouter-Key, Sandbox-verriegelte Refreshes.
Everything lives in the repository:
-
Server:
examples/repo_rag_server.pipe -
Library:
examples/lib/repo_rag_lib.pipe -
Test suite:
scripts/repo-rag-code-index-test.pipe -
Docs: MCP chapter §25.8 in
docs/en/25-mcp.md
Clone Pipe, export REPO_RAG_URL
, run the server, and give your AI IDE eyes into any codebase. If you build something with it â or want more tools (reference search? git-log integration?) â issues and PRs are welcome.
đșïž Ausprobieren #
Alles liegt im Repository:
-
Server:
examples/repo_rag_server.pipe -
Bibliothek:
examples/lib/repo_rag_lib.pipe -
Test-Suite:
scripts/repo-rag-code-index-test.pipe -
Doku: MCP-Kapitel §25.8 in
docs/de/25-mcp.md
Pipe klonen, REPO_RAG_URL
exportieren, Server starten â und deiner KI-IDE Augen in jede Codebase geben. Wenn du etwas damit baust â oder mehr Tools willst (Referenzsuche? git-log-Integration?) â Issues und PRs sind willkommen.