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

@v0idd0/ctxstuff

v3.0.2

Published

Pack codebases into LLM-ready context. 60+ models with 2026-04-22 pricing — GPT-5.4, Claude Opus 4.7, Gemini 3.1 Pro, Llama 4 Scout (10M ctx), Grok 4.1 Fast, Mistral Large 3, DeepSeek V3.2, Cohere Command A/R7B. Optimize, split, watch, cost-estimate. Runs

Readme

ctxstuff

Pack codebases into LLM-ready context. Cost-estimate before you send. A gift to the terminal from vøiddo.

npm downloads license node

Homepage · GitHub · npm · All tools · Contact


Why ctxstuff

You have a directory of source code and a frontier LLM with a 200K–10M-token context window. You need to turn one into prompt material for the other, in a format that the model actually reads well, while knowing how much this prompt is going to cost before you pay for it.

Every other tool does half of that, paywalls the other half, and hallucinates pricing numbers that haven't been correct since the day they shipped.

ctxstuff does the whole job in one binary, 60+ current models, and no artificial limits. No daily op cap. No 20-file ceiling. No license key. No telemetry. No network calls. You run it locally, it reads your files, it emits markdown/XML/JSON, you paste or pipe, done.

Built because we got tired of manually cat-ing 40 source files into a prompt every time we wanted to ask Claude "does this look right?"

Install

# npm
npm install -g @v0idd0/ctxstuff

# or pnpm / yarn / bun
pnpm add -g @v0idd0/ctxstuff
yarn global add @v0idd0/ctxstuff
bun add -g @v0idd0/ctxstuff

# one-shot via npx (no install)
npx @v0idd0/ctxstuff pack ./src --model claude

Requires Node.js ≥ 14.

What it does

| Command | What it does | |---|---| | pack | Pack a directory into one markdown/XML/plain/JSON context file | | count | Count tokens in a file or directory, per-file breakdown available | | compare | Compare token counts and cost across every supported model | | optimize | Shrink context to fit a target token budget (strip comments, minify, prioritise) | | split | Split a large codebase into chunks that each fit in one prompt | | cost | USD cost estimate across 60+ models, sorted cheapest-first | | watch | Watch a directory and auto-repack on every change (clipboard-aware) | | profile | Save custom model profiles (context + pricing) for your own tokenizer |

Usage

# pack a project to a markdown file
ctxstuff pack ./my-project -o context.md

# pack as XML and copy straight to clipboard
ctxstuff pack ./src --format xml -c

# count tokens across the tree for a specific model
ctxstuff count ./src --model claude-opus-4-7

# per-file breakdown, heaviest first
ctxstuff count ./src --breakdown

# cross-model cost comparison
ctxstuff cost ./src --compare --output 2000

# optimize to fit 500K-token budget
ctxstuff optimize ./src --tokens 500000 --minify -o optimized.md

# split a huge repo into chunks, each ≤ 1M tokens
ctxstuff split ./mega-repo --max-tokens 1000000 -o ./chunks

# watch and auto-repack on file save
ctxstuff watch ./src -o context.md

# see suggested split boundaries without writing anything
ctxstuff split ./src --suggest

# pick files by extension + ignore node_modules-style junk
ctxstuff pack . --ext ts,tsx,md --ignore dist,coverage

Model coverage (60+, pricing snapshot 2026-04-22)

| Provider | Flagship tier | Cheaper tiers | |---|---|---| | OpenAI | gpt-5.4 ($2.50/$15), o3 ($2/$8, reasoning) | gpt-5.4-mini, gpt-5.4-nano, gpt-5, gpt-4.1, gpt-4.1-mini/nano, gpt-4o, gpt-4o-mini, o3-mini, o4-mini | | Anthropic | claude-opus-4-7 ($5/$25, 1M ctx, released 2026-04-16) | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5, claude-3.5-sonnet, claude-3.5-haiku | | Google | gemini-3.1-pro ($2/$12, 2M ctx) | gemini-3-pro, gemini-3-flash, gemini-3.1-flash-lite, gemini-2.5-pro, gemini-2.5-flash | | Meta | llama-4-scout (10M ctx!) | llama-4-maverick, llama-3.3-70b | | Mistral | mistral-large-3 ($2/$6), magistral-medium (reasoning) | mistral-medium-3, mistral-small-4, magistral-small-1.2, codestral | | xAI | grok-4 ($3/$15) | grok-4.1-fast (2M ctx, $0.20/$0.50) | | DeepSeek | deepseek-v3.2 ($0.28/$0.42), deepseek-r2 (reasoning) | — | | Alibaba | qwen3-max ($0.78/$3.90, 262K ctx) | qwen3.5-plus (1M ctx) | | Cohere | command-a ($2.50/$10) | command-r-plus, command-r, command-r7b ($0.0375/MTok — cheapest premium) |

Short aliases (pass to --model): gpt, claude, opus, sonnet, haiku, gemini, gemini-pro, llama, scout, maverick, mistral, magistral, grok, deepseek, qwen, command, reasoning. Every old pre-3.0 key (claude-4-opus, mistral-large-2, etc.) resolves to its 2026-04 equivalent.

Pricing drifts monthly — run ctxstuff cost . --compare to see the numbers the installed version knows. Bump the package when you want fresh data.

Output formats

  • markdown (default) — headers per file, fenced code blocks with language hints. Best for Claude, Gemini, GPT-5.
  • xml — Anthropic's preferred framing (<file path="..."> ... </file>). Best for long Claude runs with tool use.
  • plain — just the raw text, minimal dividers. Best for pipelines that re-process.
  • json — structured output for programmatic consumers: { files: [{ path, lang, content, tokens }], tokens, model }.

Library use

const { pack, count, cost } = require('@v0idd0/ctxstuff');

const result = await pack('./src', {
  model: 'claude-opus-4-7',
  format: 'xml',
  ignore: ['node_modules', 'dist'],
});
console.log(result.tokens, result.content.length);

Why free forever

We are vøiddo — a studio building small, sharp tools and a few serious products (scrb, rankd, gridlock, and more). The serious products pay for themselves. The tools are gifts.

We write ctxstuff because we need to pack our own codebases into LLM context all day, and leaving it free means we don't have to build a billing flow for a CLI utility.

From the same studio

Contributing

Model gone? Price stale? New provider? New output format? Open an issue at github.com/voidd0/ctxstuff/issues or drop a line to [email protected].

License

MIT — see LICENSE.


Built by vøiddo — a small studio shipping AI-flavoured products, free dev tools, Chrome extensions and weird browser games.