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

context0

v2.0.0

Published

Context management across AI agent sessions

Downloads

176

Readme

Context0

Context management across AI agent sessions. Zero LLM dependency — your agent produces all content, Context0 stores, validates, and retrieves it.

AI agents have no memory across sessions. Every new conversation starts from zero. Context0 fixes this with structured context that persists, compresses, and improves over time.

Install

npm install -g context0

Requires Node.js >= 22.

Quick Start

# Initialize in your project
context0 init

# Start a session
context0 session start --intent "Implement authentication module"

# Log observations, commit progress
context0 log "Investigating auth approaches" --type observation
context0 commit "Implemented JWT auth" --rationale "Stateless requirement" --validation tests-passed

# Read it back (lean overview by default)
context0

# End the session — generates metrics + promotion candidates
context0 session end

How It Works

Everything flows through one pipeline:

observe → decide → validate → remember
  • Observe: Log entries, human feedback
  • Decide: Commits with rationale and validation
  • Validate: Every item carries validation status (tests-passed, explicit-approval, etc.)
  • Remember: Best patterns promoted to persistent cross-session context

Context0 maintains two context spaces:

  • Session context (.context0/sessions/): Lives within one session. Branching memory with commit, branch, and merge operations — agents can explore alternatives in isolation.
  • Persistent context (~/.context0/ + .context0/persistent/): Survives across sessions. Human profile, project wisdom, validated patterns. Grows over time.

Commands

Read (the tool's name IS the query)

| Command | Returns | |---------|---------| | context0 | Session overview (~200-300 tokens) | | context0 --branch <name> | Branch summary + recent commits | | context0 --commit <id> [--trace] | Full commit with rationale | | context0 --log [--lines N] | Raw observation/thought/action trace | | context0 --conversation | Human feedback with reasoning | | context0 --decisions | Expanded architecture decision refs | | context0 --arch | Agent-written architectural knowledge | | context0 --git | Live git status + deps (no session required) | | context0 --persistent | Profile + wisdom + patterns + trend | | context0 --all [--budget N] | Everything, token-budgeted |

Write

| Command | Description | |---------|-------------| | context0 log <entry> | Append observation/thought/action to current branch | | context0 feedback <type> <msg> | Record human feedback (correction, preference, decision, note) | | context0 commit <summary> | Checkpoint progress with rationale and validation | | context0 branch create <name> | Create exploration branch | | context0 merge <branch> | Merge branch back with origin tags | | context0 meta set <segment> <json> | Write architectural metadata |

Lifecycle

| Command | Description | |---------|-------------| | context0 init | Initialize .context0/ and ~/.context0/ | | context0 session start | Start session (auto-ends stale sessions) | | context0 session end | End session, generate metrics + promotion candidates | | context0 session resume <id> | Reactivate a previous session | | context0 session list | List all sessions | | context0 session export <id> | Export session as JSON or Markdown | | context0 status | Dashboard with metrics | | context0 promote | Review and promote patterns to persistent context | | context0 profile | View/update human profile |

Global Flags

| Flag | Effect | |------|--------| | --quiet | Suppress status messages | | --json | Machine-readable JSON output |

Agent Integration

See AGENT.md for a ready-to-use system prompt snippet.

Development

npm run build       # Build with tsup
npm test            # Run tests (vitest)
npm run lint        # Type-check (tsc --noEmit)
npm run test:watch  # Watch mode

License

MIT