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

@twoergosum/cogito

v0.1.0

Published

Cogito — an ErgoSum-aware TUI chat shell. Owns the chrome, routes Anthropic traffic through the ErgoSum proxy.

Readme

cogito

Cogito, ergo sum. An ErgoSum-aware TUI chat shell.

Cogito is a terminal chat client that wraps Anthropic's Claude (via the official claude CLI or the @anthropic-ai/sdk) and routes every request through the ErgoSum context proxy. It owns the input box, slash commands, status bar, and transcript styling — model output streams through unchanged.

It is not a harness: when used in claude-cli backend mode, cogito spawns the real Claude Code binary in headless streaming mode, so traffic genuinely originates from Claude Code and Anthropic's third-party OAuth-token restrictions don't apply.

╭─────────────────────────────────────────────────────────────────────────────╮
│ cogito Pro  ∴ ergo sum    proxy ● inject :49200    •  via claude-cli → opus │
│ turns 3   tok in/out 4.2k/812   last 1.4s   inject trim 1 · 4 sect          │
│ related  Trim · Stack · Database · CLI Package · API & Server  · +8  ^p     │
╰─────────────────────────────────────────────────────────────────────────────╯

╭─╮
│∴│  Adding the version slot now reads from `package.json`...
╰─╯

Install

npm install -g @twoergosum/cogito

You'll also want:

  • ergosum-clinpm i -g ergosum-cli. Cogito will auto-start ergosum proxy on launch.
  • One of the two Anthropic backends:
    • Claude Pro/Max users: install Anthropic's claude CLI and run claude login.
    • API users: export ANTHROPIC_API_KEY=sk-....

Run

cogito                # interactive TUI
cogito --check        # print backend + proxy state, no UI
cogito --version

Backend is auto-detected at startup: ANTHROPIC_API_KEYanthropic-api; else claude on PATHclaude-cli. Switch at runtime with /backend.

Slash commands

| Command | What it does | |---|---| | /help | Show all commands | | /quit · /exit | Exit cogito | | /clear | Clear conversation history | | /compact [N] | Drop older turns, keep last N (default 4) | | /cost | Estimated session cost (Opus pricing) | | /status | Backend + proxy + session state | | /model [name] | View or switch model | | /backend <claude-cli\|anthropic-api> | Switch backend | | /proxy <on\|off\|pause\|resume\|status> | Manage ErgoSum proxy | | /inject · /smart | Switch proxy mode | | /pages | List workspace pages | | /grab <slug> | Attach a page to your next message | | /search <query> | Semantic search across the workspace | | /init · /login · /memory | Pass-through to the ergosum CLI | | /resume [id\|prefix\|#] | Open the session picker, or resume by id directly |

Keybindings

| Key | Action | |---|---| | Enter | Send message | | / | Open slash palette (↑/↓ navigate, Tab/Enter pick, Esc dismiss) | | ↑/↓ (or mouse wheel) | Scroll transcript by 1 | | PgUp / PgDn (or Shift+↑/↓) | Scroll by page | | g / G | Jump to top / bottom | | Ctrl+P | Toggle the workspace pages panel | | Ctrl+C | Quit |

Architecture

┌──────────────────┐    ┌────────────────────┐
│      Cogito      │───▶│  Backend (CLI/API) │──▶ Anthropic
│  (Ink TUI shell) │    └────────────────────┘
└────┬─────────────┘             ▲
     │  reads / shells out       │  via http://localhost:49200
     ▼                           │  (api backend only)
  ergosum proxy ─────────────────┘
  (state @ ~/.config/ergosum/, logs @ /tmp/ergosum-proxy.log)
  • Status bar: polls the proxy's well-known PID + pause files every 2s and tails the proxy log for trimmed N · retrieved M sections events.
  • Related pages: scored client-side by keyword overlap between page titles and the last 6 messages, tie-broken by updated_at recency.
  • Resume: reads ~/.claude/projects/<encoded-cwd>/<session-id>.jsonl, extracts user/assistant + tool-call/tool-result blocks, and hands the session id back to claude --resume.
  • Alt-screen mode: cogito takes over the terminal so streaming re-renders never disturb scrollback. Released cleanly on exit.

What cogito doesn't do

  • No agent loop / tool implementation. When you use claude-cli, tools are Claude Code's own. The anthropic-api backend is text-only in v1.
  • No proprietary ErgoSum logic. Cogito only reads the proxy's public on-disk state and the ergosum CLI / API surface. Trim, inject, and retrieval algorithms live in the ErgoSum server.

Development

npm install
npm run build
node dist/index.js

License

Apache 2.0 — see LICENSE and NOTICE.