ranxianglei/billion-contextPublic

A context-compression plugin for month-long single sessions (billions of tokens) and small context windows (a 100K context is enough), billion-context is all you need .

AI summary: A context-compression plugin that acts as a proxy between AI coding agents and LLM APIs, enabling unlimited sessions.

Stars
8.6K
+348 today
Forks
702
Watchers
16
Open issues
949
Open PRs
623
Contributors
~197
Commits
10.1K
Branches
2K
Views (30d)
27

TypeScriptOtherCreated Aug 6, 2026Last push 4d agoLatest release v0.1.216+663 stars this week+5.3K this month

Quick answers

What is billion-context?
A context-compression plugin that acts as a proxy between AI coding agents and LLM APIs, enabling unlimited sessions.
What does billion-context do?
Billion-context acts as a proxy between any AI coding agent and LLM APIs like Anthropic or OpenAI to manage large context windows. It prevents context bloat during long coding sessions by incrementally compressing past interactions into high-fidelity summaries. The tool injects context-management commands that the model uses to compress, decompress, or search through history automatically. This hierarchical compression allows a single session to handle billions of tokens over days without losing essential details. Crucially, the compression is reversible, keeping prefix caching effective while saving significant token costs.
Who is billion-context for?
Developers and teams utilizing AI coding agents for extensive or longitudinal projects. It is essential for those running up against LLM context limits or looking to optimize API costs without sacrificing project state.
How do I get started with billion-context?
bili pi
How popular is billion-context on GitHub?
ranxianglei/billion-context has 8,631 stars and 702 forks on GitHub, and gained 663 stars in the last 7 days.
What license does billion-context use?
ranxianglei/billion-context is released under the Other license.

Star history

since Oct 10, 2026
02.5K5K7.5KOct 2026Oct 2026Nov 2026Nov 2026
8.6K stars as of Nov 28, 2026. Measured daily since Oct 10, 2026; GitHub no longer exposes earlier star timestamps.

Update history

8 recorded
  • Nov 28, 2026New release v0.1.216 (previously v0.1.215).
  • Nov 16, 2026New release v0.1.215 (previously v0.1.212).
  • Nov 16, 2026Description changed from "A context-compression plugin for month-long single sessions (billions of tokens) and small context windows (a 100K cont" to "A context-compression plugin for month-long single sessions (billions of tokens) and small context windows (a 100K cont".
  • Nov 12, 2026Description changed from "A context-compression plugin for month-long single sessions (billions of tokens) ,small context windows (a 100K context " to "A context-compression plugin for month-long single sessions (billions of tokens) and small context windows (a 100K cont".
  • Nov 3, 2026New release v0.1.212 (previously v0.1.205).
  • Oct 23, 2026New release v0.1.205 (previously v0.1.191).
  • Oct 20, 2026Description changed from "A context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and " to "A context-compression plugin for month-long single sessions (billions of tokens) ,small context windows (a 100K context ".
  • Oct 10, 2026Description changed from "稳定可用 A context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens)," to "A context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and ".

Contribution activity

commits per day, last 52 weeks
NovDecJanFebMarAprMayJunJulAugSepOctNovMonWedFri2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 0 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 0 commits2026-08-06: 11 commits2026-08-07: 8 commits2026-08-08: 148 commits2026-08-09: 56 commits2026-08-10: 46 commits2026-08-11: 57 commits2026-08-12: 30 commits2026-08-13: 11 commits2026-08-14: 15 commits2026-08-15: 15 commits2026-08-16: 11 commits2026-08-17: 8 commits2026-08-18: 1 commit2026-08-19: 9 commits2026-08-20: 1 commit2026-08-21: 15 commits2026-08-22: 16 commits2026-08-23: 17 commits2026-08-24: 19 commits2026-08-25: 27 commits2026-08-26: 11 commits2026-08-27: 4 commits2026-08-28: 14 commits2026-08-29: 20 commits2026-08-30: 13 commits2026-08-31: 10 commits2026-09-01: 8 commits2026-09-02: 4 commits2026-09-03: 62 commits2026-09-04: 26 commits2026-09-05: 27 commits2026-09-06: 29 commits2026-09-07: 51 commits2026-09-08: 7 commits2026-09-09: 3 commits2026-09-10: 18 commits2026-09-11: 16 commits2026-09-12: 13 commits2026-09-13: 7 commits2026-09-14: 14 commits2026-09-15: 24 commits2026-09-16: 12 commits2026-09-17: 29 commits2026-09-18: 29 commits2026-09-19: 32 commits2026-09-20: 54 commits2026-09-21: 11 commits2026-09-22: 25 commits2026-09-23: 24 commits2026-09-24: 46 commits2026-09-25: 54 commits2026-09-26: 70 commits2026-09-27: 81 commits2026-09-28: 29 commits2026-09-29: 31 commits2026-09-30: 17 commits2026-10-01: 62 commits2026-10-02: 38 commits2026-10-03: 53 commits2026-10-04: 83 commits2026-10-05: 49 commits2026-10-06: 65 commits2026-10-07: 58 commits2026-10-08: 38 commits2026-10-09: 41 commits2026-10-10: 84 commits2026-10-11: 169 commits2026-10-12: 94 commits2026-10-13: 104 commits2026-10-14: 75 commits2026-10-15: 55 commits2026-10-16: 54 commits2026-10-17: 89 commits2026-10-18: 62 commits2026-10-19: 62 commits2026-10-20: 105 commits2026-10-21: 65 commits2026-10-22: 26 commits2026-10-23: 65 commits2026-10-24: 99 commits2026-10-25: 57 commits2026-10-26: 42 commits2026-10-27: 47 commits2026-10-28: 40 commits2026-10-29: 41 commits2026-10-30: 38 commits2026-10-31: 89 commits2026-11-01: 60 commits2026-11-02: 24 commits2026-11-03: 26 commits2026-11-04: 21 commits2026-11-05: 40 commits2026-11-06: 35 commits2026-11-07: 66 commits2026-11-08: 90 commits2026-11-09: 70 commits2026-11-10: 68 commits2026-11-11: 65 commits2026-11-12: 46 commits2026-11-13: 69 commits2026-11-14: 236 commits2026-11-15: 67 commits2026-11-16: 61 commits2026-11-17: 38 commits2026-11-18: 57 commits2026-11-19: 19 commits2026-11-20: 62 commits2026-11-21: 51 commits2026-11-22: 54 commits2026-11-23: 79 commits2026-11-24: 122 commits2026-11-25: 34 commits2026-11-26: 37 commits2026-11-27: 27 commits2026-11-28: 9 commits
5,128 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Breakout launch

    8,631 stars in 118 days

  • Rising fast

    +663 stars this week

  • Very active

    5,128 commits in 52 weeks

  • Community-driven

    ~197 contributors

  • Continuous integration

    Automated checks passing

  • Repeat trending

    14 trending appearances

What billion-context does

Billion-context acts as a proxy between any AI coding agent and LLM APIs like Anthropic or OpenAI to manage large context windows. It prevents context bloat during long coding sessions by incrementally compressing past interactions into high-fidelity summaries. The tool injects context-management commands that the model uses to compress, decompress, or search through history automatically. This hierarchical compression allows a single session to handle billions of tokens over days without losing essential details. Crucially, the compression is reversible, keeping prefix caching effective while saving significant token costs.

Developers and teams utilizing AI coding agents for extensive or longitudinal projects. It is essential for those running up against LLM context limits or looking to optimize API costs without sacrificing project state.

  • Incremental compression: Compresses past conversations incrementally to keep token consumption manageable without arbitrary truncation.
  • Reversible summaries: Allows models to restore exact details from summarized historical ranges when needed.
  • Prefix-cache compatibility: Maintains a healthy 95-97% prefix-cache hit rate, keeping compression overhead under 2%.
  • Model-driven management: Provides tools like compress, decompress, and search_context directly to the LLM to manage its own context.
  • Universal agent support: Sits cleanly between numerous coding agents (like Claude Code, Cursor, Aider) and the backend API.

Where teams use it

Long-running coding sessions

Extend a single AI coding agent session across multiple days without exhausting the model's context window.

Cost reduction

Minimize token expenditure on large context histories by actively compressing older messages while retaining high-level knowledge.

Agent integration

Plug into existing tools like pi, opencode, or Cursor simply by rewriting their base URL to point at the proxy.

Context retrieval

Allow the LLM to perform keyword searches over compressed summaries when it needs to recall specific historical details.

Getting started: bili pi

README

master branch

