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

topcode

v0.7.0

Published

TopCode — next-generation CLI agent framework (State-Manifold paradigm)

Readme

TopCode

Next-generation CLI agent framework — zero model lock-in, state-manifold context management, and a full-screen terminal UI.

TopCode does not use native tool calls. The model interacts with your environment strictly through Markdown-fenced JSON commands, which are intercepted mid-stream, executed, and compressed back into [SYSTEM ASSERTION] state assertions — keeping context flat even across long sessions.

Install

npm install -g topcode

Requires Node.js ≥ 18.

Quick start

cd your-project
topcode

On first run, an interactive setup wizard asks for your API endpoint, key, and model, and saves them to ~/.topcode/config.json (user-level, mode 0600). Any OpenAI-compatible endpoint works (OpenAI, DeepSeek, local vLLM/Ollama, …).

You can also configure via environment variables:

export TOPCODE_BASE_URL=https://api.openai.com/v1
export TOPCODE_API_KEY=sk-...
export TOPCODE_MODEL=gpt-4o

Or per-project via topcode.config.json in the project root (highest priority):

{
  "provider": {
    "base_url": "https://api.deepseek.com",
    "api_key": "sk-...",
    "models": { "deep": "deepseek-chat", "quick": "deepseek-chat" },
    "category": "openai"
  }
}

Configuration precedence: project topcode.config.json > user ~/.topcode/config.json > environment variables > defaults.

Usage

| Command | Description | | --- | --- | | topcode | Launch the interactive TUI | | topcode -p "fix the failing test" | Non-interactive single prompt (CI / pipes) | | topcode --no-tui | Legacy line-based REPL |

TUI keys

| Key | Action | | --- | --- | | Enter | Send message / run highlighted slash command | | / | Input history (or navigate the slash-command menu) | | Esc | Cancel the current generation / close menu or overlay | | Ctrl+P | Session history picker (last 3 archived sessions) | | Ctrl+C | Cancel generation (busy) / exit (idle) |

Typing / opens the slash-command menu with live filtering.

Slash commands

| Command | Description | | --- | --- | | /help | Show all commands and keys | | /new | Archive the current session and start a new one | | /clear | Clear the transcript view | | /model [name] | Set the model (all lanes), persisted to user config | | /language [en\|zh] | Switch UI language (default English) | | /status | Show version, model, endpoint, session info | | /version | Show version | | /resume | Resume a recent session (same as Ctrl+P) | | /export [file] | Export the transcript to a Markdown file | | /init | Scaffold TOPCODE.md project memory (injected into the context projection) | | /exit /quit | Exit TopCode |

Only the last 3 archived sessions are kept per project (topcode-sessions.json, git-ignored) — long-term memory lives in the state manifold, not in chat tapes.

Available actions (model → environment)

read_file · modify_file · run_terminal · query_ast_graph

High-risk modifications are snapshot-protected (git-based rollback), and action results are compressed into state assertions instead of raw stack traces.

How it works

  1. Stream interception — LLM output is parsed mid-stream by an incremental state machine; a closed ````json` fence aborts generation immediately.
  2. State manifold — local JSON knowledge graph of your project; each turn projects only the minimal sufficient context.
  3. Context pruning — action results never enter the conversation raw; they are distilled into one-line assertions.

Links

License

AGPL-3.0