The right context for any AI. In one command.
contextzip detects your stack, leaves out dependencies, build output and secrets, and puts a lean ZIP of exactly the right files on your clipboard.
Python 3.9+ / Windows · macOS · Linux / MIT
Your project
- app/login/page.tsx
- components/ui/toast.tsx
- lib/auth.ts
- app/dashboard/page.tsx
- tests/login.test.ts
- package.json
- node_modules/Node.js rule
- .next/Next.js rule
- .envsecret
- package-lock.jsonlockfile
- public/hero.pngbinary
The archive
codebase.zip
.contextzip/output/codebase/
- CONTEXTZIP.md
✓ Scanned 2,752 files & Packed 6 files · secrets, dependencies and build output left out
Paste the result into
36,220 files on disk. 44 that matter.
We ran contextzip on this website's own repository. It found the Next.js stack, skipped node_modules, the build folder and the lockfile, and packed the 44 files an AI actually needs.
36,220
files on disk
this website's repo
44
files that matter
packed by one command
66%
smaller
186 KB → 63 KB
0
secrets included
.env, keys, credentials
Everything between your repo and the upload box.
Packaging is only the start. contextzip also picks files for a task, catches errors as they happen, and writes the AI's answer back safely.
Sensible with no flags. Precise with a few.
Toggle options to build a command and see what contextzip would print.
Live preview
$ contextzip
✓ Detected Next.js + Node.js · high confidence
✓ Scanned 2,752 files & Packed 44 files · 185 KB → 63 KB, ↓66% smaller
✓ Saved to · .contextzip/output/codebase/codebase.zip · snapshot #14 (k3f9a2)
✓ Ready to paste
Your secrets never ride along.
Secret files are excluded on every run. When you do want the AI to see your .env, include it — keys stay, every value is redacted.
- Excluded by default: .env, private keys, credentials, Terraform state
- Redacted when you include one on purpose — every value, every time
- Optional scan for API keys and tokens hardcoded in ordinary files
- No telemetry. Only --prompt and update ever touch the network
# DatabaseDATABASE_URL=[REDACTED]export STRIPE_KEY="[REDACTED]" # billingSESSION_SECRET=[REDACTED] PORT=[REDACTED]DEBUG=
contextzip apply-zipPaths in the zip were remapped: my-app-fixed/… → …
✓ Classified 6 files · 1 modified, 1 merged, 1 new, 1 unchanged
! 1 conflict, 1 partial — needs your call
api/main.py
Conflict
You and the AI changed the same lines, differently.
Files are only ever removed with your explicit OK. A file missing from the returned ZIP is left alone.
Out to the AI. Back in, safely.
When the AI sends files back, contextzip apply-zip finds where each one belongs and compares it with the snapshot of what you sent. Clean edits go straight in, your own edits are merged around, and anything that needs a call waits for your OK. Files are only removed when you say so.
Same engine, callable from Python.
Every CLI capability is a plain function: no Click, no Rich output, no SystemExit. Build it into your own scripts and tools.
from contextzip import get_git_changes, create_zip changes = get_git_changes()pkg = create_zip(changes, output="/tmp/changes.zip") print(f"{pkg.file_count} files, {pkg.compressed_bytes} bytes")for path, patterns in pkg.redacted: print("redacted", path, patterns)Built in the open. Steered by votes.
New features and new languages are picked by the people using contextzip. Ask for what you need, or vote for what someone already asked.
Your next AI session starts with one line.
No account, no server, no config. Install it and run it in your project.
