Skip to main content
0Pirate Logo

0Pirate

The Zero-Knowledge AI Proxy for Enterprise Code

License: MIT


🏴‍☠️ 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/Arunmadhavan28/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.3.tar.gz (3.6 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.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: 0pirate-0.1.3.tar.gz
  • Upload date:
  • Size: 3.6 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.3.tar.gz
Algorithm Hash digest
SHA256 b5934132ed6afb28d7fbc1c89cde9fe5c4d4c54a52f914e27a9cec3193ab0839
MD5 c400a77439bacc000c5803d55efe98f2
BLAKE2b-256 12821dcf0ed40b93c4c15586149a42efbc98b64bf9aa63e9637c7800150de475

See more details on using hashes here.

File details

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

File metadata

  • Download URL: 0pirate-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 396a0e1a8efc41cb8cea0584a20fbd25f4998bd27bfcc37edb1a4682d28d08ce
MD5 5509ddf6b6cf1cd7fae473459503dfa1
BLAKE2b-256 c5b4d41b48d5e35c64c0f36c47ac7cb59f7fe3c35e6b0b524e410041f13b3eec

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

2 files

This release

0.1.3 This release

2 files

0.1.2

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