🏴☠️ Developers love AI. InfoSec hates it.
Copilot and Cursor send your proprietary code, PII, and API keys directly to third-party servers. For many enterprises, this is an unacceptable security risk.
"Why not just use a local LLM like Ollama?" Because local 8B models cannot compete with the coding intelligence of Claude 3.5 Sonnet or GPT-4o. If you use a local model, you sacrifice intelligence for privacy.
0Pirate is the solution.
0Pirate is an open-source, local-first redaction proxy. It sits between your codebase and frontier LLMs. Before a single line of code leaves your machine, 0Pirate abstracts proprietary logic and redacts secrets. The AI only sees generic placeholder variables. Once the AI returns a generated solution, 0Pirate reverses the abstraction locally.
You get the intelligence of Claude 3.5 Sonnet with the privacy of a local LLM.
✨ Features
- 🛡️ Client-Side Redaction: Secrets (AWS keys, passwords) and PII (emails, phone numbers) never leave your machine.
- 🧩 Abstracted Logic: Proprietary function names (
calculate_black_scholes_margin()) are mapped to generic tokens (func_A()) before hitting the LLM. - ⚡ Multi-Model Support: Plug in OpenAI, Anthropic, Google Gemini, DeepSeek.
- 🤖 Agentic Integration (Cursor / Claude Code): Expose 0Pirate as an MCP Server directly inside your favorite IDE.
- 📦 GitHub Action & Pre-Commit Hooks: Automatically review Pull Requests and local commits with Zero-Knowledge security.
- 🔒 COVE Hardening (Optional): Run generated code in an isolated Docker sandbox before accepting it.
🤖 The Agentic Era: Use with Cursor & Claude
Don't want to use our CLI? You don't have to. 0Pirate natively integrates with agentic IDEs like Cursor and Claude Code via the Model Context Protocol (MCP).
By adding 0Pirate as an MCP Server, you force your AI Agent to operate inside a zero-knowledge sandbox. When Cursor tries to read your code, 0Pirate intercepts the read, redacts it, and hands Cursor the safe version.
Setting up the MCP Server
# Add to your cursor/claude config:
{
"mcpServers": {
"0pirate-secure-proxy": {
"command": "python3",
"args": ["/path/to/0pirate/cli/mcp_server.py"]
}
}
}
Now, whenever you tell Cursor to refactor a file, it will use 0Pirate's read_secure_file tool automatically!
🚀 Quickstart (The 1-Minute Rule)
Get the entire 0Pirate stack running locally in under 60 seconds.
Prerequisites
- Docker and Docker Compose
- Python 3.10+
Setup
# 1. Clone the repository
git clone https://github.com/yourusername/0pirate.git
cd 0pirate
# 2. Set up your environment variables
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY or ANTHROPIC_API_KEY
# 3. Start the engine
docker-compose up -d
# 4. Install the CLI & Git Hook
cd cli
pip install -r requirements.txt
python main.py install-hook
That's it.
- The backend is running on
http://localhost:5001. - The frontend dashboard is available at
http://localhost:3000. - Every local
git commitis now silently audited for secrets!
📚 Documentation
Dive deeper into how 0Pirate achieves Zero-Knowledge AI coding:
- ARCHITECTURE.md: Understand the mapping engine and sandboxing system.
- CONTRIBUTING.md: Learn how to set up your dev environment and submit PRs.
- 0Pirate GitHub Action: Automate secure PR reviews.
🤝 Community & Support
- Join our Discord Server for live discussions.
- Report issues and request features on our GitHub Issues page.
📄 License
0Pirate is open-source software licensed under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file 0pirate-0.1.2.tar.gz.
File metadata
- Download URL: 0pirate-0.1.2.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e77cf990f147af94097bd45887090b44099dfe220de7c815f3872e1664400e5e
|
|
| MD5 |
59de676b4b04366d07dceaeaaa7144d3
|
|
| BLAKE2b-256 |
60cb91ee8f5147f7c43c027047eface5e96189a322298bfc7658804e1b0b52a3
|
File details
Details for the file 0pirate-0.1.2-py3-none-any.whl.
File metadata
- Download URL: 0pirate-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99b0559acb7ab2694bf4341b880da1ebad4b36fb899959a01759e6ff594f93e9
|
|
| MD5 |
bf7e296c8afe6ce7f4c1d3d660dd9f49
|
|
| BLAKE2b-256 |
44fbf37ee3d0f80c87883d40c81cf9079c77a50a0b67eca43623e91a68b8bc05
|