Stop zipping your codebase by hand for every AI session.
contextzip detects your stack, filters out the noise, and packages exactly the files an AI tool needs — from your terminal, in one command.
~/projects/my-app
$ contextzip --prompt "Change toast color on failed login▌"
scanning project — 9 candidates found
- components/ui/toast.tsx
- app/login/page.tsx
- lib/auth.ts
- app/dashboard/page.tsx
- components/ui/button.tsx
- lib/db.ts
- node_modules/
- .next/
- package-lock.json
Every AI session starts the same way.
Hunt down relevant files, skip node_modules and build artifacts by hand, zip it, find the zip, upload it — then do it all again next session. contextzip removes every one of those steps.
Without contextzip
- Open the project, hunt for the relevant files
- Manually skip node_modules, build output, lock files
- Zip them by hand, find the archive on disk
- Upload it, hope you didn't miss a file
- Do it all again next session
With contextzip
- Run one command from the project root
- Framework detected, exclusions applied automatically
- Lean ZIP created in a persistent workspace
- File manager opens with it already selected
- Ctrl+C — paste into any AI tool
Built for the way you actually work.
Smart framework detection
Recognizes Node.js, Next.js, Python, Django, FastAPI, Rust, Go, and Ruby — even in monorepos, by scanning bounded subdirectories for marker files.
Git-aware packaging
Package only what changed. --git-changes includes modified, staged, and untracked files — built for incremental debugging and PR review.
AI-powered file selection
Describe a task in plain English and Gemini picks the minimum relevant files — typically 2 to 5, never more than 10.
Terminal error watcher
Wrap any dev server with contextzip watch. When an error surfaces, press D to package a debug-ready context without breaking your flow.
Apply changes back safely
apply-zip diffs an AI tool's returned ZIP against a manifest, backs up anything it would overwrite, and never deletes a file.
Visual config UI
contextzip config --ui opens a local, localhost-only browser tab with a live file tree to set include/exclude rules by clicking, not editing JSON.
Configurable workspace
Pin .contextzip/ to the git root by default, override it per machine, or commit a shared location for the whole team.
Warns before it's a problem
Flags large (1 MB+) and binary files an AI tool can't read, before you waste an upload on something unusable.
Full CLI control
--include, --exclude, --dry-run, --output — every rule composable, every exclusion visible with --verbose.
Respects .gitignore, and never packages secrets
Your ignore patterns are honoured automatically. SSH keys, cloud credentials, and Terraform state are always excluded, no matter what.
Four steps, one command.
Run it from your project root. Everything else — detection, filtering, packaging, handing it off — happens automatically.
- 01
Run one command
contextzip, run from anywhere in your project. No flags required to get a sensible result.
- 02
Stack gets detected
A bounded scan finds every marker file — package.json, pyproject.toml, go.mod — even nested inside a monorepo.
- 03
Noise gets filtered
.gitignore rules plus framework-specific exclusions strip node_modules, build output, lock files, and caches.
- 04
Archive opens, ready to paste
A lean ZIP lands in .contextzip/ and your file manager opens with it selected. One Ctrl+C and you're in your AI tool.
The same tool, five ways to run it.
$ contextzip
Detected: Next.js (frontend/) + FastAPI (backend/)
142 files matched, 9 excluded by .gitignore, 31 by framework rules
Wrote .contextzip/context.zip — 2.1 MB, opened in file manager
Same logic, callable from Python.
Every CLI capability is a plain function underneath — no Click, no Rich output, no SystemExit. Pull changed files directly, or build your own packaging step.
Read the Python API referencefrom contextzip import get_git_changes, create_zip
collection = get_git_changes()
pkg = create_zip(collection, output="/tmp/changes.zip")
print(f"{pkg.file_count} files, {pkg.compressed_bytes} bytes")Package your first context in under a minute.
Requires Python 3.9+. No account, no server, no config needed to start.