Autonomous Coding.
Zero Master Key Leak.
LEGECY CLI runs frontier models directly in your terminal. All tokens are metered on our secure cloud proxy. 100% tamper-proof credit protection even if the binary is decompiled.
CLI Interface & Live Autonomous Flow
Install in seconds. Authenticate with a single keystroke. The agent executes refactors, runs tests, and tracks token consumption in real-time.
src/auth and src/gatewayFull TUI / Command Mode
Run full interactive terminal user interface or one-shot command execution for CI/CD and scripts.
Zero Setup Overhead
No need for separate Anthropic or OpenAI accounts. Your LEGECY CLI token handles all model routing automatically.
Anti-Decompile Safety
All token checks and metering execute strictly on the cloud server. Decompiled binaries cannot spoof credit balance.
Frontier Intelligence, Calibrated for Code
Switch between top-tier coding models on the fly directly in your terminal. All models run on a single unified credit balance.
Claude 3.5 Sonnet
The gold standard for multi-file refactoring, deep codebase comprehension, and test debugging.
GPT-4o Omniverse
Ultra-rapid response times for interactive coding, regex synthesis, and rapid prototype generation.
DeepSeek Coder V3
High-efficiency open weights leader. Exceptional value for high-volume automated test generation.
Gemini 1.5 Pro
Two-million token window. Ingest entire legacy codebases and monorepos in a single prompt.
Autonomous Agent Workflows
Turn complex engineering tasks into one-line CLI execution. From full architecture refactoring to self-healing test suites.
Multi-File Refactor
Scans AST trees across 50+ files simultaneously and extracts reusable modules with zero breaks.
legecy "refactor auth"
TDD Test & Auto-Heal
Executes tests in loop, parses stderr logs, and modifies implementation code until all tests pass.
legecy --fix-tests
Cloud Proxy Migration
Removes plain master API keys from local .env files and connects to your isolated reverse proxy.
legecy "secure keys"
CI/CD PR Reviewer
Runs headlessly inside GitHub Actions on every pull request, auditing code quality and suggesting diffs.
npx legecy --ci --pr
OpenAI-Compatible Proxy Gateway API
Drop-in replacement for OpenAI endpoints. Zero configuration changes required in your applications.
Sub-15ms Reverse Proxy Routing
Pass your temporary user session bearer token. Our proxy verifies credit balance, logs metered token usage, and streams responses with zero master API keys exposed.
Authorization: Bearer cp_live_••••••••
Developer Guides & Quickstart Docs
Everything you need to understand the sovereign CLI architecture, token deduction logic, and credential security.
CLI Installation & Loopback Login
Learn how the 1-click browser authentication handshake stores credentials in ~/.legecy/credentials.json.
Cloud Credit Accounting & Metering
Detailed breakdown of how prompt tokens and completion tokens are measured and billed per thousand tokens.
Anti-Tamper & Binary Hardening
Explanation of why server-side HMAC validation makes it impossible to bypass token credits even if patched.
Zero Data Leak. Total Sovereignty.
Your code is your intellectual property. We enforce strict non-retention and zero-training policies on all reverse proxy traffic.
Zero Master Key Leak
Upstream provider keys never touch developer workstations, avoiding catastrophic API leaks in git repos.
Zero Code Training
Requests routed through our enterprise endpoints are never used by upstream providers to train foundation models.
Ephemerality First
Prompt tokens and file diffs are buffered in volatile memory only during SSE stream generation and immediately discarded.
GDPR & SOC2 Ready
Full compliance with international privacy directives. Export your audit logs and token transaction history anytime.
Uncompromising Power & Zero-Leak Security
Built for teams and individual engineers who demand autonomous CLI power without risking multi-thousand dollar API key leaks.
Zero-Trust Cloud Proxy
Upstream master provider keys (Anthropic, OpenAI, DeepSeek) remain strictly on our isolated Node.js gateway. The local CLI never touches them.
Frontier Multi-Model Hub
Switch seamlessly between Claude 3.5 Sonnet, GPT-4o, and DeepSeek-V3 using a single unified balance. No individual provider subscriptions required.
Tamper-Proof Credit Vault
Even if the CLI binary is decompiled or modified in Ghidra/IDA, credit balances and rate limits are enforced on the server. Zero credit forging.
Interactive CLI & TUI
Inspect file trees, review staged git diffs, run test suites, and execute multi-file refactoring commands autonomously right inside your terminal.
1-Click CLI OAuth Sync
Type legecy login. Your default browser opens, approves the session, and writes credentials securely with zero copy-pasting.
Transparent Credit Pricing
Every token consumed is metered precisely to the fraction of a cent. Top up credit packs from $5 with no locked monthly minimums.
Standard CLI vs LEGECY CLI Gateway
| Capability | Direct API Keys / LEGECY CLI | LEGECY CLI Gateway |
|---|---|---|
| security Master Key Protection | ❌ Stored plaintext on workstation (.env) | ✅ 100% Server Isolated. Zero Local Keys. |
| psychology Frontier Model Access | Requires 3+ separate corporate accounts ($60+/mo) | Unified single credit vault for all models |
| bolt Credit Metering & Tampering | Client-side checks (Bypassed if binary is patched) | Server HMAC-SHA256 Token Metering |
| sync_alt 1-Click Browser Login | Manual copy-paste of raw API keys | Automatic zero-config loopback OAuth handshake |
| terminal Autonomous Multi-File Refactors | Basic code snippet generation | Full terminal agent with test running & diff review |
Simple, Pay-As-You-Code Credit Packs
No forced monthly recurring subscriptions. Top up your token balance anytime. All models included.
Free Starter
Instant credits granted on first signup. Full CLI access.
- check Claude 3.5 Sonnet & GPT-4o access
- check Interactive TUI & Command Mode
- check 1-Click Browser OAuth sync
- check Standard cloud reverse proxy
Pro Engineer
Most PopularFor engineers using the CLI agent for daily refactoring and shipping.
- check ~3.8M Frontier Tokens
- check Priority proxy routing queue (<10ms)
- check Multi-file autonomous test execution
- check Zero rate-limit throttling
Team & Studio
High-volume autonomous code generation and CI/CD pipelines.
- check ~11M Frontier Tokens
- check Unlimited parallel CLI sessions
- check Shared team token pool & audit log
- check Dedicated reverse proxy endpoint
Install & Code in 30 Seconds
No complex backend proxy setup or proxy certificates needed. Install the sovereign CLI package, sign in via browser, and run autonomous agent tasks immediately.
Engineered for Total Sovereignty
Our mission is to give software developers unconstrained autonomous AI capabilities without the catastrophic financial risk of leaked API credentials. We meter every token through our ultra-low latency gateway so you can build fearlessly.
< 15ms
Gateway Latency0 Keys
Ever Stored on Client99.98%
Proxy Uptime100%
Tamper-Proof MeteringFrequently Asked Questions
Everything you need to know about the LEGECY CLI platform.
How does LEGECY CLI prevent master API key leaks?
expand_more
cp_live_...). When the CLI performs an autonomous coding task, it sends requests to our reverse proxy (/v1/chat/completions), which validates the user's credits and relays the request to the model provider.
Which AI models are supported?
expand_more
--model claude-3.5-sonnet or configure defaults in your project settings.
How does the 1-Click Browser login work?
expand_more
legecy login starts a lightweight local loopback server on a random port and opens your default browser to /cli-auth.html. Once you click "Approve Session", your token is transmitted securely to your local CLI and written to ~/.legecy/credentials.json.