Skip to content

profullstack/getprivacycode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrivacyCode

Privacy-first AI coding agent for enterprise. Your data never leaves your machine unprotected. Defender™ tokenizes PII and secrets before any cloud AI sees them.

curl -fsSL https://getprivacycode.com/install | bash

Why PrivacyCode?

AI coding tools send your code, prompts, and context to cloud providers. But your codebase contains secrets — API keys, customer emails, credentials, internal URLs. PrivacyCode is the only coding agent that tokenizes sensitive data before it leaves your machine. The AI provider sees synthetic placeholders. You see real values. No other tool does this.

Defender™ — the privacy layer

Scenario Without PrivacyCode With PrivacyCode
You type: Fix auth for jane@acme.com with key sk-live-51HdF... Provider sees your real email and Stripe key Provider sees [EMAI-...] and [KEY-...]
Agent reads config.ts containing DATABASE_URL=postgres://... Provider sees your DB credentials Provider sees [URLP-...]
Agent runs git log and output contains commit emails Provider sees every contributor email Provider sees anonymized tokens

18 detection patterns by default: emails, phones, SSNs, credit cards, IPs, IBANs, API keys, JWT tokens, AWS keys, GitHub tokens, OpenAI keys, passwords in URLs, passport numbers, and more. Add custom regex patterns for your organization.

Quick Start

# Install
curl -fsSL https://getprivacycode.com/install | bash

# Or via npm
npm install -g privacycode

# Set your API key
export OPENAI_API_KEY=sk-...

# Start coding
privacycode

Defender is on by default. No configuration needed.

Features

  • 165+ AI providers — OpenAI, Anthropic, Gemini, Groq, DeepSeek, Ollama, and more. Bring your own keys.
  • Interactive TUI — Terminal-native experience with streaming responses, diff previews, and approval-gated execution.
  • Agentic loop — Read, write, edit, search, and run commands with your explicit approval.
  • Zero telemetry — No servers. No analytics. No crash reporting. Every line is open source.
  • Air-gapped ready — Works offline with local models. Bundled provider registry.
  • Open source — MIT license. Fork, audit, and ship on your terms.

Providers

PrivacyCode connects to any OpenAI-compatible provider. Set your preferred provider:

export PRIVACYCODE_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-...

export PRIVACYCODE_PROVIDER=deepseek
export DEEPSEEK_API_KEY=sk-...

List all 165+ supported providers:

privacycode providers
privacycode models anthropic

Commands

Command Description
privacycode Launch interactive TUI (default)
privacycode run "<task>" One-shot non-interactive task
privacycode providers List all supported providers
privacycode models [id] List models for a provider
privacycode analyze <text> Show what Defender would tokenize

Slash Commands (in TUI)

Command Action
/privacy on|off Toggle Defender tokenization
/model <id> Switch AI model
/provider <id> Switch AI provider
/vault Show vault statistics
/stats Show token usage
/clear Clear conversation history
/exit Quit

Configuration

Resolved in order: CLI flags → environment variables → project config → global config.

// ~/.config/privacycode/config.json
{
  "provider": "anthropic",
  "model": "claude-sonnet-4-20250514"
}
// ./privacycode.jsonc (project-level)
{
  "provider": "openai",
  "model": "gpt-4o"
}

Enterprise

  • No data leaves your network — all tokenization happens locally
  • Self-hosted provider registry — no dependency on external services
  • Air-gapped deployment — works entirely offline with local models
  • Custom PII patterns — add organization-specific regex
  • Compliance ready — SOC 2, HIPAA, PCI-DSS supportable architecture

Development

bun install
bun dev     # from packages/privacycode

License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors