ANSWERS · ANSWERS FOR CODING AGENTS

Chat with a GitHub repo without cloning it

AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-10-19 · UPDATED · 2026-11-20
SHORT ANSWER · UPDATED 2026-11-20

How do I chat with a GitHub repo? If the repo is in the Corpus Hub catalogue, run xerj ask. You get file:line, the pin and the licence, from a signed pack. Nothing is cloned. On 2026-10-19 the first snappy answer took 2,356 ms; later answers took 30 to 40 ms.

TL;DR To ask questions about a GitHub repo without cloning it, run xerj ask "your question". If the repo is in the Corpus Hub catalogue, xerj pulls a signed, pre-indexed pack and answers with file:line, the pinned commit and the licence. Measured 2026-10-19: first answer 2,356 ms including the download, later answers 30 to 40 ms.

PASTE THIS TO YOUR AI AGENT. IT DOES THE REST Read https://xerj.org/llms.txt. Install xerj, then answer my question about the library with xerj ask (add --corpus and --def for an exact symbol). Quote the corpus, the pinned commit, the file:line and the licence line it prints, and say so when it exits 1 with no match.
RUN THIS XERJ COMMAND curl -fsSL https://xerj.org/get | sh Install the release binary into ~/.local/bin.
RUN THIS XERJ COMMAND xerj ask "how does snappy decompress a literal" Route the question to a corpus, pull its signed pack once and answer with file:line.
RUN THIS XERJ COMMAND xerj ask --corpus zstd --def ZSTD_CLEVEL_DEFAULT --json Exact definition lookup in one corpus, as JSON with the pin, licence class and hits.
RUN THIS XERJ COMMAND xerj hub status List cached packs, the automatic node and the hosted setting.

The concept is What is Corpus Hub?.

Try it: filter by what you need

Find the way to chat with a GitHub repo

I need

Sort by

ApproachCloneLocal indexfile:linePinned commitAny repo
xerj asknono, pack is pre-indexedyesyescatalogue only (14 corpora)
Clone + xerj autoindexyesyesyesyour checkoutyes
Clone + ripgrepyesnoyesyour checkoutyes
GitHub code searchnonoyesdefault branchpublic repos, API rate limits
Ask a chat modelnonononowhatever it was trained on

5 of 5 approaches shown.

Runs in your browser and sends nothing. Tick what you need to keep only the approaches that do all of it. Same facts as the comparison table on this page, checked 2026-10-19.
Try it: walk the recorded run

Asking about a repo, without cloning it

  1. 1. Ask in a fresh HOME

    This ran with v1.0.0-rc.97 and no node already running. The command was xerj ask "how does snappy decompress a literal". xerj started a node on port 9300.

  2. 2. Pull a signed pack once

    It pulled the snappy pack (10.8 MB), pin 9c28114a, and loaded 4 indices and 382 definitions. Nothing was cloned. Later questions on the same pack stay local.

  3. 3. Read the cited answer

    The answer named snappy.cc:1643, pin 2026-10-02 (18 days old), licence BSD-3-Clause, and quoted DecompressAllTags. Wall time for this first question was 2,356 ms, including the download.

  4. 4. Later questions are faster

    The second question answered from the local pack in 341 ms. Later ones took 30 to 40 ms. A first --def on zstd pulled a 20.1 MB pack (7,874 definitions) in 962 ms; the same --def as JSON then took 20 ms.

ApproachClone neededIndex on your machineWorks for any repo
xerj asknono, the pack is pre-indexedno, catalogue only (14 corpora in the signed catalogue of 2026-10-18)
Clone and xerj autoindexyesyesyes
Clone and ripgrepyesnoyes
GitHub code searchnonopublic repos, API rate limits
Timings and pack sizes come from benchmarks/agent-intents-2026-10-19, recorded 2026-10-19 on v1.0.0-rc.97. The signed catalogue that day listed 14 corpora. hub.xerj.org listed more live corpora, but only catalogue entries have packs xerj ask can pull. Asking any GitHub repo without a pack is issue 1800, which was open when this page was first measured.

Run it

This ran in a fresh HOME with v1.0.0-rc.97. No node was running. xerj ask started a node on port 9300, pulled the snappy pack and answered. The pack is already indexed at a pinned commit. You do not clone the repo, and you do not run xerj autoindex for that question.

