A Private AI Coding Agent for Your Terminal

Provider-agnostic. Bring your own model, keep your own privacy.

The Privateer CLI reads, writes, and runs code across your projects, with a safe-by-default permission gate, attested TEE inference, an on-device PII gate, MCP servers, sub-agents, scheduled routines, voice so you can talk to it, chat from Telegram, Slack, Discord & WhatsApp, and control from Android or the web.

# macOS & Linux (no Node required):
curl -fsSL https://privateer.pro/install.sh | sh
# Windows (PowerShell), no Node required:
irm https://privateer.pro/install.ps1 | iex
# or run it instantly with your own Node 22+:
npx privateer-agent

Rather read it first? Save it and run it yourself: curl -fsSL https://privateer.pro/install.sh -o install.sh, or irm https://privateer.pro/install.ps1 -OutFile install.ps1 on Windows. Same file, opened before it runs.

MIT licensed · macOS, Linux & Windows · no Node required · built on the open Pi agent toolkit

Your Projects, One Prompt Away

Describe the change and the agent does the work (reading files, editing code, running your tests), with every action classified and gated behind your approval before it runs. Launch it in any project with privateer, or try it instantly with npx privateer-agent.

privateer
> add rate limiting to the API
▸ reading server/routes/api.js
▸ edit server/middleware/rateLimit.js: approve? yes
▸ tests: 12 passing
▸ mcp: github ✓ postgres ✓ · sub-agent: audit ✓
▸ approved from the app ✓ · next routine: nightly-audit 02:00

Built for developers

Safe-by-default gate BYO model, every major provider Attested TEE inference On-device PII gate MCP & sub-agents Scheduled routines Talk to it: voice in & out Chat via Telegram, Slack & WhatsApp Drive it from Android & web

Any Model. Your Key, or No Key.

Every major provider, one command to switch: OpenRouter and the frontier labs, fast open-model clouds, TEE and zero-retention inference, local Ollama, or any OpenAI-compatible endpoint. Tool-calling and streaming work identically across every provider, with no model lock-in, no separate code paths. One key is enough; or skip keys entirely and /login to bill your Privateer account.

# one key is enough: pick a provider
export OPENROUTER_API_KEY=sk-or-... # gateway to ~everything
export TINFOIL_API_KEY=... # private, attested TEE inference
export OLLAMA_BASE_URL=http://localhost:11434/v1 # local, no key
# launch, then switch models anytime with /model
privateer
> /model openrouter/anthropic/claude-opus-5

Bring your own key

OpenRouter Anthropic OpenAI Google xAI Groq Mistral Z.ai DeepSeek Together MiniMax Qwen Ollama: local NEAR AI: TEE Tinfoil: TEE Venice: ZDR Fireworks: ZDR Custom endpoint …or /login, no key at all

Composable by Design

Privateer is built on the open Pi agent toolkit, so the whole Pi package ecosystem plugs in: MCP servers, parallel sub-agents, on-device context compression, private-by-default web search. The part that matters: Privateer's permission gate intercepts every tool any package registers, so anything you add is safe-by-default, and destructive shell commands are blocked even in unattended runs. MCP tools are called through codemode: the model writes a short script, and every tool call inside it still reaches the gate on its own. Connecting a server never makes its tools trusted. Sub-agents take bounded pieces of a task in parallel, under the same gate.

# connect your tools over MCP
privateer
> /connect 23 connectors, or any stdio command or URL
> /mcp what connected, and sign-in for OAuth servers
▸ mcp__github__create_issue: approve? yes ✓
# local stdio + remote HTTP (interactive OAuth), every tool call gated on its own

One gate over everything

MCP servers Parallel sub-agents Long replies keep going Context compression Private web search Any Pi package, automatically gated

Routines That Run While You Sleep

Say what you want done and when ("summarize world news every morning"), approve it once, and a background daemon runs it unattended, recurring or one-off. The agent can even schedule its own follow-up work. Runs get a safe read/web toolset by default; any extra tool grants are flagged at approval. Results deliver to a file, the next session, your phone, or straight to Slack or Discord through named webhooks, with secrets redacted before anything leaves.

privateer
> summarize world news each morning and post it to Slack
▸ create routine "morning-news" · 0 7 * * * → webhook:eng-slack
▸ approve? yes: scheduled, runs unattended ✓
# the daemon runs it every day; results post to Slack, secrets redacted

Control It from Android or the Web

Link a terminal to the Privateer app with /remote-access on (off by default) and drive it from any device (Android or the web app): send prompts, watch the agent work, and Allow or Deny every action it wants to take. Execution never leaves your machine. When the agent builds something worth keeping (a page, a document, a spreadsheet), it can save it to your Cargo, encrypted by the app before it's stored. If no app is open, the save is sealed to your account and queued, and it lands the next time you open the app.

Live-only relay

The stream exists only while you watch: nothing is archived, and no keys ever cross the relay. Terminals get a random tag, not your username or hostname.

Every action gated

A remote-driven turn relays each would-be tool action to the app for Allow / Deny. The permission model is the same one you use at the keyboard.

