100% private codebase context engineering tool
Fully local app to package your codebase files and diffs into LLM-friendly format
GitContext lets you securely analyze and package local Git repository diffs directly on your machine for quick copy-and-paste into AI Chatbots like ChatGPT, Claude, and others. Available as a high-performance native desktop app (Tauri + Rust) for macOS, Windows, and Linux, or as a web app running entirely in your browser.
Similar to Repomix or GitIngest, but with key differences:
- Zero servers, zero uploads – everything runs entirely locally on your machine or in your browser
- Native performance – desktop app uses Rust for blazing-fast Git operations
- Supports Git diffs between branches, not just files
- Generate a file tree with your selected code/diffs for easy LLM ingestion
- One-click prompt templates tailored for common coding scenarios
- Real-time token counting to stay within LLM context limits
Download the latest native desktop app for your operating system from the GitHub Releases page:
- macOS:
.dmgfile - Windows:
.msior.exeinstaller - Linux:
.AppImage,.deb, or.rpmpackage
The desktop app offers superior performance with native Rust-powered Git operations.
Alternatively, use the web version directly at gitcontext.xyz — no installation required!
The web app runs entirely in your browser using modern Web APIs and never uploads your code anywhere.
GitContext is a privacy-first, local-first application for analyzing and staging Git repository diffs — all without any cloud services.
Desktop App uses:
- Native file system access with Tauri
- Blazing-fast Git operations via Rust's
git2crate - Multi-threaded performance for large repositories
Web App uses:
- File System Access API for local-only file system access
isomorphic-gitfor client-side Git operations- Web workers + IndexedDB caching for performance
Key features:
- Local-only file system access with persistent permissions
- Real-time Git operations with visual diff analysis
- Interactive file tree navigation and selective staging
- Instant token count estimation for LLM context limits (GPT-4, Claude, etc.)
- Flexible output formats with smart handling of binary files
- Dark mode support
As a developer who frequently works with ChatGPT, Claude, and other LLMs, I found existing tools lacking:
- Needed a visual way to pick files and diffs instead of crafting CLI filters
- Wanted branch-to-branch diffs for scenarios like code reviews and bug fixes
- Preferred an interactive workflow over command-line arguments
- Required privacy — no uploading code to third-party servers
Passing only relevant context to an LLM significantly improves accuracy — especially in large codebases with overlapping names and structures. See Context Rot for why trimming irrelevant context matters.
- Frontend: React 18 + TypeScript + Vite
- Backend: Rust + Tauri 2.0
- Git Operations:
git2crate (native Rust) - Token Counting:
tiktoken(WASM)
- Frontend: React 18 + TypeScript + Vite
- Git Operations:
isomorphic-git+ LightningFS - Token Counting:
tiktoken(WASM) - Storage: IndexedDB for caching
@gitcontext/ui- Shared React components@gitcontext/core- Shared types and utilities
This project uses a monorepo structure with NPM workspaces.
npm installRun the web app in development mode:
npm run web:devBuild the web app for production:
npm run web:build
npm run web:previewThe web app will be available at http://localhost:5173
Prerequisites:
- Rust must be installed
- Platform-specific dependencies:
- macOS: Xcode Command Line Tools
- Linux:
libwebkit2gtk-4.1-dev,libappindicator3-dev,librsvg2-dev,patchelf - Windows: Microsoft Visual C++ Build Tools
Run the desktop app in development mode:
npm run desktop:devBuild the desktop app for production:
npm run desktop:buildInstallers will be created in apps/desktop/src-tauri/target/release/bundle/
Run end-to-end tests:
npm --workspace apps/web run test:e2eRun unit tests:
npm --workspace apps/web run test:unitgitcontext/
├── apps/
│ ├── web/ # Web application (React + isomorphic-git)
│ │ ├── src/
│ │ │ ├── components/
│ │ │ ├── hooks/
│ │ │ ├── workers/
│ │ │ └── utils/
│ │ └── vite.config.ts
│ └── desktop/ # Desktop application (Tauri + Rust)
│ ├── src/ # React frontend
│ └── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── git.rs # Git operations (git2)
│ │ └── lib.rs # Tauri commands
│ └── Cargo.toml
├── packages/
│ ├── ui/ # Shared React components
│ └── core/ # Shared types and utilities
└── package.json # Root workspace config
| Command | Description |
|---|---|
npm run web:dev |
Start web app dev server |
npm run web:build |
Build web app for production |
npm run desktop:dev |
Start desktop app in dev mode |
npm run desktop:build |
Build desktop app installers |
npm run lint |
Lint all workspaces |
npm run build |
Build all workspaces |
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- isomorphic-git for browser-based Git operations
- git2-rs for native Rust Git operations
- Tauri for the native desktop framework
- tiktoken for token counting
Made with ❤️ by kccarlos