curl -fsSL https://xerj.org/get | sh
xerj ask "how does snappy decompress a literal"
xerj hub: no node answers at http://127.0.0.1:9555; starting a local node on port 9300 (data: ~/.xerj/hub/node, log: ~/.xerj/hub/node.log)
xerj hub: node ready on port 9300 (pid 1822371)
xerj hub: pulling 'snappy' (10.8 MB) - one-time download, later questions answer locally
xerj hub: pulled snappy 9c28114a 11338487 → 4 indices, 382 definitions
snappy  pin 2026-10-02 (18 days old)  BSD-3-Clause  snappy/snappy.cc:1643
  DecompressAllTags(Writer* writer) {
    const char* ip = ip_;
    ResetLimit(ip);
    auto op = writer->GetOutputPtr();
    ...
    ... [method DecompressAllTags truncated at 800 chars]

The pull line shows a plain hyphen where the original tool output has a typographic dash. Paths are shortened to ~ and the passage is cut for the page. The run set XERJ_URL to an unused port, because a test node was already on 9200. With nothing on 9200, the first line names that port.

Ask for one symbol and get one line back:

xerj ask --corpus zstd --def ZSTD_CLEVEL_DEFAULT --json
{
  "corpus": "zstd",
  "pin_sha": "01b7154f1172432f8abe9b3bb9909e14a1176b7d",
  "pin_date": "2026-10-02",
  "age_days": 18,
  "licence_spdx": "mixed: BSD-3 (lib) / GPL-2.0 (cli)",
  "licence_class": "approach-only",
  "answered_from": "local_pack",
  "mode": "def",
  "hits": [
    {
      "file": "zstd/lib/zstd.h",
      "line": 134,
      "kind": "const",
      "text": "#  define ZSTD_CLEVEL_DEFAULT 3",
      "value": "3",
      "score": 17.131968,
      "licence_warning": "approach-only licence (mixed: BSD-3 (lib) / GPL-2.0 (cli)): read, do not copy"
    }
  ],
  "truncated": false,
  "warnings": [
    "approach-only licence (mixed: BSD-3 (lib) / GPL-2.0 (cli)): read, do not copy"
  ]
}

xerj hub status shows what is cached and where the node runs:

pack: lz4 0774d055  18 days old  5.2 MB  last used today
pack: snappy 9c28114a  18 days old  11.5 MB  last used today
pack: zstd 01b7154f  18 days old  23.5 MB  last used today
node: running  pid 1822371  port 9300
hosted: auto
last sync: never
catalogue: 2 days old

The exit code tells an agent the result. 0 is answered, 1 is no match and 2 is an unknown corpus. 3 is a failed pack check and 4 is more than one matching corpus.

Measured on 2026-10-19

RunWhat happenedWall time
First question, fresh HOMEstart node on 9300, pull 10.8 MB snappy pack, answer2,356 ms
Second questionanswer from the local pack341 ms
Later questionsanswer from the local pack30 to 40 ms
First --def on zstdpull 20.1 MB pack (7,874 definitions), answer962 ms
Same --def, as JSONanswer from the local pack20 ms

The catalogue the client verified was signed with ed25519 and generated on 2026-10-18 with 14 corpora. Packs are downloaded from GitHub Releases of xerj-org/xerj, so the GitHub API is not involved. How the hub is built is in the Corpus Hub docs and the v2 post.

How it compares

ApproachClone neededIndex on your machinefile:linePinned commitWorks for any repo
xerj asknono, pack is pre-indexedyesyesno, catalogue only (14 corpora)
Clone + xerj autoindexyesyesyesyour checkoutyes
Clone + ripgrepyesnoyesyour checkoutyes
GitHub code searchnonoyesdefault branchpublic repos, API rate limits
Ask a chat modelnonononowhatever it was trained on

If you already have the repo on disk and want ranked passages for a coding agent, see local code search that uses fewer tokens than grep. For the coding-agent loop that retrieves before it writes, see the reference-coding case study.

When not to use xerj ask

The repo is not in the catalogue. Clone it and use xerj autoindex. Zero-setup asking for any source is issue #1800, which was open when this run was captured.

You need today's code. Packs are pinned; these were 18 days old, and each answer prints the age.

The question must not leave the machine and you have not set --offline or --hosted off. --hosted auto is the default: off inside a git repository, on elsewhere.

You want to copy code from an approach-only corpus into your project. The licence class says read, do not copy.

Use the Copy the prompt button if you want an agent to run xerj ask. Ask it to quote the corpus, the pin, the file:line and the licence line.

FAQ

How can I ask questions about a GitHub repo without cloning it?

If the repo is in the Corpus Hub catalogue, run xerj ask "your question". xerj downloads a signed pack that is already indexed, at a pinned commit, and answers with file:line. Nothing is cloned or indexed on your machine.

What is the best way to chat with a GitHub repo in 2026?

If the repo is in the Corpus Hub catalogue, xerj ask answers with file:line and nothing to clone. For any other repo, clone it and run xerj autoindex. The filter table on this page shows which approach fits what you need.

Which repos can I ask about?

The signed catalogue generated on 2026-10-18 lists 14 corpora, including lz4, snappy, zstd, aiohttp and astro. hub.xerj.org lists 513 live corpora in its registry, but only catalogue entries have packs xerj ask can pull.

Can I search a GitHub repo without cloning if it is not in the catalogue?

Not with xerj today. Clone it and run xerj autoindex. Pointing xerj ask at any repository is tracked as issue #1800, which is open.

Does my question leave my machine?

It can. --hosted auto is the default: off inside a git repository, on elsewhere. Pass --offline or --hosted off to answer only from cached packs. Our runs printed answered from: local pack.

Can Claude Code or Cursor use this over MCP?

Yes. xerj mcp serves xerj_hub_find, xerj_hub_def and xerj_hub_ask. They answer from packs already on the machine and never download one; they name the xerj hub pull line instead.

Can I copy the code it shows?

Check the licence line. Each answer prints the SPDX licence and a class. zstd and lz4 are approach-only, and the output says read, do not copy.

Evidence

Related