Skip to main content

CLI overview

The X4RGE CLI is how you run agents from a terminal — same company account, models, and project rules as the desktop app and cloud agents, but built for developers who already work in the shell, in scripts, or in CI.

Think of it as agents where your code already lives: you cd into a repo, describe what you want, and get output in the terminal (or a run ID for automation) — without opening a browser for every task.

This page explains what the CLI is, when to use it, and how it connects to the rest of X4RGE. Hands-on setup is Installation. Pipelines and bots are Headless & CI.

What this page is for

You want to…This overview helps you…
Understand what the CLI isTerminal path to agents — not a separate product
Pick CLI vs desktop vs cloudChoose the right surface for the job
Know how auth worksLogin on laptop vs API key in CI
See how projects fit inSame repos, policy, and usage as desktop
Decide local vs cloud from CLIShort work on your machine; long work in cloud
Find the next docInstall, headless, or cloud — where to go next
One platform, three surfaces

CLI, desktop, and cloud share model control and usage. Admins do not configure a separate "CLI-only" stack.

Who this page is for

You are…Read first
Developer wondering if you need the CLIWhat the CLI is and is notCLI vs desktop vs cloud
New hire ready to try itGet startedInstallation
Platform / DevOpsHeadless & CI after skimming auth + project scope here
Org adminWho can use the CLI + Model control
PM / leadWhy the CLI matters + In practice

You do not need to read command flags here — those live on 4rged.ai/cli/install.

What the CLI is and is not

The CLI isThe CLI is not
The 4rged command in your terminalA different X4RGE product or billing plan
A way to run agents from a git repoA replacement for the desktop app always
Scriptable output for CI and botsSomething that uses browser login in GitHub Actions
Optional cloud handoff for long jobsThe same thing as Cloud agents UI — but can connect to it
Bound to your org after login or API keyAnonymous or offline-only tooling

Rule of thumb: use the CLI when the terminal or a pipeline is already where you work.

Understand the CLI at a glance

TermPlain meaningExample
4rgedCLI command after install4rged --version
Local runAgent uses your checkout on your machineFix tests before push
Cloud handoffSame CLI starts work on X4RGE cloudLarge migration
Project scopeWhich project rules apply--project payments-api
PromptWhat you ask the agent to do"Summarize auth middleware"
Run IDTrack status in scripts or dashboardCI polls until done
HeadlessNo human — API key in CIHeadless & CI

Conceptual flow (human on laptop):

  1. Install + login once
  2. cd into repo
  3. Run with prompt (+ project if your org uses projects)
  4. Read output in terminal — or hand off to cloud if the job is long

Where to go next

Your goalNext doc
Install on my machineInstallation
Wire GitHub Actions / CIHeadless & CI
Long autonomous cloud workCloud agents
Scope repos and usageProjects overview
Exact command flags4rged.ai/cli/install
Something brokeTroubleshooting

This overview stays conceptual. Follow the row that matches what you're doing today.

CLI vs desktop vs cloud

Choose by how you work, not by "most powerful":

CLIDesktop appCloud agents
Best forShell, scripts, CI, quick repo workExploratory editing, rich UIBackground autonomous work
You interact viaTerminal (+ optional browser for login)Desktop / IDE UIWeb or CLI → cloud
Typical sessionOne prompt; scriptable resultBack-and-forth in UIMulti-step, may run while you're away
Get startedInstallationDesktop downloadProject + linked repo
SituationStart here
Refactor before commitCLI local
Explore unfamiliar code with diffsDesktop
PR check bot every pushCLI + Headless & CI
Multi-hour migrationCLI cloud handoff or Cloud agents
On-call fix tonightDesktop or CLI local

Many teams use desktop for exploration and CLI in CI on the same repos — not either/or.

Choose local vs cloud

Same CLI entrypoint — different where work runs:

Choose local when…Choose cloud handoff when…
Prompt fits in a short sessionJob may run longer than you want on laptop
You want diffs in your checkout immediatelyCI runner should stay thin
You're learning policy on your machineTask spans many files or repos
SignalWhat to do
Laptop fan / timeoutCloud handoff or Cloud agents
Quick summary or reviewLocal
Nightly scheduled heavy jobCloud or headless CI — Headless & CI

