Using the CLI and Commands
cambium is the same engine as the app. Both send their commands to one background service per person on the machine, so a checkout made in one shows in the other within a second, and the engine plugins use it too. The app's Console panel runs these same commands; there you drop the cambium prefix and just type the verb. cambium <verb> --help describes any of them.
Naming files
Anything that takes a path accepts two forms:
- Filesystem path, resolved against your working directory. A leading
./,../or an absolute path forces this reading, as in./Assets/player.fbx. - Repository path, project-rooted, written with a leading
//.//Assets/player.fbxaddresses that file in the active project no matter where you are on disk.
A bare Assets/player.fbx is treated as a filesystem path. A path can be a file or a folder; a folder means everything under it, the same as selecting that folder in the tree.
The project is the one named with -p, otherwise the workspace you are standing in, otherwise the machine's active project (use).
Session and connection
A server address is host:port, or just the host for a server on port 443.
| Command | Effect |
|---|---|
login [--server HOST:PORT] [--user @handle] [--remember] | Signs in. The password is prompted, or read from CAMBIUM_PASSWORD. The first connection to a server asks you to trust its fingerprint, unless its certificate is from a public authority. --remember keeps a device-bound token, the same as "Remember me" in the app. |
setup <server> <code> [--user @handle] | Claims a new server with the setup code it printed, and makes you its first admin. |
logout [--forget] | Signs this device out. --forget also revokes its remember-token. |
trust [HOST] --fingerprint <fp> | Trusts a server's fingerprint without the prompt, for when an admin hands it to you. |
forget [HOST] | Drops everything this machine trusts about a server. |
whoami | Prints the server, your handle, the device, and the active project and workspace. |
Projects and workspaces
| Command | Effect |
|---|---|
projects | Lists the projects you are a member of. |
join <code> | Joins a project with an invite code. |
link <project> <folder> | Makes a folder the project's workspace. One workspace per project on a machine: linking a new folder unlinks the old one, whose files stay on disk. |
use <project> | Sets the active project. Stored per machine, not per shell. |
workspace [<path>] | Which linked workspace holds a path. |
Looking around
| Command | Default target | Effect |
|---|---|---|
status [<path>...] | Whole workspace | Your pending changelist plus every file's status, including moves made outside Cambium. |
log [<path>...] [-n N] | Whole project | History, newest first, following renames. With no path, the project's revisions. |
locks [<path>...] | Whole project | Who holds which locks, and on which device. |
print <path> [--hash H] [-o FILE] | None | A file's content at a revision. |
Building a changelist
| Command | Default target | Effect |
|---|---|---|
checkout <path>... | Every modified-without-checkout file | Locks files for editing, for you on this device. Per file: ask for twelve paths where one is taken and you get the other eleven, plus who holds the twelfth. Checking out a file you already hold is not a failure. |
add [<path>...] | Every "not added" file | Marks local-only files to be created on the next submit. |
delete <path>... | None; required | Marks files or folders for delete and removes the local copy. |
move <from>... <to> | None | Moves or renames files and folders, keeping their history. rename is the same command. |
revert [<path>...] [-f] | Whole changelist | Undoes a pending change: discards edits, un-marks adds and deletes, puts moved files back and releases checkouts. Needs -f when it would throw away real work. |
Submitting and syncing
| Command | Default target | Effect |
|---|---|---|
submit [<path>...] -m "message" | Whole changelist | Submits as one new revision. With a path, only the changes under it. |
pull [<path>...] [-f] | Whole workspace | Downloads the latest, carrying on after an interruption. Needs -f before overwriting local changes. |
rollback <path> <revision> [-f] | None | Sets a file back to its content from that revision, recorded as a new revision. |
cambium checkout ./Assets/player.fbx
# …work…
cambium submit ./Assets/player.fbx -m "adding blocking animations"Administration
These need an admin account. Handles are @handles; a missing @ is added for you.
| Command | Effect |
|---|---|
unlock -f <path>... | Force-releases someone else's lock and tells them. -f is mandatory. |
adduser @handle <password> [--admin] | Creates a user, or reinstates a removed handle. |
deluser @handle | Removes a user and releases their locks. Not yourself, and not the last admin. |
password @handle [<password>] | Changes your own password, which needs your current one, or resets someone else's and signs them out everywhere. |
setrole @handle <member|admin> | Changes a role. Not your own, and not the last admin's. |
assignmember @handle <project> | Adds a user to a project. |
removemember @handle <project> | Removes them again, releasing their locks there. |
addproject <name> | Creates an empty project. |
delproject <project> [-f] | Deletes a project and everything in it. On a terminal it asks you to type the project name; -f is what you use where it cannot ask: the desktop console, a pipe, CI. |
prefs | Lists the server's preferences. |
prefs set <key> <value> | Changes one, as in prefs set requireDescriptions true. |
Scripting
--jsonworks on every verb and prints one object:{"code", "ok", "data", "error"}.- Exit codes:
0success,1the command ran and failed,2bad arguments,3not signed in,4the server can't be reached, isn't trusted or runs another version,5not inside a workspace,6sign-in is waiting after failed attempts. - Non-interactive sign-in reads
CAMBIUM_SERVER,CAMBIUM_USERandCAMBIUM_PASSWORD. - A non-interactive run never prompts and hangs. Where the desktop console would ask you to confirm, the CLI wants
-finstead. --no-daemonruns one command without the background service, for build machines.--paths-from FILEand--message-from FILEread paths and a submit message from files.