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

@paulrevival/ai-wincon-bar

v0.2.0

Published

Context window status line configurator for Claude Code and Codex

Readme

🪟 ai-wincon-bar

Context-window status lines for Claude Code and Codex.

Claude Code uses the package's colored renderer:

/my-project | [Sonnet 4.6] | ▓▓▓▓▓░░░░░ 45% | ▼:90K ▲:5K ▣:200K | 5h: 12% | 7d: 13% | ⧗ 00h:42m

Codex uses its native TUI status line. The setup wizard maps the same common switches to native Codex fields and preserves fields it does not recognize.

Features

  • One setup wizard and shared config for Claude Code and Codex
  • Project/session name, model, context percentage, token counters, and limits
  • Claude-only progress bar, threshold colors, session clock, and session report
  • Codex-only reasoning effort, Git branch, fast mode, permission profile, cumulative token counters, and theme colors
  • Safe migration from the legacy Claude-scoped data directory
  • Safe Codex uninstall that restores the previous status line unless it was manually changed after setup
  • Installable chat skill for both platforms

Quick start

npm install -g @paulrevival/ai-wincon-bar
ai-wincon-bar config

The wizard detects installed platforms, lets you choose the targets, and labels platform-specific settings. Restart the selected tools afterward. In Codex you can also run /statusline to inspect the native result.

Codex CLI 0.129.0 or newer is required for Codex integration.

Upgrading from 0.1.x

After upgrading, run ai-wincon-bar config again to select Claude Code, Codex, or both and install the matching chat skills. Existing Claude config, cache, and session history are copied from ~/.claude/ai-wincon-bar to the shared config directory on first use; the original files remain available for rollback.

Install from source

npm install
npm run build
npm install -g .
ai-wincon-bar config

For live local development:

npm run build && npm link

Commands

| Command | Description | |---|---| | ai-wincon-bar | Show the current config and previews, or start setup | | ai-wincon-bar config | Run the interactive setup wizard | | ai-wincon-bar sessions | Claude-only session report (--today, --since, --until) | | ai-wincon-bar uninstall | Restore integrations, remove data/skills, uninstall package | | ai-wincon-bar help | Show command help |

Platform integration

Claude Code

Claude Code invokes ai-wincon-bar as a status-line command and sends session JSON through stdin. Setup writes this block to ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "ai-wincon-bar",
    "refreshInterval": 60
  }
}

The optional refresh interval keeps the session clock moving while idle. It is a local render and consumes no API tokens.

Codex

Codex owns the rendering. Setup updates only these keys in the global [tui] section of ~/.codex/config.toml:

[tui]
status_line = ["current-dir", "model-with-reasoning", "git-branch", "context-used", "used-tokens", "context-window-size", "five-hour-limit", "weekly-limit"]
status_line_use_colors = true

Comments, other TOML settings, and unknown/future status-line fields are preserved. Codex profiles are not modified. Exact labels, separators, and colors are controlled by Codex itself.

Settings

| Setting | Claude Code | Codex | |---|---:|---:| | Session name | ✅ | ✅ | | Model name | ✅ | ✅ | | Context percentage | ✅ | ✅ | | Token counters | input/output/window | used/window | | 5-hour and weekly limits | ✅ | ✅ | | Progress bar | ✅ | — | | Session time | ✅ | — | | Yellow/red thresholds | ✅ | — | | Session retention/report | ✅ | — | | Reasoning effort | — | ✅ | | Git branch | — | ✅ | | Fast mode | — | ✅ | | Permission profile | — | optional | | Cumulative input/output | — | optional | | Theme colors | — | ✅ |

Common settings use one switch for all selected platforms. Unsupported fields are skipped for that platform.

Shared config and migration

The shared config, cache, and Claude session history live in:

~/.config/ai-wincon-bar/

XDG_CONFIG_HOME is respected. AI_WINCON_BAR_DIR overrides the complete data directory.

On first use, an existing ~/.claude/ai-wincon-bar config, cache, and sessions file are copied into the shared directory. The originals are retained so an older package version can still be used after rollback. No migration occurs when AI_WINCON_BAR_DIR is set.

Claude session report

Claude's status-line payload includes wall-clock and API duration counters. The renderer records their per-session deltas, and the report groups them by local day and project:

ai-wincon-bar sessions
ai-wincon-bar sessions --today
ai-wincon-bar sessions --since 2026-06-01 --until 2026-06-15

Codex does not invoke this package while rendering its native line, so Codex sessions are intentionally excluded. The tool does not depend on Codex's internal JSONL format.

Chat skill

Setup can install the bundled skill into either or both locations:

~/.claude/skills/ai-wincon-bar/SKILL.md
~/.codex/skills/ai-wincon-bar/SKILL.md

The skill delegates configuration to the CLI so JSON and TOML safety rules stay consistent.

Uninstall behavior

The installer records the pre-existing Codex status-line values. During uninstall it restores them only when the current values still match the last values written by ai-wincon-bar. Later manual edits are left untouched.

Claude's statusLine is removed only if its command still points to ai-wincon-bar.

Development

npm install
npm run lint
npm test
npm run build

Requirements: Node.js 18+, Claude Code and/or Codex CLI 0.129.0+.

License

MIT