ranxianglei

    ranxianglei/billion-context

    #83 this week

    A context-compression plugin for month-long single sessions (billions of tokens) ,small context windows (a 100K context is enough) and token savings (5x fewer tokens) .上下文压缩插件,月级长会话会话, 兼顾小窗口(100k上下文足矣)省token(省5倍token) . billion-context is all you need

    web
    dsh-plugin
    TypeScript
    NOASSERTION
    4.1K stars
    335 forks
    7 GitHub watchers
    Updated Nov 6, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    Ranks #15 among Web repositories ranked this week, and #12 over the last 30 days; #83 of 182 repositories with measured growth this week (top 46%).

    This week's +773 stars is in line with its 30-day pace of about +817 per week.

    5 releases in the last 90 days, the latest 3 days ago, with 84 contributors on GitHub.

    Peaked at #4 in the weekly ranking the week of Oct 18, its best in the past year.

    Use Cases & Benefits

    • Provides a context-compression plugin that enables long-lived AI sessions by compressing conversation context into layered summaries.
    • Reduces token usage by 5x and supports month-long single sessions with billions of tokens using small context windows around 100K tokens.
    • Use for extending AI coding agents' session length without context window overflow or degradation in multi-day coding workflows.
    • Use for integrating with various AI clients like pi, opencode, dsh, and claude to transparently compress and manage conversation context.
    • Use for optimizing token costs and maintaining high-fidelity context in applications requiring incremental, reversible, and prefix-cache friendly compression.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    Other

    GitHub could not identify this license; read the LICENSE file before depending on it.

    Community files

    • README: present

    Watch-outs

    • License not identified by GitHub; read the LICENSE file before depending on it.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    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 install -g billion-context --prefix=~/.local

    Cache health at a glance: a healthy session keeps a 95–97% 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.

    Excerpt from the ranxianglei/billion-context README on GitHub (NOASSERTION license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Oct 7: +38Oct 8: +22Oct 9: +60Oct 10: +54Oct 11: +116Oct 12: +102Oct 13: +116Oct 14: +76Oct 15: +99Oct 16: +111Oct 17: +166Oct 18: +173Oct 19: +161Oct 20: +131Oct 21: +109Oct 22: +135Oct 23: +149Oct 26: +200Oct 27: +132Oct 28: +162Oct 29: +137Oct 30: +89Oct 31: +93Nov 1: +65Nov 2: +69Nov 3: +134Nov 4: +185

    +3,540 stars over 31 days across 30 snapshot days; best day +200 on Oct 26.

    Forks

    335+276

    Open issues

    841+737

    Compared with peers in Web

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    ranxianglei/billion-context compared with Web repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    pingdotgg/t3code48.4K+16.6K40today
    pbakaus/impeccable104.0K+8.7K5410 days ago
    HunYiSage/dsh-purge19.2K+6.2K13today
    Renhuai123/ziwei-doushu16.2K+6.1K4421 days ago
    paperclipai/paperclip111.5K+2.8K5913 days ago
    ranxianglei/billion-context4.1K+773553 days ago
    Category median48.4K+6.2K44—

    Discover Repositories

    Search across tracked repositories by name or description