billion-context

English | 中文 | 日本語 | 한국어

Context-compression plugin — billion-context is all you need.

small context windows (100K is enough) · 5× fewer tokens · month-long single sessions (billions of tokens) · high compression quality

npm license GitHub Discord

npm install -g billion-context --prefix=~/.local

Claude Code  Codex  OpenCode  pi  Gemini CLI  Kimi  Qwen Code  GitHub Copilot CLI  TRAE  CodeBuddy  Qoder  iFlow CLI  MiniMax Code  deepseek-harness  Amp  Crush  Zed  aider  goose  hermes  zcode  omp  jcode


Cache health at a glance: a healthy session keeps a 96–99% prefix-cache hit rate — compression itself costs ≤2%. Sustained lower? Check attribution with /acp or /acp-cache (see FAQ); usual causes, in order: upstream cache TTL expiry · model switch · a bili bug (please report) · other/unknown.

Community

QQ Group: 1056132097 (full) 1108730198 (full) 1129868472 (open)


📄 Paper / Preprint

📝 The paper itself is open-sourced under the MIT License as part of the codebase (paper/). It is a living document — anyone may edit it; improvements are welcome via pull request.

A production-scale longitudinal study: 4.5 months, three hosts, 174,327 model calls, 18.76B cumulative input tokens (~24.7B across all hosts), zero window violations on 204,800-token models, marathon sessions of 8,584–12,049 calls.

📊 Independent Third-Party Benchmarks

  • 1,500-Item Cross-Benchmark Evaluation (LongMemEval-S · ContextBench · MemoryAgentBench) (中文版) — head-to-head comparison of billion-context (v0.1.202) against full context and 3 RAG arms (bm25, embedding, embedding-rerank) with DeepSeek V4.1 Flash, Qwen3-Embedding-8B, Qwen3-Reranker-4B, and Pi Agent: #1 on ContextBench (0.3097 Utilized F1, -58.3% cost vs full), +16.6% over best RAG on LongMemEval-S (79.20% vs 62.60%, -71.1% independent-session cost vs full), and 100% survival on 1.48M-token MemoryAgentBench TTL (30× steady-state compression where full fails 199/199).

billion-context sits between any agent and its model API, rewriting Anthropic/OpenAI streams with acp-kernel compression. The model decides when and what to compress into high-fidelity summaries — not a hard truncation limit.

Why

Long coding sessions blow up context. Each provider charges per token, and once you pass the context window the session degrades or dies. billion-context compresses consumed conversation into layered summaries so you can run a single session for days — billions of tokens through one context window.

Unlike a host's built-in summarizer, compression here is incremental, reversible, and prefix-cache friendly: summaries are written in small ranges, can be decompressed on demand, and the cache prefix stays intact.

How it works

How it works

Context-management tools

The proxy injects four context-management tools into the conversation; the model calls them itself as context grows, and the proxy executes compress server-side so folded ranges stay summarized in history until restored:

  • compress — fold a message range into a detailed summary.
  • decompress — restore a compressed range when exact details are needed again.
  • search_context — keyword search over compressed summaries and visible messages.
  • acp_status — context-usage overview plus which ranges are still compressible.

Which do I need?

Pick by your client:

