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

ctop-claude

v1.0.0

Published

Terminal UI for monitoring and managing Claude Code sessions

Downloads

20

Readme

CTOP — Claude Terminal Operations Panel

License: MIT Platform: macOS | Linux Node.js Zero Dependencies PRs Welcome

A terminal UI for monitoring and managing Claude Code sessions. Think htop, but for your Claude processes.

Track CPU, memory, token usage, context window saturation, active branches, and more — all from a single terminal pane.


Features

  • Real-time process monitoring — CPU, memory, status, uptime for every Claude session
  • Context window tracking — visual bar showing input, cache, output, and free context (out of 200k)
  • Token breakdown — input, output, cache creation, and cache read token counts per session
  • Session metadata — model, branch, slug, session ID, service tier, version
  • Two view modes — list view (table) and pane view (card grid)
  • Process control — kill individual or all sessions (graceful SIGTERM or force SIGKILL)
  • Vim-style navigationhjkl, g/G, arrow keys
  • Sort & filter — sort by CPU, memory, context %; filter by branch, model, directory, or slug
  • Configurable — refresh interval, context limit, default view via ~/.ctoprc or CLI flags
  • Cross-platform — macOS and Linux (Windows planned)
  • Zero dependencies — pure Node.js, no npm install required
  • Auto-refresh — configurable interval (default 5s)

Installation

npm (recommended)

npm install -g ctop-claude
ctop

Or run without installing:

npx ctop-claude

From source

git clone https://github.com/aakashadesara/ctop.git
chmod +x ctop/claude-manager
ln -s "$(pwd)/ctop/claude-manager" /usr/local/bin/ctop

One-liner

curl -o /usr/local/bin/ctop https://raw.githubusercontent.com/aakashadesara/ctop/main/claude-manager
chmod +x /usr/local/bin/ctop

Verify

ctop

If no Claude processes are running, you'll see an empty state. Start a Claude Code session and ctop will pick it up on the next refresh.


Recommended aliases

Add these to your ~/.zshrc or ~/.bashrc:

# Launch ctop
alias ctop="/usr/local/bin/ctop"

# Quick-kill all Claude sessions (no TUI, just nuke them)
alias ckill="pkill -f 'claude'"

Then reload:

source ~/.zshrc

Usage

Keyboard shortcuts

| Key | Action | |-----|--------| | / k | Move selection up | | / j | Move selection down | | / h | Move left (pane mode) | | / l | Move right (pane mode) | | g | Jump to first process | | G | Jump to last process | | P | Toggle list / pane view | | s | Cycle sort: age → cpu → mem → context | | S | Reverse sort order | | / | Start filter (type to search, Enter to confirm) | | ESC | Clear filter (or quit if no filter active) | | r | Refresh process list | | x | Kill selected process (SIGTERM) | | X | Force kill selected process (SIGKILL) | | K | Kill ALL Claude processes | | A | Kill all stopped/zombie processes | | ? | Show help | | q | Quit |

Context window visualization

The context bar shows how much of the 200k token window is consumed:

[████████░░░░░░░░░░░░░░░░░░░░░░] 27% used
 ▲ green   ▲ blue     ▲ cyan      ▲ yellow  ▲ gray
 input     cache-w    cache-r     output    free

Color coding:

  • Green — 70%+ free (healthy)
  • Yellow — 40–70% free
  • Orange — 10–40% free (getting tight)
  • Red — <10% free (near limit)

Detail pane

On wide terminals (140+ cols), a detail pane appears showing full session info: model, branch, slug, token breakdown, turn duration, session ID, and more.


Configuration

CLI flags

ctop --refresh 3          # Refresh every 3 seconds
ctop --context-limit 128000  # Set context window to 128k
ctop --pane               # Start in pane/grid view

Config file (~/.ctoprc)

{
  "refreshInterval": 5000,
  "contextLimit": 200000,
  "defaultView": "list"
}

CLI flags override config file values.


Requirements

  • macOS or Linux (uses ps + lsof on macOS, ps + /proc on Linux)
  • Node.js 18+
  • Claude Code installed and running sessions

How it works

ctop reads process info from ps, resolves working directories via lsof, and enriches each process with session metadata by parsing Claude Code's local .jsonl session files in ~/.claude/projects/. No network calls. No external dependencies. Everything stays local.


Roadmap

  • [x] Linux supportps + /proc based process detection
  • [x] npm packagenpm install -g ctop-claude
  • [x] Configurable settings — refresh interval, context limit, default view
  • [x] Sort — cycle through age, CPU, memory, context %
  • [x] Filter — search by branch, model, directory, slug, title
  • [ ] Windows support — PowerShell-based process detection
  • [ ] Homebrew formulabrew install ctop
  • [ ] Process log tailing — stream a session's output in a split pane
  • [ ] Color themes — custom or preset color schemes

Contributing

PRs are welcome! This is a young project and there's plenty to improve.

# Fork & clone
git clone https://github.com/<your-username>/ctop.git
cd ctop

# The entire app is a single file — no build step
# Just edit and run:
./claude-manager

A few areas where contributions would be especially helpful:

  • Windows compatibility — the biggest gap right now
  • Tests — there are none yet
  • Linux testing — basic support is in, needs real-world validation
  • Performance — profiling on systems with many Claude sessions
  • UI polish — better responsive layouts, color themes

Please open an issue first for large changes so we can discuss the approach.


License

MIT — use it however you want.