download OFFICIAL INSTALLATION & SETUP

Install LEGECY CLI

Deploy autonomous AI coding agents directly to your developer terminal in seconds with zero configuration, automatic browser loopback OAuth, and tamper-proof credit metering.

Quick Install Command

Choose your preferred package manager or terminal shell

$ npm install -g @legecy/cli
verified Recommended for macOS, Linux, and Windows with Node.js 18+ installed.
End-to-End Walkthrough

Get Started in 4 Simple Steps

From zero to running autonomous coding workflows on your machine in under two minutes.

Step 01 download

Install the CLI Globally

Execute the install command in your terminal to register the global legecy command across your operating system.

npm install -g @legecy/cli
Step 02 lock_open

1-Click Browser Login

Run legecy login. Your default browser opens to the authorization portal. Click "Approve" to transmit an ephemeral session key.

legecy login
Step 03 account_balance_wallet

Verify Connection & Credits

Check your connected account details, available credit balance, and active cloud models directly from your console.

legecy status
Step 04 psychology

Execute Autonomous Tasks

Prompt the agent inside any repository. It autonomously scans files, executes builds, writes unit tests, and formats diffs.

legecy "Refactor auth and add JWT verification"
user@workstation: ~/my-project
LEGECY CLI v2.5.0
user@dev:~/repo$ legecy login
⚡ Initiating 1-Click Browser Authentication Loopback...
Listening for callback on local port: http://127.0.0.1:4567/callback
Opening authentication portal in your default browser...
✓ [SUCCESS] Session Approved by developer@legecycli.dev
Token stored safely in ~/.legecy/credentials.json
Account Balance: 500 Credits Available (Tier: Sovereign Pro)
user@dev:~/repo$ legecy "Add rate limiter middleware to Express app"
🔍 Analyzing 14 repository files...
🤖 Dispatching task to Claude 3.5 Sonnet (Tamper-Proof Metered Proxy)
✓ Created src/middleware/rateLimiter.ts (64 lines)
✓ Updated src/index.ts (+3 lines)
💳 Credits deducted: 2 (Remaining balance: 498 credits)
Specifications

System Compatibility

laptop_mac macOS
macOS 12.0 (Monterey) or higher
Native Apple Silicon (M1/M2/M3/M4)
Intel x86_64 supported
desktop_windows Windows
Windows 10 / 11 (64-bit)
PowerShell 5.1+ or PowerShell 7+
Windows Terminal & WSL2 compatible
terminal Linux
glibc 2.28+ (Ubuntu 20.04+, Debian 10+)
Arch Linux, Fedora, Alpine
x86_64 and aarch64 architectures
Automation & CI/CD

Headless Environment Configuration

For Docker containers, GitHub Actions, and headless deployment scripts where browser login is unavailable, configure environment variables:

export LEGECY_SERVER_URL="https://legecycli.onrender.com"
export LEGECY_TOKEN="cp_live_your_api_token_here"
export LEGECY_DEFAULT_MODEL="claude-3-5-sonnet"
Generate persistent CI/CD tokens directly from your Developer Dashboard.

Installation FAQs

How do I fix npm "EACCES: permission denied" during global install?

expand_more
Never run npm with sudo. Instead, configure npm's global prefix in your home directory:
mkdir ~/.npm-global && npm config set prefix '~/.npm-global' Then add export PATH=~/.npm-global/bin:$PATH to your ~/.zshrc or ~/.bashrc.

How does LEGECY CLI protect my master API keys?

expand_more
Master OpenAI, Anthropic, and DeepSeek keys never touch developer workstations or the CLI binary. All code completions route through our sovereign reverse proxy gateway, keeping client binaries 100% immune to decompilation and key scraping.

How do I upgrade to the newest release?

expand_more
Simply run legecy update or re-run npm install -g @legecy/cli@latest. Your stored credentials in ~/.legecy/credentials.json remain intact.

Ready to Supercharge Your Terminal?

Sign in to your web portal to claim your 100 free developer credits and start building.