npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bjir-cli

v0.1.4

Published

BJIR: Bloat Judgement & I/O Refiner, a token-lean AI coding agent for the terminal.

Readme


What is BJIR?

BJIR is an AI coding agent you run in your terminal. It reads and edits code, runs commands, and talks to a model (Claude, GPT, Gemini, MiMo, local models).

The difference is token usage. Every request is trimmed, every reply is steered to be terse, and noisy tool output (test logs, big JSON, git status) is compressed before it reaches the model. These optimizations are compiled in and always on, so you save without configuring anything. Less context in and less text out means lower cost, faster replies, and longer sessions.

Install

npm (recommended)

npm i -g bjir          # or: bun add -g bjir / pnpm add -g bjir / yarn global add bjir
bjir                   # launch

From source

git clone https://github.com/gogetrekt/bjir
cd bjir
bun install
./bin/bjir.sh

To run bjir from anywhere on a source checkout, symlink it onto your PATH:

ln -s "$PWD/bin/bjir.sh" ~/.local/bin/bjir

API key

BJIR needs a model provider. Launch bjir, open the provider dialog, and add one (OpenAI-compatible, Anthropic-compatible, or a preset). Name, base URL, key, and models are saved and persist across restarts.

Quick start

Run bjir (just bjir) to open the interactive TUI:

bjir                       # open the TUI in the current directory
bjir /path/to/project      # open the TUI in a specific project
bjir run "summarize today's changes"   # one-shot, non-interactive
bjir gain                  # show tokens saved

In the TUI: type to chat, press Tab to switch between the build agent (full access) and the plan agent (read-only), run /reducer to change optimization intensity, and watch the sidebar for a live tokens-saved counter.

Optimizations

Built into the binary, always on. Nothing to configure.

| Optimization | What it does | | --- | --- | | Ponytail | Code-minimalism rules. The agent writes the smallest correct change, so replies and diffs stay small. | | Caveman | Response-style rules that make the model answer tersely. The biggest cut to output tokens. Three intensity levels (see /reducer). | | I/O Refiner | Trims the assembled prompt right before it is sent, cutting input tokens. | | Context Prune | Drops stale history each turn so old context stops costing tokens. | | Read Dedup | Skips re-sending a file that was already read. | | Semantic Read | Returns only the relevant parts of a file when that is enough. | | Tool-output compression | Big tool results are compressed by type: SmartCrusher for large JSON, Log Compressor for build and shell logs, and CCR, which stashes the full output and lets the agent pull back any part on demand. Lossless or skipped. | | RTK | Wraps shell commands (git, cargo, npm, bun, docker) so their output is compressed before the agent sees it. | | BJIR Gateway | A local OpenAI-compatible gateway that routes across providers with automatic fallback and meters token usage. |

Intensity

Caveman has three levels: lite, standard, ultra. Switch live in the TUI with /reducer (also /caveman, /ponytail); it applies on your next message. From the CLI, bjir profile [explain|balanced|ultra] sets a persistent profile. Set BJIR_OPTIMIZE=0 to turn the layer off.

Savings

bjir gain              # ranked table of tokens saved
bjir gain --json       # machine-readable
bjir gain --reset      # clear history

Numbers come from real session data. The TUI sidebar shows a running total.

Commands

Run bjir <command> --help for options.

| Command | Description | | --- | --- | | bjir | Launch the interactive TUI (default). | | bjir run "<prompt>" | One-shot, non-interactive run. | | bjir serve | Run the headless HTTP API server. | | bjir attach | Connect to a running server. | | bjir gain | Show the token-savings summary. | | bjir compress | Caveman-compress memory files (CLAUDE.md, AGENTS.md, .opencode/memory.md). | | bjir profile [name] | Show or switch the optimization profile. | | bjir gateway | Start the BJIR Gateway (usually automatic). | | bjir models | List available models. | | bjir providers | Manage providers and credentials. | | bjir revoke [id] | Remove a connected provider. | | bjir agent | Create and manage agents. | | bjir mcp | Manage MCP servers. | | bjir github | Set up and run the GitHub agent. | | bjir upgrade | Update to the latest version. | | bjir uninstall | Uninstall BJIR. |

Configuration

BJIR reads config from ~/.config/opencode/opencode.json (seeded on first run) and a project-local opencode.json or .opencode/opencode.json. Providers added through the connect dialog are written here. Built-in optimizations are not config; tune them with /reducer, bjir profile, and BJIR_* environment variables.

Agents

Switch with Tab:

  • build: full-access agent for writing and changing code.
  • plan: read-only, denies edits and asks before running commands.

Invoke the general subagent for complex searches with @general.

License

MIT. BJIR is a fork of opencode and is not affiliated with or endorsed by the opencode team.