Code Pirate
Code Pirate is a 1:1 GitHub Copilot replacement built for developers who are done being held hostage by SaaS bait-and-switches. When a monopoly controls the middleman, they control your capabilities — selling you a Senior Engineer, locking you into a contract, and silently downgrading it to a Junior Dev to pad their margins. Code Pirate makes your toolchain unbreakable. By operating entirely on a Bring-Your-Own-Key (BYOK) architecture, it routes your codebase directly to OpenRouter, direct provider APIs, or local offline models — with zero corporate rate limits, zero hidden token multipliers, and zero silent model downgrades. They pulled the rug. We're taking the ship. InstallationStep 1 — Install the extensionFrom a
From the VS Code Marketplace (coming soon): Search for Code Pirate and click Install. Step 2 — Add your API keyOn first install, Code Pirate automatically opens the setup wizard. If it doesn't appear, run it manually: Command Palette ( The wizard walks you through:
Where to get an API key:
Step 3 — Open the sidebarCode Pirate lives in the right sidebar (Secondary Side Bar) — the same panel where Copilot sits. If it's not visible: Command Palette → Code Pirate: Open Sidebar You can drag it to any panel in VS Code — the layout is yours to keep. The SidebarProvider & Model SelectorAt the top of the sidebar, two controls:
The badge to the right shows Free or ⚡ Pro (your license tier). Chat (Lead Architect mode)The main chat interface. Type a message and press Enter or click Send. What to ask:
Workspace context ( Thinking Budget Dial: Five positions — Off, Low, Medium, High, Max. Controls how much reasoning the model does before responding. Higher = better answers on complex problems, higher cost, more latency. Off = fastest and cheapest. Personas: Three chat modes selectable from the toolbar:
Multi-File Diff & ApplyWhen Code Pirate's response includes file changes (fenced code blocks with file paths), a diff bar appears at the bottom of the chat. It shows how many files were modified.
Ghost Diff checks file modification times before writing — if you've manually edited a file after the AI response, it will not silently overwrite your work. Captain's LedgerThe cost tracker in the sidebar footer shows:
Prompt caching is applied automatically where supported (Anthropic, OpenRouter). Cache hits show as reduced costs in the Ledger — typically 60–90% savings on repeated system prompts and vault context. Blueprint VaultA local library of saved prompt templates. Use it to store:
To save: Click Save to Vault in the Vault tab, give it a name, paste the content. Settings TabChange your provider and API key at any time without re-running the setup wizard. Useful when switching between OpenRouter for general work and Anthropic Direct for heavy reasoning tasks. Command Palette CommandsAll commands are accessible via
Keyboard Shortcuts
Inline Ghost Text CompletionsCode Pirate provides inline ghost text completions as you type — the same experience as Copilot's tab completions. They run on your own API key with no daily cap. Tips:
|
| Provider | Type | Notes |
|---|---|---|
| OpenRouter | Cloud | 200+ models via one key — recommended for most users |
| Anthropic Direct | Cloud | Direct Claude access — different request schema, handled automatically |
| Groq | Cloud | Fast inference; free tier available |
| Mistral | Cloud | European provider |
| Google Gemini | Cloud | Gemini 2.5 Pro/Flash |
| Together AI | Cloud | Open model hosting |
| Ollama | Local | No key required; fully offline |
| LM Studio | Local | No key required; fully offline |
| Custom endpoint | Any | Any OpenAI-compatible API — enter the URL manually |
Endpoints are pre-filled automatically for each provider. The only manual entry needed is your API key.
Troubleshooting
Sidebar is blank or shows "Loading…" after install: Run Code Pirate: Run Diagnostics from the Command Palette. The report will show which check failed. Common causes:
- Extension just installed and hasn't fully activated — try Reload Window
- API key not yet entered — run Code Pirate: Set Up API Key
Diagnostics report shows ⚠ API key stored: No key: The setup wizard didn't complete or the key didn't save. Run Code Pirate: Set Up API Key to re-enter it.
Running on VS Code Remote (SSH, containers, WSL):
Fully supported. Code Pirate uses an IIFE-format webview bundle specifically to work in SSH Remote environments where ES module scripts are blocked. If something isn't working, run diagnostics — the report includes your Remote kind and will flag any asset loading issues.
Chat sends but no response arrives: Check the Captain's Ledger — if input tokens are counting up but output is empty, the provider API responded with an error. The error will appear in the chat. Verify your API key is valid and has credits.
Privacy
Your API key never leaves your machine. It is stored in VS Code's built-in encrypted SecretStorage and sent directly from your editor to your chosen AI provider. CodePirate.cc is not a middleman — we never see, receive, or log your key or your prompts.
Phone-home is license validation only. The validation request contains your license key and product ID — nothing else. No prompt content, no usage data, no telemetry, no file paths, no model selections are ever transmitted.
License
Code Pirate Source Available License v1.0 — source is publicly auditable but may not be redistributed, forked, or used to create derivative works. See LICENSE for full terms.