Skip to content
NewInclude your .env — values redacted automatically

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.

Get started

Python 3.9+ / Windows · macOS · Linux / MIT

~/my-app $

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/
  • .next/
  • .env
  • package-lock.json
  • public/hero.png

The archive

codebase.zip

.contextzip/output/codebase/

  • CONTEXTZIP.md
  • login/page.tsx
  • ui/toast.tsx
  • lib/auth.ts
  • dashboard/page.tsx
  • tests/login.test.ts
  • package.json
7 files27 KB → 9 KB
On your clipboard — paste anywhere

✓ Scanned 2,752 files & Packed 6 files · secrets, dependencies and build output left out

Paste the result into

ClaudeChatGPTGeminiCursorGitHub CopilotPerplexityMistralDeepSeekAny upload box
Real numbers

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

What it does

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.

Try it

Sensible with no flags. Precise with a few.

Toggle options to build a command and see what contextzip would print.

Full CLI reference
Scope
Flags

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

Security

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
How secrets are handled
.env on disk.env in the ZIP
# DatabaseDATABASE_URL=[REDACTED]export STRIPE_KEY="[REDACTED]"  # billingSESSION_SECRET=[REDACTED] PORT=[REDACTED]DEBUG=
✓ keys and comments stay · every value is replaced · your file on disk is never touched

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.

Waits for you: keep yours, take the AI's, or resolve it side by side in the browser or VS Code.

Files are only ever removed with your explicit OK. A file missing from the returned ZIP is left alone.

The round trip

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.

How apply-zip works
Also a library

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.

Python API reference
package.py
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)
Roadmap

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.

Most wanted right now

Nothing open right now — yours could be the first.

See every open request
Start now

Your next AI session starts with one line.

No account, no server, no config. Install it and run it in your project.

Read the getting-started guide