DocsDevelopersCLI

CLI

The rootcx CLI creates projects, scaffolds apps, deploys to your Core, and invokes agents. It works alongside Claude Code, RootCX Studio, or any editor you prefer.

Installation

curl -fsSL https://rootcx.com/install.sh | sh

The binary is installed to ~/.rootcx/bin/rootcx. The installer adds it to your PATH automatically.

Commands

rootcx init

Create a new project from scratch. The CLI asks for an app name, where to run (RootCX Cloud or self-hosted Docker), and credentials. It provisions the workspace, scaffolds your first app, and deploys it.

rootcx init

If you're already signed in (from a previous rootcx auth login), the CLI skips the auth step and reuses your existing session.

rootcx auth login

Sign in to a RootCX Core instance.

rootcx auth login https://myproject.rootcx.com

The CLI detects the Core's auth mode and prompts accordingly:

  • Password login -- prompts for email and password.
  • OIDC -- opens the browser for SSO (Okta, Microsoft Entra, Google Workspace).
  • Token -- pass --token for non-interactive use (CI pipelines).
rootcx auth login https://myproject.rootcx.com --token eyJ...

Credentials are saved to ~/.rootcx/config.json. One session at a time: signing in to a different Core replaces the previous session.

rootcx auth logout

Clear stored credentials.

rootcx auth logout

rootcx auth whoami

Show the currently signed-in user.

rootcx auth whoami
rootcx auth whoami --json

rootcx new

Scaffold a new app or agent in a new directory. Creates a Vite + React + Tailwind project with the RootCX SDK pre-configured.

rootcx new my_crm
rootcx new support_agent

Creates a Vite + React + Tailwind project with the RootCX SDK pre-configured.

rootcx deploy

Deploy the current project to the connected Core.

rootcx deploy

The deploy process:

  1. Installs dependencies (bun install) if a package.json is present.
  2. Builds the frontend (bun run build) if a src/ directory is present.
  3. Installs the manifest via POST /api/v1/apps.
  4. Packs and uploads backend/ as a tar.gz archive (if present).
  5. Packs and uploads dist/ as a tar.gz archive (if present).
  6. Starts the worker if a backend was deployed.

rootcx apps

List all installed apps on the connected Core.

rootcx apps list
rootcx apps list --json
rootcx apps describe my_app
rootcx apps rm my_app

rootcx agents

Invoke and inspect agents.

rootcx agents invoke my_app "What are the open tickets?"
rootcx agents invoke my_app "And the closed ones?" --session abc123
rootcx agents list
rootcx agents sessions my_app

rootcx data

Read and write app data from the command line.

rootcx data query my_app contacts '{}'
rootcx data query my_app contacts '{"where":{"status":{"$eq":"active"}}}'

rootcx status

Check the connection to the Core and display its status.

rootcx status
rootcx status --json

rootcx upgrade

Update the CLI to the latest version.

rootcx upgrade
rootcx upgrade --version 0.14.0

rootcx completions

Generate shell completions for tab-complete support.

# Zsh
rootcx completions zsh > ~/.zfunc/_rootcx

# Bash
rootcx completions bash > /etc/bash_completion.d/rootcx

# Fish
rootcx completions fish > ~/.config/fish/completions/rootcx.fish