Developers

CLI

Install Cohub CLI, sign in, and run the main Space workflows from your terminal.

The Cohub CLI exposes the same product surface from a terminal: Spaces, Chats, files, Saves, Works, generation, and more.

Package: @neta-art/cohub-cli

Install

npm install -g @neta-art/cohub-cli
cohub --help

Sign in

cohub auth login
cohub auth whoami

The CLI stores a session and refreshes it automatically.

In Sandbox or CI, COHUB_EXECUTION_TOKEN can override stored auth for ephemeral runs.

Environments

Production is the default.

ENV=dev cohub auth login
ENV=dev cohub spaces ls

Global flags

Flag Purpose
-s, --space <id> Target Space for space-scoped commands
--json Machine-readable output
-h, --help Command help

Many workflows need a Space:

cohub -s <spaceId> spaces get
COHUB_SPACE_ID=<spaceId> cohub spaces get

Terminology

UI CLI
Chat Session
Save Checkpoint
Tasks Task runs
Scheduled prompt spaces prompt schedule / cron jobs

Common workflows

Spaces

cohub spaces ls --json
cohub spaces create --name "Demo" --json
cohub spaces get <spaceId> --json
cohub -s <spaceId> spaces files ls

Prompt a Chat

cohub -s <spaceId> spaces prompt "Fix the failing tests" --json
cohub -s <spaceId> spaces prompt --title "Planning" "Draft a launch plan" --json
cohub -s <spaceId> spaces prompt --session <sessionId> "Continue from the diff" --json

Schedule:

cohub -s <spaceId> spaces prompt --at "2026-07-20T09:00:00+08:00" "Weekly review" --json

Run a command in the Space workspace

cohub -s <spaceId> run -- git status

Files

cohub -s <spaceId> spaces files ls
cohub -s <spaceId> spaces files cat README.md
cohub -s <spaceId> spaces files write notes.md --stdin < notes.md
cohub -s <spaceId> spaces files upload ./src
cohub -s <spaceId> spaces files diff

Works

cohub -s <spaceId> works publish demo --file dist/index.html
cohub -s <spaceId> works publish site --dir dist
cohub -s <spaceId> works ls --json

Local Sandbox

Expose a local folder as the Space Sandbox:

cohub sandbox up ./my-project
cohub sandbox status

Search and models

cohub search "release notes"
cohub models ls
cohub models ls --model-type multimodal
cohub generate "A calm lake at sunrise" --model <model> --output lake.png

Output discipline

Use --json whenever a script or Agent needs to chain commands.

cohub spaces ls --json
cohub -s <spaceId> spaces sessions ls --json

Human-readable output is fine for interactive use. JSON is better for automation.

Next steps