Redacted by default

Output is size-truncated and run through a best-effort secret redactor (PEM keys, bearer tokens, API keys) before it leaves. A safety net, not a guarantee.

Chat With Your Agent, Anywhere

Bridge a terminal to Telegram, Slack, Discord, or WhatsApp and message your agent like a teammate. Allow-list exactly who can reach it: admins approve its actions right in the chat, everyone else is read-only, and a per-channel posture caps how far any turn can go. Set it up from the Privateer app: your bot tokens are sealed to your machine and the whole setup is signed by your account, so the relay that carries it can neither read the token nor forge who's let in.

Channels run as their own login service with privateer channels install (a launchd agent on macOS, a systemd --user unit on Linux, no root), so they're back after a reboot. On a VPS, run it as a dedicated unprivileged user, never root. Nothing needs an inbound port except WhatsApp's webhook.

# Telegram · #eng (you're an admin here)
you ship the v0.4 changelog to the release branch
privateer drafting CHANGELOG.md, opening a PR…
▸ run git push origin release: approve? you: yes ✓
# members can chat too, but every turn runs read-only

Your agent, in your team chat

Telegram Slack Discord WhatsApp Admins approve · members read-only Tokens sealed & config account-signed Login service, or on a VPS

Hand Off the Sensitive Part

Another agent can hand Privateer the work: a one-shot privateer -p run from any program that can run a command, or privateer acp, which Zed, Buzz or your own program drives over the Agent Client Protocol. When the task touches files the caller shouldn't read, add --private: the caller passes file names, Privateer reads the files on your machine, works on a verified-private model, and prints only the answer.

$ privateer -p --private "Read customers/export.csv. Reply with customers per country. No row-level data."
DE 412 · FR 288 · US 1,904 · …
# the caller gets the answer, never the rows

Verified-private models only

Before every tool call the model must be TEE-verified (an enclave attestation Privateer checked itself) or local. Otherwise the call is refused.

Nothing leaves through a tool

Web, MCP, media, uploads and network shell commands (curl, ssh, git push) are refused. Permission modes and approvals can't lift it, and sub-agents inherit it.

The reply is the channel

The answer is what goes back, so ask for counts, yes/no answers or summaries, and have Privateer write details to a file. Streaming JSON output is refused in private mode.

Privacy, Stated Honestly

On an attested TEE, the provider running the model can't see your prompt: TLS terminates inside the enclave, so it's only ever decrypted there, and /verify proves it. Everywhere else a model has to read your prompt to answer it, so the guarantee there is "nobody retains it", and you can check. Your conversation history stays as files on your own disk under ~/.privateer/.

# the status bar wears the selected model's privacy posture: live, graded honestly
⛉ ZDR? · ⚓ privateer · openrouter/anthropic/claude-opus-5
> email jane@acme.com about invoice 555-123-4567
▸ ⚠ 1 email, 1 phone detected: unverified channel · Redact / Send?
# switch to an attested enclave: the PII gate is then safely skipped
> /model tinfoil/glm-5-2
> /verify
▸ Tinfoil TEE attestation: inference.tinfoil.sh
▸ ✓ Verified: TLS terminates inside a genuine TEE
⛉ TEE · ⚓ privateer · tinfoil/glm-5-2

⛉ Honest privacy shield

The shield is green, yellow, or red for the model you're on, before you send anything, and it's graded honestly: a cryptographic proof never reads like a policy promise. Opt-in ZDR enforcement pins OpenRouter routing to zero-retention endpoints; Venice and Fireworks run zero-retention by default.

⛉ Attested TEE inference

NEAR AI and Tinfoil run models inside Trusted Execution Environments; TLS terminates inside the enclave. /verify fetches a live cryptographic attestation: nonce-fresh reports on NEAR, TLS-key-bound reports on Tinfoil.

On-device PII gate

Before a prompt reaches an unverified model, Privateer scans it locally for structured personal data (emails, phones, SSNs, cards, IBANs, IPs) and offers to redact or hold it. Detection never leaves your machine, and it's skipped on an attested channel that can't read your data anyway.

Account mode: proxy, not storage

With /login, the server proxies your prompts; it does not store them. Only billing metadata (model, token counts, cost) is written, never prompt or response text.

Questions, Answered

Straight answers to what developers actually ask.

Do I need an API key?

No. Run /login to bill inference to your Privateer account: approve a short code in the Privateer app and there's no key to manage. Or bring your own key (BYOK) for any major provider: OpenRouter, Anthropic, OpenAI, Google, xAI, Groq, Mistral, Z.ai, DeepSeek, Together, MiniMax, Qwen, NEAR AI, Tinfoil, Venice, Fireworks, or any custom OpenAI-compatible endpoint. With a local Ollama install you don't need a key at all.

What does BYOK mean?

You use your own provider credentials. Set an environment variable (OPENROUTER_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, NEAR_AI_API_KEY, TINFOIL_API_KEY, …). One provider is enough to start. Switch providers and models anytime with /model, specified as provider/model (for example openrouter/anthropic/claude-opus-5).

