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

ctx-for-ai

v0.1.1

Published

Terminal context manager for AI coding agents. Generates .ctx.md files that agents read as system context.

Readme

ctx

Terminal context manager for AI coding agents.

ctx generates a .ctx.md file that summarizes your project — tech stack, structure, environment, conventions, architecture. AI agents (Claude Code, Codex, Gemini CLI, Cursor) read it as their first action, skipping expensive project rediscovery.

ctx demo

Why

Every time an AI coding agent starts a session, it burns tokens rediscovering your project. ctx init gives it everything it needs in one file.

Install

npm install -g ctx-cli

Quick Start

cd your-project
ctx init

That's it. Your .ctx.md is ready for agents to read.

Usage

ctx init

Scan the project and generate .ctx.md:

ctx init                    # Generate .ctx.md (default)
ctx init -f json            # Generate .ctx.json instead
ctx init -d 5               # Scan 5 levels deep (default: 3)
ctx init -o docs/ctx.md     # Custom output path
ctx init --dry-run           # Preview without writing

ctx check

Verify your context file is up to date:

ctx check                   # Returns exit 0 if fresh, 1 if stale
ctx check -f json           # Check JSON format (preserves state)

Use in CI to catch stale context files:

# .github/workflows/ctx.yml
- run: ctx check || (echo "Run 'ctx init' to update" && exit 1)

ctx update

Re-scan and update the context file:

ctx update                  # Re-scan and update .ctx.md
ctx update --show-diff      # Show what changed
ctx update --dry-run        # Preview changes without writing

ctx ignore

Exclude files from scanning:

ctx ignore node_modules     # Add to .ctxignore
ctx ignore "*.test.ts"      # Ignore test files
ctx ignore dist             # Ignore build output

What It Detects

| Category | Examples | |----------|----------| | Languages | TypeScript, Python, Go, Rust, Java, Ruby | | Frameworks | Express, FastAPI, Gin, Django, Rails, Spring | | Test frameworks | Vitest, Jest, Pytest, Go testing, RSpec | | Linters | ESLint, Pylint, golangci-lint | | Package managers | npm, yarn, pnpm, bun, pip, cargo | | Type checkers | TypeScript, mypy | | Environment vars | From .env.example, Dockerfile, docker-compose.yml | | Scripts/Commands | From package.json, pyproject.toml, Makefile, Cargo.toml | | Project structure | Directory tree, key files, entry points |

Output Formats

Markdown (default)

Generates a human-readable .ctx.md with sections:

# my-project

## Project Overview
A REST API for managing widgets.

## Tech Stack
- **Languages:** TypeScript
- **Frameworks:** Express
- **Runtime:** Node.js
- **Testing:** Vitest

## Project Structure
- **Files:** 47
- **Directories:** 12

## Environment
- `PORT` (required) — Server port
- `DATABASE_URL` (required) — PostgreSQL connection string

## Commands
- `dev` — Start development server
- `test` — Run tests
- `build` — Build for production

JSON

Machine-readable .ctx.json for programmatic use:

ctx init -f json
cat .ctx.json | jq '.techStack'

Supported Projects

| Language | Package Manager | Detected Files | |----------|----------------|----------------| | Node.js | npm, yarn, pnpm, bun | package.json, lockfiles | | Python | pip, poetry, uv | pyproject.toml, requirements.txt | | Go | go modules | go.mod | | Rust | cargo | Cargo.toml | | Java | maven, gradle | pom.xml, build.gradle | | Ruby | bundler | Gemfile |

How Agents Use It

When an agent reads .ctx.md, it immediately knows:

  • What language and framework you're using
  • Where the entry points are
  • What environment variables are needed
  • What commands to run (dev, test, build)
  • Project conventions and patterns

This eliminates the first 30-60 seconds of every agent session spent on project discovery.

Development

git clone https://github.com/smarthomeo/ctx.git
cd ctx
npm install
npm test        # Run 155 tests
npm run build   # Build to dist/

License

MIT