Docs · CLI

The Qoren command line.

The CLI does what the console does: create environments, deploy and message agents, read logs, and check what you are spending. It talks to the same API the console does, through the same account and the same plan limits, so anything you can do in a browser you can put in a script.

Install and sign in

The CLI ships as an npm package and needs Node 20 or newer. Signing in opens your browser once, and the token it creates is stored on your machine.

  1. 1qoren loginOpens a Qoren page asking you to approve this computer. Nothing is granted until you press Authorize.
  2. 2Approve in the browserThe page names the token and where it will be sent. It only ever sends the token back to your own machine.
  3. 3qoren whoamiConfirms which account and organization the CLI is now acting as.

Install, then authorize this computer

npm install -g @qoren/cli
qoren login
qoren whoami

Environments

An environment is the host your agents run on. Creating or resizing one is a job the CLI follows step by step, so the command finishes when the work does.

  • Sizes are light, standard, heavy and max. Your plan sets the ceiling; qoren account options shows what you may use.
  • Resizing restarts the environment, so its agents are briefly unreachable.
  • Destroying an environment destroys the agents on it.

Create an environment and list what you have

qoren env create --name production --size standard
qoren env ls
qoren env resize env_abc123 --size heavy

Agents

Deploying an agent builds it from a template onto an environment. It is a twelve step install, and the CLI prints each step as it happens.

  • A message runs one turn of the agent and can take minutes; the CLI waits and prints the reply.
  • qoren agent exec runs a shell command as the agent's own confined user.
  • qoren agent status probes the agent and lists its recent failures with suggested fixes.

Deploy an agent, talk to it, and read its log

qoren account templates
qoren agent create --env env_abc123 --template inbox-triage --name "Inbox triage"
qoren agent message agt_def456 "Summarize what came in today"
qoren agent logs agt_def456 --limit 100

Scripting and CI

Every command takes --json, and in that mode stdout carries only the payload. Progress and warnings go to stderr, so piping into another tool is safe.

  • Create a token for CI under Settings, CLI tokens, and set it as QOREN_TOKEN. It overrides any stored login.
  • Exit codes: 0 success, 1 the request failed, 2 a mistake in the command, 3 sign in again, 4 the plan does not allow it.
  • Add --no-wait to any command that starts a job to get the job id back immediately, then follow it with qoren jobs watch.

In a pipeline

export QOREN_TOKEN=qrn_...
qoren env ls --json | jq -r '.[].name'

Anything not yet a command

The CLI has a command for the things people do most, not for all of the API. Any other endpoint is still reachable directly, with the same credential and the same rules.

Call an endpoint directly

qoren api GET fleetSummary
qoren api POST machines --data @environment.json

Commands

Run qoren <command> --help for the full options of any of these.

CommandWhat it does
qoren login / logout / whoamiManage the credential on this computer
qoren env ls / get / create / rmManage environments
qoren env rename / resizeChange an environment's name or size
qoren agent ls / get / create / rmManage agents
qoren agent message / exec / logsWork with a running agent
qoren agent status / telemetryCheck an agent's health and spend
qoren account usage / spendingSee credits and infrastructure cost
qoren account options / templatesSee what your plan allows
qoren jobs ls / get / watch / cancelFollow long-running work
qoren api <method> <path>Call any endpoint directly

Frequently asked questions

In ~/.config/qoren/config.json, readable only by your user. It is a bearer token, so treat the file as a password. Set QOREN_TOKEN instead and the file is not consulted at all.

Keep reading

See it with a real agent.

The fastest way to understand the flow is to deploy a template and watch its first run.

Start free trial