Skip to main content
0Pirate Logo

0Pirate

The Zero-Knowledge AI Proxy for Enterprise Code

License: MIT Tests Discord


🏴‍☠️ 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 commit is now silently audited for secrets!

📚 Documentation

Dive deeper into how 0Pirate achieves Zero-Knowledge AI coding:

🤝 Community & Support

📄 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

0pirate-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

0pirate-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file 0pirate-0.1.1.tar.gz.

File metadata

  • Download URL: 0pirate-0.1.1.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

Hashes for 0pirate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 08ababe6f73a1033320f704514160de2e1dcdb88fde961d1861441d7fed80886
MD5 8852768f6f53e9c1e1f53b756053cdd5
BLAKE2b-256 089e8179fe69a453d62ce6f15a54232127e3030e162e0beaeb4c282af0de50d1

See more details on using hashes here.

File details

Details for the file 0pirate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: 0pirate-0.1.1-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

Hashes for 0pirate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d88423c4162473aad7c1e863ab14980eb56c9d7d2db1a6206e695a72fc531f3d
MD5 a303bac5e794975d1e7a65d7c2247c3e
BLAKE2b-256 f395ffc7b5ec9392886ee00fe5851af702c894d44132a2ae24b01eec96aabc9a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page