Both paths count toward Usage.

Login vs API key

LoginAPI key
WhoYou on a laptopCI, cron, scripts
SetupInstallationHeadless & CI
BrowserYes, once per sessionNo

Do not use login in CI — pipelines need a key in secrets.

Who can use the CLI

WhoCan use CLI?
Org member with agent accessYes — after login or valid API key
Org adminYes; manages policy in dashboard
ContractorYes if org member + on right projects
CI botYes with API key — Headless & CI

If Require project assignment is on in Settings, you need project membership before runs succeed — same as desktop.

Admins may restrict API keys; that blocks automation, not necessarily 4rged login locally.

Why the CLI matters

Without a CLI pathWith the CLI
Agents only from GUIStart from the repo in your shell
Repeat checks are manualScripts and CI reuse the same capability
Humans and pipelines divergeRun IDs and JSON bridge both worlds
Long work tied to browserCloud handoff from one command

The CLI is for developers and automation — same permissions and spend as other surfaces.

How the CLI fits together

PieceRoleLearn more
Install4rged on your machineInstallation
AuthOrg boundary for every runLogin vs API key
Agent runPrompt → work → outputWhat a run looks like
ProjectRepos, policy, usage bucketProject-scoped runs
ModelsWhat you're allowed to useModel control
SpendAttributionUsage
CIKeys, pin version, pass/failHeadless & CI

What a run looks like

On your laptop (typical):

  1. Terminal open in repo
  2. You run agent with a clear prompt
  3. Agent reads/edits within policy
  4. Output in terminal; you review before commit
  5. Usage recorded under your org (and project if scoped)

In CI (typical):

  1. Job installs pinned CLI
  2. API key from secrets → whoami
  3. Agent run → run ID + JSON
  4. Job waits or polls → pass or fail on exit code

Details: Headless & CI.

In practice

You want to…Do this
Try CLI onceInstallation → small read-only prompt
Match desktop policyPass project when org uses projects
Automate PR checksHeadless & CI
Fix tests before pushLocal CLI, focused prompt
Multi-hour migrationCloud handoff or Cloud agents
Track spendUsage — CLI included
Link to a ticketProject + Tasks & views

Project-scoped runs

When work is organized in projects, pass project on CLI runs so:

  • Repos and policy match desktop for that initiative
  • Usage rolls up to the right project in Usage
  • Tasks can link to agent runs — Tasks & views

If you see project or access errors: confirm Project members and linked GitHub repos.

Get started

  1. Read this overview

    Decide CLI vs desktop vs cloud for your task.

  2. Install and sign in

    Installation4rged login, not API key on day one.

  3. Run from a repo

    Low-risk first prompt; add project if your team uses projects.

  4. Automate later

    Headless & CI when you need pipelines — not before local works.

  5. Go long in cloud

    Cloud agents when work outgrows one terminal session.

Commands change; concepts don't

Flag names evolve on 4rged.ai/cli/install. This site explains how the CLI fits your team — the install page lists current syntax.

Fix common issues

  1. Not installed

    Installation — PATH, new terminal.

  2. Not signed in

    4rged login locally; API key in CI — Headless & CI.

  3. Run denied

  4. Wrong directory

    Run from repo root, not home folder.

  5. CI fails, local works

    Secrets, pinned version, project scope — Headless & CI.

  6. Still stuck

    Troubleshooting or org admin.

Questions about the CLI?

QuestionAnswer
What is the X4RGE CLI?Terminal app (4rged) to run agents from repos and CI
Separate product from desktop?No — same org, models, usage
Need desktop app?No — CLI stands alone after install
Where are commands documented?4rged.ai/cli/install
CI without browser?YesHeadless & CI
Does CLI usage bill?YesUsage
Local vs cloud?Short = local; long = cloud handoff
Why --project?Same scope as desktop for that initiative
CLI vs cloud agents product?CLI is a how you invoke; cloud agents is where long work runs
First doc after this page?Installation for almost everyone