Cambium

Documentation

Cambium Client

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.fbx addresses 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.

CommandEffect
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.
whoamiPrints the server, your handle, the device, and the active project and workspace.

Projects and workspaces

CommandEffect
projectsLists 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

CommandDefault targetEffect
status [<path>...]Whole workspaceYour pending changelist plus every file's status, including moves made outside Cambium.
log [<path>...] [-n N]Whole projectHistory, newest first, following renames. With no path, the project's revisions.
locks [<path>...]Whole projectWho holds which locks, and on which device.
print <path> [--hash H] [-o FILE]NoneA file's content at a revision.

Building a changelist

CommandDefault targetEffect
checkout <path>...Every modified-without-checkout fileLocks 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" fileMarks local-only files to be created on the next submit.
delete <path>...None; requiredMarks files or folders for delete and removes the local copy.
move <from>... <to>NoneMoves or renames files and folders, keeping their history. rename is the same command.
revert [<path>...] [-f]Whole changelistUndoes 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

CommandDefault targetEffect
submit [<path>...] -m "message"Whole changelistSubmits as one new revision. With a path, only the changes under it.
pull [<path>...] [-f]Whole workspaceDownloads the latest, carrying on after an interruption. Needs -f before overwriting local changes.
rollback <path> <revision> [-f]NoneSets 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.

CommandEffect
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 @handleRemoves 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.
prefsLists the server's preferences.
prefs set <key> <value>Changes one, as in prefs set requireDescriptions true.

Scripting

  • --json works on every verb and prints one object: {"code", "ok", "data", "error"}.
  • Exit codes: 0 success, 1 the command ran and failed, 2 bad arguments, 3 not signed in, 4 the server can't be reached, isn't trusted or runs another version, 5 not inside a workspace, 6 sign-in is waiting after failed attempts.
  • Non-interactive sign-in reads CAMBIUM_SERVER, CAMBIUM_USER and CAMBIUM_PASSWORD.
  • A non-interactive run never prompts and hangs. Where the desktop console would ask you to confirm, the CLI wants -f instead.
  • --no-daemon runs one command without the background service, for build machines.
  • --paths-from FILE and --message-from FILE read paths and a submit message from files.