Client Use
pi billion-context — bili pi (launcher) or bili plugin install pi (native); standalone billion-context-pi remains usable — details: docs/clients.md
opencode (1.x / 2.x) billion-context — bili opencode (launcher) or bili plugin install opencode (native); standalone opencode-acp remains usable on 1.x — full guide: OpenCode
omp billion-context via bili omp (built-in plugin) or bili plugin install omp (self-spawning native plugin, no launcher)
dsh bili dsh (launcher — full native plugin via --patch) or bili plugin install dsh ≡ dsh plugin --profile <name> add billion-context (one unified lane) — details: docs/clients.md
kimi bili plugin install kimi (self-spawning native, Kimi Code ≥ 2.0.0) or bili kimi (cert-MITM) or /bili/ prefix — details: docs/clients.md
hermes bili plugin install hermes (self-spawning native, Python plugin #958) or bili hermes (cert-MITM)
zcode (Z.ai / bigmodel coding plan) bili plugin install zcode (self-spawning native, #1145) or cert-MITM via the GUI's Settings → Network or /bili/ prefix — details: docs/clients.md
claude bili claude (launcher) or bili plugin install claude (native posture, #964 — managed settings block + session-owned proxy; see the notes below)
codex bili codex (launcher — the full zero-config posture) or bili plugin install codex (MCP-shell tools companion: start bili first — the shell never spawns a proxy and never routes codex's own traffic) — details: docs/clients.md
jcode billion-context via bili jcode (cert-MITM) or /bili/ prefix — no native mode (compiled Rust binary, no plugin seam, #962)
gemini (Gemini CLI) bili gemini (launcher, GOOGLE_GEMINI_BASE_URL /bili/ rewrite) or /bili/ prefix — launcher-only (no in-loop tool seam, #1043)
iflow (iFlow CLI) bili iflow (launcher, IFLOW_BASE_URL /bili/ rewrite) or /bili/ prefix
qwen (Qwen Code) bili qwen (launcher, cert-MITM) or /bili/ prefix
antigravity (Antigravity CLI / agy, Google) bili antigravity (launcher, CLOUD_CODE_URL /bili/ rewrite of daily-cloudcode-pa.googleapis.com — Antigravity's real default upstream, #3129) or /bili/ prefix — no plugin seam (closed Go language_server; its user-plugin surface is additive-only, #2115) — details: docs/clients.md
mcode (MiniMax Code) billion-context via bili mcode (cert-MITM) or /bili/ prefix — no native mode (event hooks only, no model-request seam, #1050)
aider billion-context via bili aider (cert-MITM) or /bili/ prefix — no native mode (shell-command-only hooks, no tool-injection seam, #1048)
copilot (GitHub Copilot CLI) bili copilot (launcher, cert-MITM) — closed Go binary, no plugin seam (#1049)
amp (Amp CLI) bili amp (launcher, cert-MITM) — closed Go binary, no plugin seam (#1049)
kiro (Kiro CLI, AWS) bili kiro (launcher, cert-MITM) — Rust shell + Node agent server, no plugin seam; model traffic is the Responses wire on runtime.<region>.kiro.dev, gateway quirks handled built-in — details: docs/clients.md
crush (Charm Crush) bili crush (launcher, cert-MITM) — open-source Go binary, no plugin seam; built-in provider hosts whitelisted, custom base_urls auto-discovered from crush.json (#2340)
zed (Zed editor) bili zed (launcher, cert-MITM) — open-source Rust editor, no plugin seam; reqwest honors HTTPS_PROXY, CA via SSL_CERT_FILE (Linux env probing); built-in provider hosts whitelisted, custom api_urls auto-discovered from settings.json; loopback providers (ollama/lmstudio) stay direct via NO_PROXY (#2340)
goose (Goose CLI) bili goose (launcher) — rustls trusts no CA file, so no cert-MITM: openai/anthropic legs via OPENAI_HOST/ANTHROPIC_HOST, custom providers via a regenerated GOOSE_PATH_ROOT overlay (#1049)
everything else (no context hook) billion-context — bili <client> (launcher, preferred) or /bili/ prefix

Native mode vs standalone extensions. The host-native plugins (bili plugin install …) and the standalone in-process extensions (billion-context-pi, opencode-acp) are mutually exclusive — both active means double compression. The installer makes the switch: it replaces the legacy entries (bare name, npm: alias, versioned, path form; array or object shape) and snapshots the original config to .bili-bak once; a project-local install is not touched — remove that one by hand. As a runtime safety net for manual installs, the native entries set BILLION_CONTEXT_NATIVE=<host> synchronously at load so a standalone extension can stand down at action time. On the pi side the marker needs billion-context-pi 0.1.72+, and the pi-native entry scans both pi settings files once its proxy is up and warns loudly when it spots a co-resident legacy entry the installer never saw — that warning is the only visible signal while an old billion-context-pi silently double-compresses.

Install

Linux / macOS — install with a user-level prefix (no sudo, no npm config changes, and bili's self-update never hits permission errors):

npm install -g billion-context --prefix=~/.local

The bili command lands in ~/.local/bin — already on PATH in most distros; if not, add export PATH="$HOME/.local/bin:$PATH" to ~/.bashrc or ~/.zshrc. On nvm or Homebrew Node the default prefix is already user-owned — a plain npm install -g billion-context works as-is. On Windows the default prefix (%APPDATA%\npm) is also user-writable — plain npm install -g billion-context.

This installs the bili command (bili-proxy is kept as an alias). Hitting EACCES with an old root-owned prefix? Reinstall with --prefix=~/.local (pass the flag again on any future npm reinstall of bili) — that is the permanent fix; avoid sudo.

Prefer containers? A Dockerfile ships at the repository root — see Running in Docker below.

Quickstart

Three ways to use it — pick one:

  • Native plugin (most native): bili plugin install <client> — bili becomes a plugin inside the client; start the client as usual.
  • Launcher (config-free): one bili <client> command brings up the proxy and the client together — no real config file is ever touched.
  • URL change (most universal): prefix your client's baseURL with the proxy origin + /bili/.

Mechanism details behind these three options (plugin lifecycle, runtime-info protocol, injection priority) live in docs/technical-notes.md.

Ports, briefly (#1660): bili start (manual) owns 8787. Everything a lane spawns for you (native hooks, launcher lanes) lives in a separate self-managed zone starting at 18787 — collisions hop +1 and each lane remembers its drift, so zero-config installs never fight you for a port, and a deliberate bili start daemon is attached by default. Attach is lane-aware (#2905): a hook rides its own lane's instance first, NEVER another declared lane's — except lanes you list in native.attachLanePriority — and the 8787 user-zone daemon stays the LAST-resort fallback. An upgrade-restart that finds the previous build still draining on the lane's port waits for it to release (up to 5s) and rebinds the SAME port instead of drifting (#1723); only a genuinely occupied port hops +1 — and that hop is now logged loudly.

Option 1 — Native plugin (bili plugin install pi / omp / opencode / dsh / kimi / hermes / zcode)

The proxy lives inside the client: install once, then start the client exactly as you always do — no launcher command, no env vars, no fixed port, no URL edits. Supported today for pi, omp, opencode (1.x and 2.x), dsh, kimi, hermes and zcode:

bili plugin install pi          # registers a "billion-context" entry in pi's settings (npm form when bili itself was npm-installed)
bili plugin install omp         # registers an extensions entry in omp's config.yml (~/.omp/agent/config.yml)
bili plugin install opencode    # registers the plugin in opencode's real config + disables native auto-compaction
bili plugin install dsh         # runs 'dsh plugin --profile <name> add billion-context' for every existing profile
bili plugin install kimi        # writes $KIMI_CODE_HOME/plugins/managed/billion-context/kimi.plugin.json (+ installed.json record); per-session routing block lands in config.toml on first start (Kimi Code >= 2.0.0)
bili plugin install hermes      # copies the Python plugin into ~/.hermes/plugins/billion-context/ (+ machine-owned bili.json sidecar) and enables it via `hermes plugins enable billion-context`
bili plugin install zcode       # writes hooks.enabled + a SessionStart hook + mcp.servers.bili into ~/.zcode/cli/config.json; per-session routing lands in the bigmodel provider store on first start
bili plugin remove <client>     # undo (dsh removes through the same channel; config snapshots go to .bili-bak)

Where a client has its own plugin channel you can also install natively, skipping bili commands entirely:

  • dsh: dsh plugin --profile <name> add billion-context is the very command bili plugin install dsh drives per profile (npm form only; a git checkout has no published entry — pasting a GitHub address installs source without dist/ and the bundle never loads) — same end state either way (pnpm into the profile, bundled patch layer mounted by dsh itself); remove through the same channel. See the dsh section below.

  • opencode: easiest is bili plugin install opencode (it picks the right entry form for your host version). Hand-install without bili (npm form only; a git checkout has no published entry):

    • OpenCode 1.x — add the bare npm name to your real config's plugin list: "plugin": ["billion-context"]. The package publishes exports["./server"] → dist/agent/opencode-native.js, so opencode loads it through its own Npm.add machinery and the plugin self-spawns exactly like the bili-installed form.

    • OpenCode 2.x — the bare name does NOT work: 2.x resolves it through the package main field (dist/index.js, the CLI — no plugin definition), so the module load fails (#3976). Instead, put a one-line re-export in a directory and point the config's plugins list at that directory:

      // <shim dir>/index.js
      export { default } from "<abs path to the global install>/dist/agent/opencode-native.js";
      { "plugins": ["<shim dir>"] }

    Either generation: do the two things the bili installer would have done for you too — set "compaction": { "auto": false } in the same config (otherwise OpenCode's native auto-compaction double-compresses) and keep a manual backup of the file first.

  • claude: this repository doubles as a Claude Code plugin marketplace — /plugin marketplace add ranxianglei/billion-context, then /plugin install billion-context@billion-context, then run /billion-context:bili-setup (it drives bili plugin install claude for you and tells you to restart). Same end state as the bili installer; the plugin ships no hooks or MCP entries of its own, so nothing double-registers.

For pi / omp / kimi / claude there is no client-side channel — bili plugin install <client> writes their config entries for you (kimi's declarative kimi.plugin.json + registry record, claude's managed settings block, …).

Notes:

  • Native mode is mutually exclusive with the standalone in-process extensions (billion-context-pi, opencode-acp) — the installer swaps the entries and snapshots the original config (.bili-bak).
  • pi: native installs wire in built-in subagents by default (acp_delegate / acp_delegate_wait / acp_delegate_cancel) — how to disable them while keeping context compression: Pi built-in subagents.
  • OpenCode legacy sessions, V1/V2 shapes and caveats: OpenCode.
  • kimi reports runtime-info at bootstrap only (static headers can't carry per-request window/model values); subagent tool calls are routed by the proxy's outbound tool-use witness ring (#1685) — no model-visible conversation id.
  • hermes's native plugin is Python: it points hermes' httpx stack at the proxy via env vars after a health check and stamps per-request headers through an llm_request middleware.
  • codex is the one client a plugin install cannot make self-sufficient: codex routes model traffic via env only (no config-file routing seam for the default ChatGPT-login provider — a managed model_providers block would force API-key auth and drop subscription login), and an MCP server cannot inject env into its parent. bili plugin install codex writes a single [mcp_servers.bili] block into ~/.codex/config.toml (command = node, args = dist/mcp.js) exposing the four ACP tools; at session start the shell resolves a proxy — env BILI_MCP_PROXY > the live-instance record (any lane's proxy or a bili start daemon) > the 8787 user-zone default (#1660 removed the install-time origin bake, #403) — nothing reachable → tools/list fails with -32003. So: start bili first (bili start or any client's lane proxy), export HTTPS_PROXY yourself if you also want compression, or use bili codex for the zero-config full posture. Mechanics: docs/clients.md.
  • claude has a native posture (#964): managed settings block + SessionStart hook + MCP shell; the hook rides the self-managed port zone (#1660) and re-pins the managed URL to the live origin each session, so port drift self-heals. Since #1821 the MCP shell also watches the proxy mid-session (30 s tick × 3 failures) and respawns a dead lane proxy itself, so model requests recover within ~90 s instead of a new session (same semantics as the zcode lane). Opt out with BILI_NATIVE_CLAUDE=0 (passthrough). Mechanics: docs/technical-notes.md. Known limitation (#2290): the Claude Desktop app's Code tab (CLAUDE_CODE_ENTRYPOINT=claude-desktop) sets its own ANTHROPIC_BASE_URL on its embedded Claude Code, overriding the managed one — desktop sessions bypass the proxy entirely while the managed block's DISABLE_AUTO_COMPACT=1 still applies, so they get neither bili compression nor native auto-compaction. The hook warns loudly at session start (and records it for bili doctor, which also flags machines where Claude Desktop is installed alongside the native lane); terminal sessions are unaffected. Field-tested 2026-10-06 (#2290): putting HTTPS_PROXY in the settings env block produced zero CONNECT traffic to a live MITM-enabled proxy on Claude Desktop 2.19675.1 / embedded CC 2.1.288 (Windows 11) — the variable reaches no network stack there, matching the CLI behavior of that era — note that newer builds (CC 2.1.301+) DO honour HTTPS_PROXY on the CLI, which is why bili claude routes via the /bili/ base-URL rewrite — the launcher gives this lane no proxy and no CA at all, and a child that brings a proxy of its own gets the loopback hosts merged into NO_PROXY/no_proxy so that leg stays direct regardless of its proxy behavior (#3446). As of that version there is no usable routing seam on the desktop Code tab; the lane stays tracked in #2290 in case upstream changes behavior. Account-bound features (#4693): because the lane routes via a custom ANTHROPIC_BASE_URL, Claude Code treats the session as third-party/API-key and disables features bound to your Anthropic account/Cloud — Remote Control (/remote-control, driving a local session from mobile/desktop/web) disappears from the command list while bili routes traffic. Compression is unaffected; run plain claude without bili (or bili plugin remove claude) for sessions that need those features. This is inherent to the base-URL routing seam — no alternative interception point survives CC's undici stack (#2290) — not a config deletion. Desktop-only users can restore native auto-compact with bili plugin remove claude. Since #5095 the managed block also installs a SubagentStart hook (node <root>/dist/claude-subagent-hook.js) that mints a per-dispatch lane token into each subagent's context: subagents that ride the parent's session id with no agent-id headers (the VS Code extension build, #4352) key onto their own <id>|sub:…:t:<token> compression lanes, so parallel same-type dispatches stop merging (and the token disappears from later requests once the first message folds — those fall back to the fingerprint lane). Uninstall removes the hook with the managed block.
  • zcode has a native posture (#1145): managed ~/.zcode/cli/config.json block + per-session provider baseURL rewrite. Full mechanics: docs/clients.md.
  • jcode and aider have no native mode (no plugin/MCP/tool-injection seam: #962, #1048) — use bili jcode / bili aider.
  • copilot, amp and goose are launcher-only (#1049); goose cannot be cert-MITMed (rustls trusts no CA file) and rides plain-HTTP base-URL redirects instead.

Option 2 — Launcher (bili pi / bili codex / bili claude / bili omp / bili opencode / bili hermes / bili dsh / bili codebuddy / bili qoder / bili trae / bili jcode / bili kimi / bili gemini / bili iflow / bili qwen / bili antigravity / bili mcode / bili aider / bili copilot / bili amp / bili goose / bili kiro)

The launcher wraps a client in one command: it starts a proxy on an independent port (a fresh instance is always spawned — a port is never reused), then points the client at it — certificate-based MITM where the client honors proxy/CA env vars, or an isolated /bili/ config rewrite where it doesn't. No real config file is ever edited; the client's own config is READ to discover which HTTPS upstream hosts it talks to, and those hosts are whitelisted for MITM so the proxy can TLS-terminate exactly them and blind-tunnel everything else.

bili pi                               # launch pi through the proxy — file-free (#535): env + extension registerProvider, real ~/.pi untouched
bili codex                            # launch codex through the proxy
bili claude                           # launch claude through the proxy
bili omp                              # pi-style, file-free (#535): env + extension registerProvider + compaction cancel, real ~/.omp untouched
bili opencode                         # OpenCode (1.x & 2.x): full guide in the [OpenCode](docs/clients.md#opencode) section below
bili hermes                           # file-free (#535): hermes proxy env (HTTPS_PROXY + combined CA bundle via SSL_CERT_FILE) — https via CONNECT MITM, http via absolute-form forward proxy; real ~/.hermes untouched
bili dsh                              # deepseek-harness: full native plugin injected via --patch (#941) — real dsh tools, session-bound /acp + /acp-cache (plugin mode); non-loopback upstreams ride proxy envs, loopback keeps the overlay DSH_HOME rewrite (#535); dsh auto-compaction off everywhere — host plane via the bundle patch, web-profile presets at load time (#1772/#2474/#3354)
bili codebuddy                        # Tencent CodeBuddy Code CLI: CODEBUDDY_BASE_URL /bili/ rewrite (OpenAI chat completions wire), budget aligned via CODEBUDDY_AUTO_COMPACT_WINDOW; real ~/.codebuddy untouched
bili qoder                            # qoder CLI (`qoder`/`qodercli`): model endpoint is hardcoded https (no /bili/ rewrite possible) — cert-MITM via HTTPS_PROXY + NODE_EXTRA_CA_CERTS, default model hosts whitelisted (#653). Qoder Desktop is a separate BYOK/custom channel that speaks plaintext OpenAI over a `/bili/` prefix — point it at bili as a normal custom provider (not this MITM lane); its official-subscription traffic is encrypted and out of scope (#764)
bili trae                             # Trae CLI (ByteDance, closed Go binary, no base-URL override) — cert-MITM via HTTPS_PROXY + SSL_CERT_FILE, model host from TRAE_CLI_API_HOST or the default enterprise gateway (#655)
bili jcode                            # jcode (Rust agent harness) — env-only cert-MITM launch: HTTPS_PROXY + SSL_CERT_FILE, model host api.z.ai whitelisted, local loopback providers stay direct via NO_PROXY
bili kimi                             # Kimi Code CLI (Moonshot): standard proxy envs except an unconditional loopback bypass — https via cert-MITM, http via absolute-form forward proxy; loopback endpoints inventoried with a manual /bili/ hint (#757)
bili gemini                           # Gemini CLI (Google): GOOGLE_GEMINI_BASE_URL /bili/ rewrite to generativelanguage.googleapis.com (Google native wire), real ~/.gemini untouched
bili iflow                            # iFlow CLI: IFLOW_BASE_URL /bili/ rewrite to apis.iflow.cn/v1 (OpenAI chat-completions wire), real ~/.iflow untouched
bili qwen                             # Qwen Code (multi-protocol gemini-cli fork, no base-URL hook): cert-MITM via HTTPS_PROXY + NODE_EXTRA_CA_CERTS, default DashScope/Qwen model hosts whitelisted, custom relays via --mitm-domain
bili antigravity                      # Antigravity CLI (agy, Google): CLOUD_CODE_URL /bili/ rewrite of daily-cloudcode-pa.googleapis.com — the real default upstream (bare cloudcode-pa 400s on /v1internal:*, #3129); undocumented language-server env override, v2.19.1 binary-verified; wire recognized as Google native by path (#2115)
bili mcode                            # MiniMax Code CLI: same shape as kimi (proxy envs, unconditional loopback bypass, cert-MITM/absolute-form); session bound via X-Mavis-Session-Id (#1050)
bili aider                            # Aider (Python pair programmer): cert-MITM via HTTPS_PROXY + SSL_CERT_FILE/REQUESTS_CA_BUNDLE; endpoint from OPENAI_API_BASE / ANTHROPIC_BASE_URL / --openai-api-base / .aider.conf.yml (#1048)
bili copilot                          # Copilot CLI (GitHub, closed Go binary) — cert-MITM via HTTPS_PROXY + SSL_CERT_FILE, api.githubcopilot.com + per-plan subdomains whitelisted (#1049)
bili amp                              # Amp CLI (Sourcegraph, closed Go binary) — cert-MITM via HTTPS_PROXY + SSL_CERT_FILE, ampcode.com whitelisted (#1049)
bili goose                            # Goose (Block, Rust/reqwest): rustls release builds trust no CA file — openai/anthropic legs via OPENAI_HOST/ANTHROPIC_HOST, custom providers via a regenerated GOOSE_PATH_ROOT overlay (/bili/ rewrites, real config untouched) (#1049)
bili kiro                             # Kiro CLI (AWS): cert-MITM via HTTPS_PROXY + combined CA on SSL_CERT_FILE and NODE_EXTRA_CA_CERTS; only runtime.<region>.kiro.dev is decrypted; developer/system items re-voiced as user for the gateway; session = Kiro's conversation id (survives --resume)
bili pi --mitm-domain api.foo.com     # add a domain to the MITM whitelist

Option 3 — URL change (/bili/ prefix)

Start the proxy:

bili

Then just prefix your client's existing baseURL with http://localhost:8787/bili/. The full upstream URL is embedded in the path, so the proxy knows where to forward without any config:

client baseURL before:  https://api.openai.com/v1
client baseURL after:   http://localhost:8787/bili/https://api.openai.com/v1

For more per-client configuration examples, see the web UI guide at http://localhost:8787.

Verify. With the proxy running and your config saved, check it answers and that your first real request shows compression activity in the log:

# Health check (proxy up + where it forwards)
curl -s http://localhost:8787/__bili/health
# → {"ok":true,"upstream":"https://api.anthropic.com"}

# Live session stats (after a real request)
curl -s http://localhost:8787/__bili/stats

Then send one message from your client and watch the log (~/.local/state/billion-context/bili.log, also printed to stderr). You should see a processTurn line per request, and once the conversation grows, [acp-usage] round N input=X cached=Y (cache hit Z%) + a compress event.

Client deep dives

Everything that doesn't fit in one Quickstart line — how each client's lanes attach, what gets written where, and known limitations — lives in docs/clients.md: dsh · Kimi Code · Hermes · ZCode · Gemini family (Gemini CLI / iFlow CLI / Qwen Code / Antigravity) · cert-MITM clients that never compress (CONNECT blind tunnels, #897) · unrecognized endpoints going direct (#1290) · OpenCode (launcher / native / pure proxy, /acp status & rules, legacy opencode-acp sessions #920).

From source (development)

Risk: master is the development branch and can be broken at any moment — unreleased changes, failing builds, unverified fixes. Unless you are patching the code or testing an unreleased fix, install a release with npm as above.

git clone https://github.com/ranxianglei/billion-context.git
cd billion-context
npm ci
npm run build
npm link
bili --version

After npm link, bili works from any directory.

FAQ

How do I check my cache hit rate? Don't dig through logs — /acp-cache prints a text summary report right in the client, headed by a clickable Web UI link: open it for the web version of the session page — the cache hit-rate line chart plus per-break attribution:

web session page: cache hit-rate chart + attribution The report has four blocks that pin things down at a glance: GRAND LEDGER (totals + hit% with an explicit HEALTHY verdict; misses decomposed into new content / compress re-pay / upstream-ttl-or-client-rewrite) · FOLD ECONOMICS (per-fold economics: net tokens saved, paid-back verdicts) · LINE ITEMS (anomalies only: hit<85% or miss≥5000). Rule of thumb: compression itself costs ≤2% — a healthy session sits at 96–99%. When you see less, the attribution tells you which of the usual suspects it was, in this order: ① upstream cache TTL expiry (shows up as stable-prefix misses — the top-spikes line names idle times), ② a model switch, ③ a bili bug (report it with the page attached), ④ other/unknown. /acp-cache [full] lists every fold & line; same report over Since #1535 the report ends with a MODEL SWITCHES section: a mid-session model change invalidates the provider's prefix cache, so the whole stable prefix is re-billed on the next request — each switch's unexplained residual (its ttl bucket minus new content) is charged to the switch instead of masquerading as TTL expiry; per-event from → to, hit %, and attributed tokens are listed (full lists every event, the summary the last 8), and the web sessions table gains a matching model-switch column. Since #2131 the same machinery fingerprints the outbound credential (a 12-hex sha256 of the authorization/x-api-key-family headers — the raw key is never stored) and attributes a key switch — the relay behind a stable URL rotated to a different account — in a dedicated KEY SWITCHES section, a key switch: line in CACHE INVALIDATION, and a 🔑 badge in the web sessions column. HTTP: GET /__bili/cache-report; the raw per-request [acp-usage] lines still land in the log file for deep dives.

What does /acp show? In clients with the native plugin (opencode, dsh, hermes), /acp renders the ACP status panel of the current conversation straight from the proxy (session, blocks, compressible ranges, usage); before the first model request it shows an idle notice instead. /acp-cache [full] prints the cache report above.

Can I query sessions and config over the web? Yes — open http://localhost:8787: an overview dashboard, session list with per-session detail, live logs, a config editor, and an upstream connectivity test. A Blog view renders notes and long-form articles inside the panel itself — bundled with the install, refreshed from GitHub master on a ~1-hour throttle while online (fail-soft to the bundled copy when offline); the full library also lives on GitHub Pages. Everything else is also plain JSON for scripting (/__bili/stats, /__bili/sessions, /__bili/config, …).

When does compression happen? It is model-driven: the injected context tools are called by the model as context grows, gentle growth nudges (~50K-token steps by design, adjustable via compress.nudgeGrowthTokens) prompt it along the way, and preflight fires as a hard backstop when the input alone exceeds the window (#470). Watch it live with /acp or the web UI.

Does compression shrink my client's own conversation file? No — the most common surprise in very long sessions (#5796). Compression shrinks what is sent to the model: every outgoing request is rebuilt from live blocks plus summaries, so the wire stays small however long the conversation runs. The client's stored history is user data — bili never rewrites it. On dsh the host's auto-compaction is additionally disabled while bili is active (two compressors must not fight over one history, #1772/#2474/#3354), so the host-side file grows with every turn: each turn takes longer as it grows (measured: tens of seconds per turn at ~30K messages, #5796), and the practical convergence path is to start a new session when it gets heavy. The web session list badges sessions at 5,000+ requests (长会话/slow) as a reminder that this point has been reached.

Why does the first compaction wait until ~200k? Compaction does not trigger on absolute window position but on growth intervals: by default the first soft compaction fires 50k tokens past the boot content (compress.nudgeGrowthTokens, flat and window-independent). With a boot around 100k — or with the growth step set to ~100k — the first compaction may wait until ~200k. To make it fire earlier: 1) trim the system prompt, disable unneeded tools, prune skills; 2) lower compress.nudgeGrowthTokens to ~50k; 3) enable lean mode. Worked example in docs/configuration.md.

Is bili transparent? How do I turn it off? Unrecognized endpoints forward unchanged (docs/clients.md), and every mode reverses cleanly: bili plugin remove <client> for native installs, stop using the launcher command / env vars / /bili/ prefix for the other two — traffic goes direct again immediately.

Can I combine bili with a model-routing gateway (e.g. magpie)? Yes — point the client at bili, and point bili at the gateway through the /bili/ prefix, which embeds the gateway's absolute URL: http://localhost:8787/bili/http://127.0.0.1:3425…. Example: Claude Code → ANTHROPIC_BASE_URL=http://localhost:8787/bili/http://127.0.0.1:3425 + ANTHROPIC_API_KEY=magpie; OpenAI-style clients → OPENAI_BASE_URL=http://localhost:8787/bili/http://127.0.0.1:3425/v1 (+ OPENAI_API_KEY=magpie). Compression happens before routing — every request that reaches any account in the gateway's routing groups is already compressed. Credentials stay in the gateway: the client's dummy key rides through untouched, and real keys never touch bili. Caveats: ① an account switch mid-conversation invalidates the provider's prefix cache — inherent to multi-account routing, not bili (watch it in the KEY SWITCHES section of /acp-cache); ② routed model names are opaque to bili's window lookup — declare their context windows under the providers key http://127.0.0.1:3425 via models.<name>.context, or they run on the fallback window (route-miss warning, #2317); ③ if the relay rejects bili's Anthropic-lane cache_control stamps, set compat.noCacheControl; ④ loopback gateways work out of the box; a gateway on a private non-loopback address may additionally need network.allowPrivateHttpProviders (#2984); ⑤ for Claude Code native plugin mode (bili plugin install claude), set BILI_CLAUDE_UPSTREAM=http://127.0.0.1:3425 before install so the managed block wraps the relay into ANTHROPIC_BASE_URL (or configure ANTHROPIC_BASE_URL=http://127.0.0.1:8787/bili/http://127.0.0.1:3425 directly; localhost and 127.0.0.1 both accepted, #5369). Verified end-to-end over all three wires (OpenAI Chat / Responses / Anthropic Messages, including cross-protocol conversion), #4433.

Does this work with opencodex (ocx) — the local Codex/Claude Code gateway with a ChatGPT account pool? Same pattern: point the client at bili, and point bili at ocx through the /bili/ prefix — OpenAI-style clients (chat completions and Responses, e.g. Codex) → OPENAI_BASE_URL=http://localhost:8787/bili/http://127.0.0.1:10100/v1; Anthropic-style clients → ANTHROPIC_BASE_URL=http://localhost:8787/bili/http://127.0.0.1:10100. A dummy key value satisfies clients that require one; it rides through untouched. Keep bili in front of ocx rather than behind it: ocx owns the provider credentials and the account pool at its final hop, so only this order keeps compression and pooling working together. Loopback needs no key between the two (ocx's default loopback bind reads no token); a non-loopback bind takes OPENCODEX_API_AUTH_TOKEN plus the x-opencodex-api-key header per its docs. Request models by ocx's provider/model id so routing is deterministic; as with any gateway, routed ids are opaque to bili's window lookup (declare them via models.<name>.context) and a mid-session account rebind invalidates the prefix cache (watch KEY SWITCHES in /acp-cache). Verified end-to-end over all three wires (OpenAI Chat / Responses / Anthropic Messages), bili 0.1.212 × ocx 2.97.0.

Where are logs and session data stored? Log: ~/.local/state/billion-context/bili.log (also mirrored to stderr); session state: ~/.local/share/billion-context/ (XDG-overridable; Windows AV exclusion #362, opt-in cleanup #1082) — full paths in docs/configuration.md.

Running the proxy

Running in Docker

A Dockerfile ships at the repository root — it installs the published npm package at build time (the tested artifact; nothing is compiled in the image) and runs the proxy as a service:

docker build -t billion-context .
docker run -d --name bili -p 8787:8787 \
  -v bili-config:/root/.config/billion-context \
  -v bili-data:/root/.local/share/billion-context \
  -v bili-cache:/root/.cache/billion-context \
  -v bili-state:/root/.local/state/billion-context \
  billion-context

Then point clients' baseURL at http://<host>:8787/bili/… exactly like Option 3 above.

  • Base: node:24-slim — uses the builtin node:sqlite storage engine directly (no native-addon download). Don't switch to Node 20 bases: the self-downloaded SQLite engine requires Node ≥ 22 and crashes under 20 (#3341).
  • Updates: in-container self-update is off by default (ACP_AUTO_UPDATE=0) — the sanctioned update channel for a containerized copy is rebuilding/pulling a newer image; an in-place self-update would be silently reverted to the image version on the next recreate. Opt back in with -e ACP_AUTO_UPDATE=1; pin a release at build time with --build-arg BILI_VERSION=0.1.197 (default latest).
  • Data: the four mounted dirs hold config, session state, update throttle/lock + cached SQLite engine, and logs respectively. Mount volumes or bind mounts so they survive container replacement; the image also declares them as VOLUMEs so even a bare docker run keeps them out of the container layer.
  • Security: the container listens on 0.0.0.0:8787 so clients outside it can connect — there is no authentication, so expose the port only on a trusted network (same caveat as --host 0.0.0.0 below). The web UI and /__bili/* JSON endpoints work unchanged through the mapped port.
  • Healthcheck: the image ships a HEALTHCHECK probing /__bili/health on 8787 via node's builtin fetch (no curl needed in the slim base); if you override the listen port, remember the probe stays pinned to 8787.

Flags

bili --port 9000              # change listen port
bili --host 0.0.0.0           # listen on all interfaces (see host note below)
bili --debug                 # verbose logging (also: set "debug": true in config)
bili --passthrough           # forward without compression (smoke-test mode)
bili --config ~/my-bili.json # use a different config file
bili -c dsh-test             # named config → ~/.config/billion-context/dsh-test.json (per-model files)
bili update [version] [--force]  # check & install a newer version now (bypasses throttle); with a version, installs exactly that published version; --force reinstalls even when already on it
bili pin [duration]          # pin the current version (1h/12h/1d/7d/30d/forever): new versions are reported but not auto-installed (#6804)
bili unpin                   # release the pin (same as: bili pin --clear)
bili install <ref> [duration] [--force]  # build + install from a git ref (branch / tag / PR number / PR URL); auto-pinned (default 30d, #7806); --force rebuilds even when that ref is already installed
bili install status          # show the installed version and its git source
bili doctor --fix            # converge drifted dsh profile ledgers (manifest spec / lockfile record / bundle copy) to the on-disk version (#3496)
bili --no-auto-update        # disable self-update for this run
bili --auto-restart-on-update   # self-restart when a new version is installed (default off)
bili --bin /path/to/client   # launcher: spawn this exact client binary instead of auto-detecting (env BILI_CLIENT_BIN)

Flags override env vars and the config file. bili --help lists them all.

Remote agents (--host)

By default the proxy binds 127.0.0.1 and only accepts loopback connections. To serve agents on other machines: bili --host 0.0.0.0 (or your LAN IP); remote agents point their model baseURL at http://<this-host>:<port>/bili/….

  • MITM-mode CONNECT then also accepts remote clients — for whitelisted model hosts only. Blind tunnels to arbitrary hosts stay loopback-only, so the proxy can never be used as an open relay.
  • /bili/<absolute-url> destination admission (#409): the proxy itself and link-local/metadata addresses are always denied; loopback/private destinations are allowed for local clients (self-hosted upstreams) and denied for remote clients unless listed in BILI_TUNNEL_ALLOWED_HOSTS (host or host:port, comma-separated). One exception (#1073): a local client relaying a management path (/__bili/*, /__acp/*) to a loopback IP-literal destination is forwarded unmarked; remote peers and hostname destinations keep the internal tunnel marker unconditionally, and management paths stay unreachable through the tunnel even via NAT hairpin. An absolute-form request addressed to the instance's own endpoint on a management path is served locally instead of tunneled (a forward-proxy-style health probe gets a real answer).
  • There is no authentication: only do this on a trusted LAN or behind a firewall. The /__bili/ management endpoints remain loopback-only. A startup [security] warning reminds you of the above.

Debugging

bili --debug (or env ACP_DEBUG=1, or "debug": true in config — flag > env > config) logs every processTurn (tag counts, token usage), the nudge decision (growth/usage/pendingT1/shouldInject), client headers, and SSE rewrites.

Log file

All logs tee to ~/.local/state/billion-context/bili.log by default (XDG state dir) and still print to stderr. Override with "logFile" in config or ACP_LOG_FILE (off disables the file). Auto-rotates at 10 MB (bili.log.old). Per-request cache-hit stats log as [acp-usage] round N input=X cached=Y (cache hit Z%) so you can measure prefix-cache health directly from the log.

Connection lifecycle tuning (#1982)

Client-facing connections close gracefully after the final response: when the proxy initiates the close (Connection: close), it waits up to BILI_POST_RESPONSE_LINGER_MS (default 5000) for the client's close signal before releasing the socket, so pooled clients see a clean EOF instead of a possible RST from racing bytes. Related knobs: BILI_KEEP_ALIVE_TIMEOUT_MS (idle-reap budget, default 5000) and BILI_CLIENT_ERROR_BACKSTOP_MS (terminal backstop for the error-drain path, default 30000) — full semantics in docs/configuration.md.

Self-update

The proxy checks npm on startup and every 3 minutes; a newer version is installed in place and a notice is logged — restart bili to pick it up, unless you enable opt-in self-restart (--auto-restart-on-update flag, env ACP_AUTO_RESTART_ON_UPDATE=1, or "autoRestartOnUpdate": true in config — default OFF): with zero in-flight requests it verifies the new install, stops accepting connections, drains, spawns a replacement on the same port, and exits once it accepts connections (clients reconnect automatically; session state survives on disk). Safety gates: zero in-flight through the drain window, an install sanity check before re-exec, and a 10-minute cooldown marker so a flapping version can never loop-restart; any failure resumes the original listener and falls back to the plain reminder.

Staggered rollout (#3619): a discovered version is not applied immediately by automatic updates. Each instance draws ONE random moment inside a delay window (built-in default 15 min – 48 h) and upgrades when it arrives; the drawn moment is persisted, so restarts never re-roll. Fleet upgrades therefore spread across the window instead of completing within minutes of a release, leaving time to catch a bad release mid-rollout (#3401/#3600/#3394). The window plus emergency controls live in a public policy file (auto-update-policy.json in this repo, fetched anonymously with ETag caching): hold freezes automatic upgrades fleet-wide, blocked skips listed versions, pinned sets an upgrade ceiling. Fail-open by design — an unreachable or malformed file simply falls back to local defaults, and the file can steer timing/skip/pin only, never what gets installed. Per-machine exits: manual bili update bypasses hold/stagger (still respects blocked/pinned), "staggerMinDelayMs": 0 + "staggerMaxDelayMs": 0 (or BILI_UPDATE_STAGGER_MIN_MS/BILI_UPDATE_STAGGER_MAX_MS) restore legacy immediate upgrades, and ACP_AUTO_UPDATE=0 disables auto-updates entirely. Local version lock (#6804): bili pin [duration] (or the Updates tab in the panel) pins the installed version — checks keep reporting newer tag-channel versions but never install them until the pin expires or is released; a version installed from a prerelease/temp build (e.g. a CI pr.N tag) is likewise only reported — auto-upgrade follows the tag channel and only moves temp builds along it. Explicit installs (bili update [version]) and advisory repairs always take precedence. Full format and semantics: docs/configuration.md → update.

While the running process is behind the on-disk install ("stale"), the web UI shows a banner (running vs installed version, auto-restart state) and GET /__bili/status returns {version, diskVersion, stale, autoRestartOnUpdate, advisory, updatePolicy, inFlight} for scripting (advisory is the active critical-defect entry or null, see below; updatePolicy reports the #3619 rollout state — policy source, hold/pinned/blocked, and the pending staggered upgrade with its due time). Disable permanently via "autoUpdate": false in config or ACP_AUTO_UPDATE=0.

In plugin mode (bili opencode / bili pi / bili dsh — the proxy runs embedded in a long-lived host), "restart bili" means restarting the host: the embedded process cannot exit on its own, so a host left open keeps serving whatever code it started with, silently missing every fix auto-update reports as installed (#1603). Enable --auto-restart-on-update to have it self-restart at a safe point, or run /acp (OpenCode hosts today — pi/dsh coverage tracked in #2084) — the status panel appends a one-line staleness warning (running vs installed version) whenever the on-disk install is ahead of the live process. Auto-update only ever replaces disk files and (optionally) the proxy process; injected code inside the host process only takes effect after the host itself restarts — so if the injection breaks at runtime mid-session (a disposed agent scope, a disabled plugin), model traffic goes direct and uncompressed until then. Since #3581 this state is visible instead of silent: the web UI shows a "takeover broken" banner (agent + refusal count) whenever a plugin reports its attribution gate degraded while no session is live, and GET /__bili/status / /__bili/overview expose the per-agent attribution state (ok/none/threw, refusal count, first-refusal timestamp). Background lanes that are agentless by design (e.g. dsh's title-generation sidecar) never carry an initiator, so their small one-shot calls go direct by definition; under the #3651 contract these normal interceptions are NEVER reported and therefore can never raise the banner. The banner fires only when the attribution lookup itself throws (an internal host error, e.g. a disposed agent scope), and then names what failed: the thrown error text, the masked endpoint, when the episode started, how many requests went uncompressed, the remedy (restart the host process), plus copy/submit-diagnostics buttons that prefill a GitHub issue.

(README truncated)

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Discussions

all 36

Releases and announcements

209 total
  1. v0.1.216v0.1.216Nov 17, 2026

    ## What's Changed * [PR] gate: two fixes — evidence file is now readable after the run completes + one retry added for the small-window round in | gate 两个修复:跑完后证据文件能读了 + R 车道小窗口轮次加一次重试 by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/6808 * [PR] Gate performance overhaul: P/R lanes parallelized, wall clock 45 min → ~18 min | gate 性能改造:P/R 车道并行,墙钟 45min→~18min by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/6810 * [PR] chore(branch): land 20 single-purpose fixes as one history-preserving batch (wave 10) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/6765 * [PR] fix: pass Claude Code's MCP config as --mcp-config=<file> so it cannot eat the prompt by @MohammadErfan-Jabbari in https://github.com/ranxianglei/billion-context/pull/6524 * [PR] fix: retry context overflow with measured output headroom by @zouzh22 in https://github.com/ranxianglei/billion-context/pull/6529 * [PR] fix: un-show a nudge whose request the upstream rejected by @MohammadErfan-Jabbari in https://github.com/ranxianglei/billion-context/pull/6531 * [PR] Guard the google lane against inert-frame tail drains by @tinysunspot in https://github.com/ranxi

  2. v0.1.215v0.1.215Nov 15, 2026

    ## What's Changed * [PR] gate: fix upstream recorder leak causing real model gate deadlock (pipe inheritance) | gate: 修上游 recorder 泄漏导致真模型门禁卡死(管道继承) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/6671 * [PR] chore(branch): land 40 single-purpose fixes as one history-preserving batch (wave 5) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/6677 * [PR] fix: map search evidence offsets back to original Unicode text by @Afloat16 in https://github.com/ranxianglei/billion-context/pull/6494 * [PR] fix: interpret cache-diff byte offsets in original text coordinates by @Afloat16 in https://github.com/ranxianglei/billion-context/pull/6496 * [PR] fix: preserve null response bodies in the inline HTTP engine by @Afloat16 in https://github.com/ranxianglei/billion-context/pull/6502 * [PR] fix: preserve cancellation across native Request reconstruction by @Afloat16 in https://github.com/ranxianglei/billion-context/pull/6556 * [PR] fix: preserve caller cancellation before inline fallback by @Afloat16 in https://github.com/ranxianglei/billion-context/pull/6560 * [PR] fix: preserve Request fields during inline fallback by @Afloat16 in https://github.com/

  3. v0.1.214v0.1.214Nov 14, 2026

    ## What's Changed * [PR] docs: clarify that top-level modelContextLimit / ACP_MODEL_CONTEXT_LIMIT are a last-resort window fallback (#5908) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5909 * [PR] docs: How-it-works SVG diagrams (en/zh) replacing the ASCII box by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5916 * [PR] Review follow-ups: 429 throttle saturation/scope guardrails, media-refs carry-forward filter, oversize-refusal messages that say what to do, doc typo by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5905 * [PR] docs: Minor Documentation Fixes, Part 4 — 6 pure documentation/disclosure fixes bundled for review | docs: 文档小修合集第四辑 —— 6 件纯文档/披露类小修合并送审 by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5918 * [PR] fix(dsh): dsh lane minor fixes batch #5 — activation & other tool registration + liveness log wording | fix(dsh): dsh 车道小修合集第五辑 —— 激活等工具注册 + 存活日志措辞 by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5921 * [PR] docs: slim AGENTS.md — KDD full text to reference/design-decisions.md, triage table to reference/triage.md by @ranxianglei in https://github.com/r

  4. v0.1.213v0.1.213Nov 7, 2026

    ## What's Changed * [PR] fix: revert self-contradictory inclusive billing stamp to split (#5515) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5518 * [PR] docs(website): add blog post 'What to Do When the Model Keeps Treating Old Compressed Content as New User Instructions?' | docs(website): add blog post '模型总是把压缩老内容当成用户新指令咋办?' (EN+ZH) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5549 * [PR] fix: read Responses additional_tools preamble in tool reachability observation by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5528 * [PR] fix: replay unsigned thinking when the upstream does not sign it (#5495) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5496 * [PR] fix(copy): false-advertising sweep of ACP tool surfaces (host-side) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5556 * [PR] Fix renamed model id lookups (Qoder Desktop) + clarify Qoder Desktop host boundary by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5611 * [PR] ci-fixes -> master: converge master CI gate fixes (#4599 sentinel sync @ f9cec9fb) by @ranxianglei in https://github.co

  5. v0.1.212v0.1.212Nov 2, 2026

    ## What's Changed * [PR] (ai: anthropic/claude-opus-4-6) fix(release): nuclear box = deps download + build + publish, zero checks; add local zero-install publish script by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5436 * [PR] Manually remove the fucking AI restrictions | 手动取消傻逼ai限制 by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5444 * [PR] Restore the old CI release manual. | 恢复老的ci release manal by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5446 * [PR] Restore the emergency channel (raw_publish/skip_ci_gate) + fix the four feature regressions introduced by this revert (A | 恢复紧急通道(raw_publish/skip_ci_gate)+修掉这次回退带回来的四处功能损失(A–E) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5447 * [PR] fix(release): land the raw-publish bump as a commit before tagging/syncing (empty sync PR 422 + stale-version tag) by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5457 * [PR] drop master from the CI push arm | ci: merge 后不再重跑 master 的 CORE 矩阵——那套结果没有任何消费者 by @ranxianglei in https://github.com/ranxianglei/billion-context/pull/5426 * [PR] Blog refresh falls back to the GitHub conten

Code frequency

additions and deletions
+176.7K-176.7KWeek of 2026-08-02: +15,023 linesWeek of 2026-08-02: -2,323 linesWeek of 2026-08-09: +22,471 linesWeek of 2026-08-09: -8,756 linesWeek of 2026-08-16: +6,477 linesWeek of 2026-08-16: -1,776 linesWeek of 2026-08-23: +21,174 linesWeek of 2026-08-23: -3,419 linesWeek of 2026-08-30: +14,550 linesWeek of 2026-08-30: -3,613 linesWeek of 2026-09-06: +21,254 linesWeek of 2026-09-06: -3,198 linesWeek of 2026-09-13: +37,524 linesWeek of 2026-09-13: -6,147 linesWeek of 2026-09-20: +64,005 linesWeek of 2026-09-20: -7,604 linesWeek of 2026-09-27: +70,854 linesWeek of 2026-09-27: -11,126 linesWeek of 2026-10-04: +176,700 linesWeek of 2026-10-04: -19,117 linesWeek of 2026-10-11: +107,831 linesWeek of 2026-10-11: -16,123 linesWeek of 2026-10-18: +111,962 linesWeek of 2026-10-18: -16,391 linesWeek of 2026-10-25: +60,897 linesWeek of 2026-10-25: -13,110 linesWeek of 2026-11-01: +65,378 linesWeek of 2026-11-01: -20,496 linesWeek of 2026-11-08: +58,734 linesWeek of 2026-11-08: -17,611 linesWeek of 2026-11-15: +2,990 linesWeek of 2026-11-15: -247 linesAug 2, 2026Nov 15, 2026
+857.8K lines added, -151.1K removed over the last year.

Commits per week

last 52 weeks
6440Week of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 0 commitsWeek of 2026-04-05: 0 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 0 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 0 commitsWeek of 2026-05-24: 0 commitsWeek of 2026-05-31: 0 commitsWeek of 2026-06-07: 0 commitsWeek of 2026-06-14: 0 commitsWeek of 2026-06-21: 0 commitsWeek of 2026-06-28: 0 commitsWeek of 2026-07-05: 0 commitsWeek of 2026-07-12: 0 commitsWeek of 2026-07-19: 0 commitsWeek of 2026-07-26: 0 commitsWeek of 2026-08-02: 167 commitsWeek of 2026-08-09: 230 commitsWeek of 2026-08-16: 61 commitsWeek of 2026-08-23: 112 commitsWeek of 2026-08-30: 150 commitsWeek of 2026-09-06: 137 commitsWeek of 2026-09-13: 147 commitsWeek of 2026-09-20: 284 commitsWeek of 2026-09-27: 311 commitsWeek of 2026-10-04: 418 commitsWeek of 2026-10-11: 640 commitsWeek of 2026-10-18: 484 commitsWeek of 2026-10-25: 354 commitsWeek of 2026-11-01: 272 commitsWeek of 2026-11-08: 644 commitsWeek of 2026-11-15: 355 commitsWeek of 2026-11-22: 362 commitsNov 30, 2025Nov 22, 2026
5.1K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 30 commitsSun 1:00 — 39 commitsSun 2:00 — 18 commitsSun 3:00 — 17 commitsSun 4:00 — 7 commitsSun 5:00 — 3 commitsSun 6:00 — 6 commitsSun 7:00 — 16 commitsSun 8:00 — 23 commitsSun 9:00 — 41 commitsSun 10:00 — 49 commitsSun 11:00 — 56 commitsSun 12:00 — 62 commitsSun 13:00 — 63 commitsSun 14:00 — 56 commitsSun 15:00 — 58 commitsSun 16:00 — 55 commitsSun 17:00 — 56 commitsSun 18:00 — 57 commitsSun 19:00 — 63 commitsSun 20:00 — 74 commitsSun 21:00 — 58 commitsSun 22:00 — 72 commitsSun 23:00 — 62 commitsMon 0:00 — 66 commitsMon 1:00 — 58 commitsMon 2:00 — 41 commitsMon 3:00 — 24 commitsMon 4:00 — 3 commitsMon 5:00 — 5 commitsMon 6:00 — 2 commitsMon 7:00 — 5 commitsMon 8:00 — 8 commitsMon 9:00 — 51 commitsMon 10:00 — 54 commitsMon 11:00 — 35 commitsMon 12:00 — 32 commitsMon 13:00 — 53 commitsMon 14:00 — 51 commitsMon 15:00 — 40 commitsMon 16:00 — 53 commitsMon 17:00 — 45 commitsMon 18:00 — 61 commitsMon 19:00 — 64 commitsMon 20:00 — 46 commitsMon 21:00 — 64 commitsMon 22:00 — 61 commitsMon 23:00 — 78 commitsTue 0:00 — 61 commitsTue 1:00 — 58 commitsTue 2:00 — 24 commitsTue 3:00 — 15 commitsTue 4:00 — 0 commitsTue 5:00 — 4 commitsTue 6:00 — 2 commitsTue 7:00 — 5 commitsTue 8:00 — 23 commitsTue 9:00 — 63 commitsTue 10:00 — 39 commitsTue 11:00 — 58 commitsTue 12:00 — 50 commitsTue 13:00 — 50 commitsTue 14:00 — 46 commitsTue 15:00 — 37 commitsTue 16:00 — 41 commitsTue 17:00 — 55 commitsTue 18:00 — 69 commitsTue 19:00 — 29 commitsTue 20:00 — 46 commitsTue 21:00 — 53 commitsTue 22:00 — 60 commitsTue 23:00 — 57 commitsWed 0:00 — 53 commitsWed 1:00 — 34 commitsWed 2:00 — 14 commitsWed 3:00 — 11 commitsWed 4:00 — 7 commitsWed 5:00 — 11 commitsWed 6:00 — 4 commitsWed 7:00 — 8 commitsWed 8:00 — 15 commitsWed 9:00 — 51 commitsWed 10:00 — 40 commitsWed 11:00 — 36 commitsWed 12:00 — 38 commitsWed 13:00 — 46 commitsWed 14:00 — 45 commitsWed 15:00 — 17 commitsWed 16:00 — 41 commitsWed 17:00 — 44 commitsWed 18:00 — 41 commitsWed 19:00 — 45 commitsWed 20:00 — 36 commitsWed 21:00 — 41 commitsWed 22:00 — 47 commitsWed 23:00 — 56 commitsThu 0:00 — 48 commitsThu 1:00 — 49 commitsThu 2:00 — 32 commitsThu 3:00 — 16 commitsThu 4:00 — 13 commitsThu 5:00 — 12 commitsThu 6:00 — 2 commitsThu 7:00 — 8 commitsThu 8:00 — 18 commitsThu 9:00 — 37 commitsThu 10:00 — 55 commitsThu 11:00 — 39 commitsThu 12:00 — 25 commitsThu 13:00 — 39 commitsThu 14:00 — 31 commitsThu 15:00 — 24 commitsThu 16:00 — 35 commitsThu 17:00 — 62 commitsThu 18:00 — 65 commitsThu 19:00 — 27 commitsThu 20:00 — 29 commitsThu 21:00 — 43 commitsThu 22:00 — 60 commitsThu 23:00 — 82 commitsFri 0:00 — 62 commitsFri 1:00 — 21 commitsFri 2:00 — 9 commitsFri 3:00 — 20 commitsFri 4:00 — 10 commitsFri 5:00 — 16 commitsFri 6:00 — 0 commitsFri 7:00 — 2 commitsFri 8:00 — 11 commitsFri 9:00 — 37 commitsFri 10:00 — 52 commitsFri 11:00 — 32 commitsFri 12:00 — 27 commitsFri 13:00 — 45 commitsFri 14:00 — 44 commitsFri 15:00 — 37 commitsFri 16:00 — 44 commitsFri 17:00 — 38 commitsFri 18:00 — 37 commitsFri 19:00 — 26 commitsFri 20:00 — 44 commitsFri 21:00 — 63 commitsFri 22:00 — 60 commitsFri 23:00 — 56 commitsSat 0:00 — 54 commitsSat 1:00 — 31 commitsSat 2:00 — 40 commitsSat 3:00 — 26 commitsSat 4:00 — 38 commitsSat 5:00 — 7 commitsSat 6:00 — 10 commitsSat 7:00 — 13 commitsSat 8:00 — 25 commitsSat 9:00 — 50 commitsSat 10:00 — 60 commitsSat 11:00 — 39 commitsSat 12:00 — 54 commitsSat 13:00 — 67 commitsSat 14:00 — 49 commitsSat 15:00 — 64 commitsSat 16:00 — 60 commitsSat 17:00 — 67 commitsSat 18:00 — 68 commitsSat 19:00 — 71 commitsSat 20:00 — 66 commitsSat 21:00 — 57 commitsSat 22:00 — 58 commitsSat 23:00 — 68 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits4,570 (45%)
Community commits5,543 (55%)

10,113 commits in total over the last year.

DateListRankStars gained
Nov 11, 2026daily#10+374
Nov 10, 2026daily#10+374
Nov 8, 2026daily#10+185
Nov 7, 2026daily#10+185
Nov 4, 2026monthly#7+3,213
Nov 3, 2026monthly#7+3,213
Nov 2, 2026monthly#7+3,150
Oct 19, 2026weekly#7+888
Oct 18, 2026weekly#7+888
Oct 17, 2026weekly#6+779
Oct 16, 2026weekly#5+659
Oct 12, 2026weekly#10+259
Oct 11, 2026weekly#10+259
Oct 10, 2026weekly#9+246
  • morluto/rea

    Reverse engineer anything with agents, from app behavior down to native binaries.

    486.9K stars · TypeScript

  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    459.9K stars · TypeScript

  • openclaw/openclaw

    The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

    395.6K stars · TypeScript

  • anomalyco/opencode

    The open source coding agent.

    230.6K stars · TypeScript

  • firecrawl/firecrawl

    Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

    215K stars · TypeScript

  • n8n-io/n8n

    Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

    212.8K stars · TypeScript