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

cannbot-insight

v0.2.36

Published

Session-level observability tool for LLM coding agents (opencode/Claude Code)

Readme

CANNBot-Insight

Session-level observability for LLM coding agents: import agent session logs and analyze tokens, context, subagents, and skill usage turn by turn.

中文文档

Features

Import SQLite (opencode.db) or JSONL (native Claude Code / cpx proxy captures; plaintext, .jsonl.7z and legacy .jsonl.gz, cpx- prefix handled) and explore the session detail tabs:

  • Tokens & Cost — 5-item per-turn token breakdown vs the model's context window, plus cost estimation
  • Context Growth — Per-subagent context growth curves with animated replay; /compact markers
  • Context Governance — Per-turn LLM input composition: visible messages + stable System overhead
  • Subagent Tracking — Subagent sessions and dispatch→response bridges, inline in the timeline
  • Turn Quick-Jump — Type #459 + Enter in the Turns timeline to jump to that turn
  • Wire Rounds (proxy captures) — Per-round full wire input/output, cross-checked against the DB reconstruction; shown with -a
  • Skill Events / Coverage / Content — Per-turn skill events, available-skills vs used comparison, SKILL.md full-text rebuild
  • Agent Definition Recovery — One-click full text of dispatched agents' .md definitions: session system-injection first, disk scan fallback
  • Concept Tracing — Cross-turn keyword search, propagation chains and DAG; filter by source/thinking/tool
  • File Read Analysis / Restore / Gather — Duplicate-read detection, per-file line-by-line rebuild, whole-directory rebuild as zip
  • Session Compare — Two sessions side by side: tokens / cost / latency / tools / subagents
  • Trajectory Scoring — Six-dimension scorecard (completion veto / trust / quality / efficiency / redundancy / autonomy + custom dims), baseline comparison and scoring profiles
  • Audit — Workflow audit (flow chart + per-node findings + priorities) and Skill audit (real execution vs SKILL.md / agent definitions / workflow declarations)
  • Key Redaction (proxy captures) — API keys never touch disk: masked (abcd…wxyz) at the single write chokepoint
  • CANNBay Viewer — homepage entry: paradigm sidebar over the data lake (partial clone, on-demand fetch), run list (description / author / tool / operator-generation annotation, metrics and score vs baseline), operator-generation duration chart (configurable baseline/expected reference lines), one-click import into the session detail page, and per-session experiment notes / scorecard snapshots written back to the data lake (team-shared)

The homepage Sessions list supports keyword / session-ID search; the import dialog offers one-click default paths.

Install & Usage

Option 0: npm install (Recommended)

npm install -g cannbot-insight
cannbot-insight            # first run: auto-build + migrate (~30s-2min), then start + open browser
  • Requires Node.js >= 20; mainland-China networks can add --registry=https://registry.npmmirror.com
  • Offline fallback: npm install -g ./cannbot-insight-<version>.tgz
  • Writable state lives in ~/.cannbot-insight/; default port 21025 (auto-increments if occupied)
  • CLI subcommands pass through: cannbot-insight upload --file … --list / sessions; short alias cbi
  • Python 3 optional (starts the smart-agent analysis backend when present)
  • Alternate brand: npm install -g context-insight — the same tool published under the Context-Insight name (commands context-insight / ctxi, data dir ~/.context-insight/); session data is fully interchangeable with cannbot-insight (shared format identity)

| Flag | Effect | |------|--------| | -a, --advanced | Show advanced tabs (wireRounds/replay) | | -k, --kill | Stop all insight/smart-agent instances of this repo, then start on 21025 (falls back to the next free port if occupied by others) | | -f, --fresh | Clear the build cache and rebuild | | -h, --help | Print the full CLI reference — all subcommands and flags (incl. -v, --version) |

Option 1: Web UI from source

./start.sh              # production mode (default): cached build + zero per-request compile
./start.sh -u           # update deps, then start
./start.sh -f           # force a fresh build
./start.sh -d           # dev mode (hot reload while editing source)
  • Requires Node.js >= 20; ./start.sh also installs the cpx capture command (see ../cpx/README.md)
  • Open http://localhost:21025

Log file locations:

  • opencode: ~/.local/share/opencode/opencode.db
  • Claude Code: ~/.claude/projects/ (directory auto-scan)

The Web UI also supports: exporting sessions to standalone SQLite or Markdown; uploading to the CANNBay dataset repo (paradigm directory + operator-generation outcome annotation + optional baseline, with mandatory secret governance before push); on-demand import from the CANNBay list. The data-lake remote, auth, and branch are configurable in Settings (credentials stay in browser localStorage). The LLM provider panel embeds a known-provider Base URL quick reference. When the data repo has LFS enabled on the platform, set env CANNBAY2_LFS=1 (or request config lfs) to store .jsonl.7z sessions as LFS pointers — capacity escapes the git repo quota, and the import path handles it transparently (meta stays a plain blob; session payloads are fetched from LFS storage on demand).

Option 2: CLI Upload + Web Analysis

For SSH remotes and other browser-less environments (one-time npm install + npx prisma migrate deploy; the upload command auto-starts the backend afterwards):

# opencode: list / upload specific / interactive
npx tsx src/cli/index.ts upload --file ~/.local/share/opencode/opencode.db --list
npx tsx src/cli/index.ts upload --file ~/.local/share/opencode/opencode.db --session-id <id> --description "desc" --yes --json

# Claude Code: directory scan / single file
npx tsx src/cli/index.ts upload --file ~/.claude/projects/ --list
npx tsx src/cli/index.ts upload --file ~/.claude/projects/<hash>/<uuid>.jsonl --session-id <uuid> --yes --json

| Option | Description | |--------|-------------| | --file <path> | Source path (.db / .jsonl / directory; type auto-detected) | | --session-id <id> | Pick a specific session (skip the interactive picker) | | --description <text> | Upload description | | --yes / --json | Skip confirmation / JSON output (script-friendly) | | --list | List available sessions only |

After upload, click the CANNBay button in the Web UI to pick a paradigm directory and import — no manual clone needed.