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

@contextpack/cli

v1.0.1

Published

npm for AI agent context files — install, share, and manage CLAUDE.md / .cursorrules / AGENTS.md as versioned dependencies

Downloads

296

Readme

contextpack

The package manager for AI agent context files.

What is contextpack?

contextpack manages context files for AI coding assistants (Claude Code, Cursor, Windsurf, Codex, GitHub Copilot). Instead of manually maintaining CLAUDE.md, .cursorrules, and other tool-specific files, you install packs from a registry and generate consolidated context files.

Installation

npm install -g @contextpack/cli

Quick Start

# Initialize contextpack in your project
contextpack init

# Add packs
contextpack add community/typescript
contextpack add community/react
contextpack add community/nextjs

# Generate context files for your AI tools
contextpack generate

This creates:

  • CLAUDE.md for Claude Code
  • .cursor/rules/contextpack.mdc for Cursor
  • .windsurfrules for Windsurf
  • AGENTS.md for OpenAI Codex
  • .github/copilot-instructions.md for GitHub Copilot

Commands

contextpack init

Initialize contextpack in your project. Creates .contextpack/manifest.yaml and .contextpack/overrides.md. Prompts for which AI tools to configure.

contextpack init

contextpack add <pack>

Add a pack from the registry. Resolves the latest version and caches it locally.

contextpack add community/typescript
contextpack add community/[email protected]  # specific version

contextpack generate

Generate context files from installed packs. Merges all pack rules with your project overrides and writes to each enabled tool's output file.

contextpack generate

contextpack remove <pack>

Remove a pack from your project and regenerate context files.

contextpack remove community/typescript

contextpack update

Check for pack updates and apply them.

contextpack update
contextpack update --dry-run  # see what would change
contextpack update --pack community/typescript  # update specific pack

contextpack inspect

Show project configuration: installed packs, enabled targets, overrides status.

contextpack inspect
contextpack inspect --json  # machine-readable output

contextpack search <query>

Search the pack registry.

contextpack search typescript
contextpack search react --limit 10

contextpack login

Authenticate with the contextpack registry via GitHub OAuth.

contextpack login

contextpack publish

Publish a pack to the registry. Requires a pack.yaml in the current directory.

contextpack publish

Project Structure

After running contextpack init and contextpack add:

my-project/
├── CLAUDE.md                          # generated
├── .cursor/rules/contextpack.mdc      # generated
├── .contextpack/
│   ├── manifest.yaml                  # project state (commit this)
│   ├── overrides.md                   # project customizations (commit this)
│   └── cache/                         # cached pack content (gitignore)
└── .gitignore                         # updated with .contextpack/cache/

Manifest

.contextpack/manifest.yaml stores project configuration:

version: 1

project:
  name: my-project
  mode: managed

targets:
  - id: claude-code
    enabled: true
  - id: cursor
    enabled: true
  - id: windsurf
    enabled: false

packs:
  - id: community/typescript
    version: 1.0.0
    source: community
  - id: community/react
    version: 1.0.0
    source: community

overrides:
  file: .contextpack/overrides.md

Overrides

.contextpack/overrides.md lets you customize pack rules for your project:

# Project Overrides

## React
- Use class components instead of hooks
- No server components

## Testing
- Skip tests for utility functions

Overrides appear last in generated context files, so AI models treat them as higher priority.

Generated Files

Generated files contain a managed block:

# Your existing content above (preserved)

<!-- contextpack:managed:start -->

## TypeScript
...pack content...

## React
...pack content...

## Project Overrides
...your overrides...

<!-- contextpack:managed:end -->

# Your existing content below (preserved)

Only the managed block is updated. Your own content outside the markers is never touched.

Creating a Pack

  1. Create a directory with:

    • pack.yaml — pack metadata
    • rules.md — pack content (markdown)
  2. pack.yaml format:

scope: community
name: my-pack
version: 1.0.0
description: "Description of your pack"
tags: [tag1, tag2]
files: rules.md
  1. Publish:
contextpack login
contextpack publish

Available Packs

Browse packs at contextpack.dev or use:

contextpack search <query>

License

MIT