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

@johnnyboy11234/claude-code-statusline

v0.1.1

Published

A local-first Claude Code statusline CLI with powerline and plain renderers.

Readme

Claude Code Statusline

A local-first TypeScript statusline for Claude Code.

It renders a compact, high-signal statusline from Claude Code stdin JSON and prints the final result to stdout. The project is designed for fast local execution, clean extensibility, and practical daily use across multiple Claude Code sessions.

Install

This package is published as a scoped npm package because the unscoped claude-code-statusline package name is already taken.

npm install -g @johnnyboy11234/claude-code-statusline

After installation, the global command is:

claude-code-statusline

Use With Claude Code

Add this to your Claude Code settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "claude-code-statusline",
    "padding": 0
  }
}

That is all another machine needs:

  1. Install Node.js 20 or newer
  2. Run npm install -g @johnnyboy11234/claude-code-statusline
  3. Set Claude Code statusLine.command to claude-code-statusline

Features

  • Local-first CLI with no server requirement
  • TypeScript architecture with clear separation between input, providers, widgets, and renderers
  • MVP widgets: model, cwd, git, context, pet, session
  • plain and powerline renderers
  • ANSI color output with Nerd Font and ASCII fallback support
  • Short-lived cache for git and transcript-derived metadata
  • JSON config with schema validation via zod

Configuration

Supported config locations:

  • Project config: .claude-best-statusline.json
  • Backward-compatible project config: .claude-code-statusline.json
  • User config: ~/.config/claude-best-statusline/config.json
  • Backward-compatible user config: ~/.config/claude-code-statusline/config.json

Supported config fields:

  • renderer: plain or powerline
  • widgets: ordered widget list
  • nerdFont: enable Nerd Font separators
  • theme: override tone colors and separators

Example:

{
  "renderer": "powerline",
  "widgets": ["model", "cwd", "git", "context", "pet"],
  "nerdFont": true,
  "theme": {
    "info": { "fg": "255", "bg": "25" },
    "success": { "fg": "16", "bg": "78" },
    "warning": { "fg": "16", "bg": "220" },
    "danger": { "fg": "255", "bg": "160" }
  }
}

Local Development

pnpm install
pnpm build
pnpm test

Useful commands:

pnpm demo
./bin/claude-statusline < sample-input.json

Publish

Publish flow:

pnpm build
pnpm test
env npm_config_cache=/tmp/claude-code-statusline-npm-cache npm pack --dry-run
env npm_config_cache=/tmp/claude-code-statusline-npm-cache npm publish

If npm 2FA is enabled:

env npm_config_cache=/tmp/claude-code-statusline-npm-cache npm publish --otp=<code>

Project Structure

bin/
  claude-statusline
src/
  main.ts
  types.ts
  input.ts
  config.ts
  theme.ts
  cache.ts
  providers/
    git.ts
    transcript.ts
    session.ts
  widgets/
    model.ts
    cwd.ts
    git.ts
    context.ts
    pet.ts
    session.ts
    index.ts
  renderers/
    plain.ts
    powerline.ts
test/
  input.test.ts

License

MIT