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 --helpSign in
cohub auth login
cohub auth whoamiThe 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 lsGlobal 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 getTerminology
| 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 lsPrompt 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" --jsonSchedule:
cohub -s <spaceId> spaces prompt --at "2026-07-20T09:00:00+08:00" "Weekly review" --jsonRun a command in the Space workspace
cohub -s <spaceId> run -- git statusFiles
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 diffWorks
cohub -s <spaceId> works publish demo --file dist/index.html
cohub -s <spaceId> works publish site --dir dist
cohub -s <spaceId> works ls --jsonLocal Sandbox
Expose a local folder as the Space Sandbox:
cohub sandbox up ./my-project
cohub sandbox statusSearch 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.pngOutput discipline
Use --json whenever a script or Agent needs to chain commands.
cohub spaces ls --json
cohub -s <spaceId> spaces sessions ls --jsonHuman-readable output is fine for interactive use. JSON is better for automation.
Next steps
- Product loop from the UI: Quick start
- Programmatic access: SDK
- Publishing details: Works