Case file · STN-02Ready for AI

Part no. CZ-01 · open source · The packing machine

ContextZip

Packs exactly the right parts of a codebase for any AI tool, in one command.

Built by Deepesh Kumar

The problem

Every AI coding session starts the same way. Hunt down the relevant files, skip node_modules and build output by hand, zip it all, find the zip, upload it. Next session, do it again.

Do it in a hurry and the .env file rides along with everything else.

What I built

An open-source CLI, contextzip (or cz for short), that does the whole routine from the project root with no flags.

The same machine in four more housings: a browser version at contextzipcli.com where files never leave your computer, a VS Code extension that bundles the CLI, an MCP server for AI agents, and standalone builds on npm, Homebrew and Scoop for machines without Python.

How it works

  1. 01 · Detect

    Reads marker files like package.json, next.config.*, pyproject.toml, manage.py, Cargo.toml and go.mod. A monorepo with a Next.js frontend and a FastAPI backend gets both rule sets.

  2. 02 · Reject

    Leaves out dependencies, build output, caches, binaries, logs and everything in your .gitignore files. --git-changes packs only what git reports as staged, modified or untracked.

  3. 03 · Redact

    .env files, private keys, cloud credentials and Terraform state stay out by default. Include a .env on purpose and its values are redacted.

  4. 04 · Pack

    Writes one ZIP with a report of what went in and what was left out, estimates its token count, and puts it on the clipboard as a real file, ready to paste into Claude, ChatGPT or Gemini.

  5. 05 · Write back

    apply-zip writes the AI's changed files into the project and warns before touching anything you've edited since. For a GitHub repo, --pr opens a pull request instead.

Results

  • 29★ on GitHub, 10 of them in the first 2 days after launch.
  • Ships on PyPI, npm, Homebrew, Scoop and the VS Code Marketplace, plus a browser version and an MCP server.
  • Open source under the MIT licence.

Tech stack

  • Python
  • TypeScript
  • MCP
  • VS Code extension API
  • PyPI
  • npm
  • Homebrew
  • Scoop

On the monitor

Monitor · CZ-01
ContextZip running in a terminal: it detects Node.js + Next.js, packs src/app/page.tsx, src/components/Header.tsx and package.json, excludes node_modules/ and .next/, and creates .contextzip/output/codebase.zip.

The CLI: cz detects the stack and packs one zip.

Monitor · CZ-01
ContextZip's web version: drop a project folder into the browser and it packs it locally, here 54 files (36 KB, about 18k tokens, 8 left out) for Next.js + Node.js, with a Download ZIP button.

The browser version: same machine, no install.

Links