Orion CLI

Orion from your terminal.

Deploy applications, manage Orion Cloud, and work with Orion-hosted repositories and pull requests. Commands are designed for people at a terminal and agents consuming structured output.

Node.js 20+Zero runtime dependenciesAgent-safe JSON

Quickstart

Install, sign in, deploy

Install the orion-cloud package globally with Bun. The executable is named orion-cli.

bun add --global orion-cloud
orion-cli login
orion-cli whoami
orion-cli deploy

The first deploy creates or links an Orion repository, pushes the committed revision, starts a build, waits for it to finish, and prints the live URL. Later deploys reuse the repository linked in local Git configuration.

To run without a global install, use bunx orion-cloud deploy. Run orion-cli help or append --help to a command to inspect its current options.

Deploy

Deploy committed code

Orion deploys HEAD. Uncommitted work remains local, so commit the exact state you want to release first.

git add -A
git commit -m "Describe the release"
orion-cli deploy --json

Monorepos

Use --root, --build-command, and --start-command on deploy, or persist them with configure.

Existing projects

Use --project <id-or-name> to target a specific Cloud repository. Use list --json to discover accessible projects.

orion-cli configure --root orion-next --build-command "bun run build"
orion-cli deploy --environment production --json
orion-cli status --json
orion-cli activity --json

deploy exits with code 0 only after the app reaches the deployed state. A failed build returns a non-zero exit code and structured error details when --json is present.

Pull requests

Review and merge without leaving the terminal

orion-cli pr list --json
orion-cli pr view 5 --json
orion-cli pr create --title "Add repository stars" --body "Ready for review" --json
orion-cli pr merge 5 --merge --json

Resolve a conflicting PR

  1. 1.Inspect mergeability and exact conflict paths with pr view.
  2. 2.Check out the PR's pinned head commit with pr checkout.
  3. 3.Run pr update-branch to merge the current base into the head.
  4. 4.If Git reports conflicts, resolve them and commit the merge.
  5. 5.Push the exact head branch with pr push, inspect again, then merge.
orion-cli pr view 5 --json
orion-cli pr checkout 5
orion-cli pr update-branch 5
# Resolve files only if Git reports conflicts, then commit.
orion-cli pr push 5 --json
orion-cli pr view 5 --json
orion-cli pr merge 5 --merge --json

pr update-branch pushes automatically when the merge is clean. When conflicts exist, it deliberately leaves the Git merge in progress so you can resolve and verify it locally.

Cloud management

Manage the whole application

The CLI covers the same repositories, services, environments, variables, domains, buckets, and deployment activity shown on the Orion Cloud canvas.

orion-cli service list --json
orion-cli environment create Staging --slug staging --json
orion-cli preview configure --enable --branch-previews --ttl 48 --json
orion-cli domain add example.com --json
orion-cli bucket create app-assets --json
orion-cli resources list --json

Keep secrets out of arguments

Write individual values through standard input or sync dotenv files.env list returns names, not values. Only useenv reveal when plaintext output is explicitly required.

printf '%s' "$API_KEY" | orion-cli env set API_KEY --stdin --environment production
orion-cli env push .env.production --environment production
orion-cli env list --environment production --json

Agent guide

A predictable automation contract

Use these rules when an agent operates Orion CLI. They are intentionally compact enough to place in an agent instruction file.

  • • Run inside the linked Git clone, or pass an explicit --project.
  • • Prefer --json; parse stdout as one JSON object and use the process exit code.
  • • Inspect with whoami, status, list, or pr view before mutating state.
  • • Never print tokens or secret values. Provide secrets through ORION_TOKEN, --stdin, or an environment file.
  • • Commit before deploy: the CLI deploys HEAD, not the working tree.
  • • Use exact targets and --yes only after verifying destructive operations.
# Establish identity and context
orion-cli whoami --json
orion-cli status --json

# Inspect the latest command contract when needed
orion-cli help
orion-cli pr --help

# Mutate with structured output, then verify
orion-cli deploy --json
orion-cli status --json

Authentication can come from a saved login or ORION_TOKEN. Headless systems can authenticate once with login --token <token>, but an environment variable avoids writing credentials to disk.

Command map

Find the right command

Source control

orion-cli sourceInspect or move a repository to Orion source control
orion-cli prCreate, inspect, resolve, and merge pull requests
orion-cli repoCreate, configure, list, or delete repositories
orion-cli collaboratorManage repository access and roles

Deployments

orion-cli deployPush HEAD, configure the app, and wait for deployment
orion-cli statusShow the linked app and its latest deployment
orion-cli activityList recent app or service deployments
orion-cli logsRead build or deployment logs
orion-cli openOpen the deployed app in a browser

Orion Cloud

orion-cli serviceManage services attached to an app
orion-cli environmentCreate and remove Cloud environments
orion-cli previewConfigure preview-environment policy
orion-cli configureSet build and monorepo configuration
orion-cli envManage encrypted environment variables
orion-cli domainManage app and service domains
orion-cli bucketManage object-storage buckets
orion-cli resourcesList or sync Cloud canvas resources

Authentication commands

Use login, logout, and whoami to manage the local session. Login accepts Orion desktop session tokens and personal access tokens.