CLI installation
Getting started with the CLI is three moves on your machine: install the 4rged command,
sign in with your company account, and run an agent from a git repo you already use for
development. After that, the CLI shares the same organization, models, and usage
rules as the desktop app and cloud agents.
This page is the hands-on setup guide for your laptop. For why you'd use the CLI at all, see CLI overview. For pipelines and bots (no browser login), see Headless & CI.
What this page is for
4rged.ai/cli/install has the latest commands. This doc teaches the setup flow most developers follow — not every advanced install option.
Who this page is for
You do not need the desktop app to complete this page — CLI only is fine.
Understand installation at a glance
Typical first day:
- Install →
4rged --versionworks - Login → browser →
4rged whoamishows your org cdinto repo → one read-only agent prompt- If denied → check project membership or ask admin
Before you install
Org admins may disable API keys later — that does not block interactive 4rged login on
your machine.
The three-step setup
Skip API keys until you need CI — Login vs API key below.
Install the CLI
macOS or Linux
curl -fsSL https://4rged.ai/cli/install | sh 4rged --versionIf
4rgedis not found: restart the terminal or add the install directory to PATH (default path is on the install page).Windows
Run 4rged.ai/cli/install.ps1 in PowerShell, open a new terminal, then:
4rged --versionNeed options or mirrors?
Open 4rged.ai/cli/install in a browser for guided steps and current platform notes.
Re-run the same installer to upgrade later — see Update or reinstall.
Sign in
Interactive sign-in is for you at the keyboard — one browser step, then the CLI reuses the session.
Login
4rged loginApprove access in the browser when prompted.
Verify
4rged whoamiExpect your user and organization. Wrong org? Switch org in the dashboard, then
4rged logoutand login again.Logout (shared machines)
4rged logout
Use the account your admin invited. A personal account with no org cannot run agents even if install succeeded.
Login vs API key
Easy to mix up when reading docs:
First-time setup: login only. Add API keys when you automate.
Run your first agent
Go to your repo
cd path/to/your-projectSame folder you use for
git status— not your home directory.Add project (if your team uses projects)
Ask your lead for the project slug. It aligns repos, model policy, and usage with the desktop app.
Run something low-risk
Without project:
4rged agent run --prompt "Summarize the main packages in this repo"With project (replace name):
4rged agent run --project your-project --prompt "Summarize the main packages in this repo"Read the result
Output appears in the terminal. For longer work, see local vs cloud in CLI overview.
Start with read-only prompts (summarize, explain) until you know which models and repos your org allows.
What success looks like
You're ready for daily CLI use when install, login, and one simple run all behave predictably.
Optional: API key for scripts
Skip this until you need automation:
- Dashboard → Integrations → User API keys
- Store in CI secrets or a vault — never in git
- Headless & CI for pipelines
Rotate when someone leaves; treat like a password.
Confirm you are ready
Before daily use or copying setup into CI:
How installation fits together
Update or reinstall
Some companies use an internal build. Follow platform team docs if the public installer is not for you.
Fix install issues
`4rged`: command not found
New terminal window; check PATH on install page.
Login / browser problems
Try another browser; check VPN/proxy; confirm you can open X4RGE auth in browser.
whoami: no org or wrong org
Accept org invite (Members); switch org in dashboard; logout + login.
Agent run denied
Project members; Model control; Require project assignment in Settings.
Works locally, fails in CI
CI needs API key — not login. See Headless & CI.
Still stuck
Troubleshooting or org admin.