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.2.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.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

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

Hashes for 0pirate-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e77cf990f147af94097bd45887090b44099dfe220de7c815f3872e1664400e5e
MD5 59de676b4b04366d07dceaeaaa7144d3
BLAKE2b-256 60cb91ee8f5147f7c43c027047eface5e96189a322298bfc7658804e1b0b52a3

See more details on using hashes here.

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

Hashes for 0pirate-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 99b0559acb7ab2694bf4341b880da1ebad4b36fb899959a01759e6ff594f93e9
MD5 bf7e296c8afe6ce7f4c1d3d660dd9f49
BLAKE2b-256 44fbf37ee3d0f80c87883d40c81cf9079c77a50a0b67eca43623e91a68b8bc05

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

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