Does it support MCP?

Yes. It's an MCP client built on Pi's own MCP support: local stdio servers and remote HTTP servers, with interactive OAuth for the remote servers that need it. Add them with /connect and check them with /mcp. The model calls MCP tools through codemode, a short script, and every call inside it goes through the same safe-by-default permission gate as the built-in tools.

What happens when a reply hits the model's output limit?

It keeps going. When a reply is cut off at the model's output limit, Privateer sends the "continue" for you (up to twice in a row) instead of stopping until you type it.

Can another agent hand Privateer work?

Yes. Any program that can run a command can use a one-shot privateer -p "…" run, and Zed, Buzz or your own program can drive privateer acp over the Agent Client Protocol. With --private, Privateer reads the files itself, works only on a verified-private model (TEE-verified or local), refuses every tool that could send data out, and prints only the answer.

Can I run it on a server?

Yes. privateer harbor install and privateer channels install run routines and chat channels as login services (launchd on macOS, systemd --user on Linux; on Windows use privateer harbor run). On a VPS, run them as a dedicated unprivileged user, never root, and sign in over SSH with /login. Nothing needs an inbound port except WhatsApp's webhook.

Can I extend it with more tools?

Yes. It's built on the open Pi agent toolkit, so the whole Pi package ecosystem composes in: MCP servers, parallel sub-agents, context compression, and private-by-default web search. The key point is that Privateer's permission gate intercepts every tool any package registers, so anything you add is gated the same way: destructive shell commands stay blocked even in unattended runs.

Is it open source?

Yes. MIT licensed, on GitHub and on npm as privateer-agent.

Can it run models locally?

Yes. Point it at a local Ollama install (OLLAMA_BASE_URL) and inference runs on your own machine with no API key. Cloud providers are one /model switch away when you need bigger models.

Can I talk to my agent?

Yes. Press alt+t (or type /talk) and speak; the mic closes when you stop talking. /speak on reads answers aloud as they're written, and /talk loop on makes it a hands-free conversation. Out of the box it uses your OS voice, so nothing leaves your machine; once you /login it can use your account's confidential-compute speech models instead. Voice is off by default and only in interactive sessions.

What are routines?

Saved tasks a background daemon runs unattended, on a cron schedule or one-off. You ask the agent to schedule the work and approve it once; the agent can even schedule its own follow-up runs. Results deliver to a file, the next session, your phone, email, or a webhook (Slack/Discord), with secrets redacted before anything leaves the machine.

Does it protect personal data before it's sent?

Yes. Before a prompt goes to a channel that isn't verified-private, an on-device PII gate scans it locally for structured personal data (emails, phone numbers, SSNs, credit-card numbers, IBANs, IP and MAC addresses) and offers to redact or hold it. Detection is deterministic and never leaves your machine, and it's skipped on an attested TEE or on-device channel that provably can't read your prompt anyway. It's best-effort structured-PII detection, labeled as such.

How does controlling the CLI from another device work?

Turn on /remote-access (off by default) and link the terminal to the Privateer app on Android or the web. You can send prompts from any of them, and every action the agent wants to take is relayed to the app for Allow or Deny. Execution stays on your machine, the relay is live-only (nothing archived), output is size-truncated and run through a best-effort secret redactor, and no keys ever cross the relay.

Can I chat with my agent from Telegram or Slack?

Yes. Bridge a terminal to Telegram, Slack, Discord, or WhatsApp and message the agent like a teammate. You allow-list who can reach it: admins approve its actions right in the chat, everyone else is read-only, and a per-channel posture (read-only, approve-each-action, or unattended) caps how far any turn can go. Set it up from the Privateer app. Bot tokens are sealed to your machine and the config is signed by your account, so the relay that carries it can neither read your token nor forge who's allowed in.

How private is it, really?

On an attested TEE, the provider can't see your prompt: NEAR AI and Tinfoil run models inside Trusted Execution Environments, so your prompt is only decrypted inside the enclave (fetch the cryptographic attestation with /verify). Every other provider has to read a prompt to run inference, so there the promise is "nobody retains it". A ⛉ shield shows the selected model's live posture, graded so a verified proof never reads like a policy promise. The on-device PII gate warns before structured personal data leaves for an unverified model, and the billed-account path proxies prompts without storing them; only billing metadata is kept. Your conversation history stays as files on your own disk under ~/.privateer.

What platforms does it run on?

macOS, Linux, and Windows. The installer is self-contained: it bundles its own runtime, so you need no Node and no npm. On macOS/Linux run curl -fsSL https://privateer.pro/install.sh | sh; on Windows run irm https://privateer.pro/install.ps1 | iex in PowerShell. Already have Node 22+? npm install -g privateer-agent or npx privateer-agent work too.

Hoist the colors.

One command and the agent is in your terminal.

# macOS & Linux:
curl -fsSL https://privateer.pro/install.sh | sh
# Windows (PowerShell):
irm https://privateer.pro/install.ps1 | iex