From your terminal
Command line
The cargobay command is the Cargo Bay client itself. Cargo Bay for Mac installs it, or you can install it on its own. Use the same repositories and saved account without keeping a desktop window open: the client starts in the background when a command needs it, and keeps itself up to date. No separate Lore or Node installation is needed.
Enable the command
Install Cargo Bay in Applications and open it. It installs the client in ~/.cargobay. Choose Enable command-line access on first launch, or find it later in Settings; it links /usr/local/bin/cargobay to the client. macOS may ask for administrator authorization.
Open Terminal and try the command reference:
cargobay --helpSettings can also check, repair, or remove command-line access. If your shell uses a custom PATH, make sure it includes /usr/local/bin.
Install without the app
On an Apple Silicon Mac where you or your agents work only in the terminal, install the client by itself. The script checks the download’s checksum and signatures, installs into ~/.cargobay, and links /usr/local/bin/cargobay when it can; otherwise it prints how to add the command to your PATH.
curl -fsSL https://downloads.cargobay.org/client/install.sh | shThe client updates itself; cargobay update updates it now. To stay on one version, add -s -- --version 0.5.0 after sh. Cargo Bay for Mac uses the same installed client.
Create a repository
Sign in and choose a name and folder. Cargo Bay creates the hosted repository and its connected local workspace in one step.
cargobay login
cargobay create "Project name" my-project
cd my-projectThe destination can contain project files: they remain unstaged until you choose what to commit. If setup is interrupted, use cargobay retry-create to resume the saved request and destination.
Save and share a version
In a Cargo Bay workspace, inspect your changes, stage the files you want, and commit. Replace the example file and author with your own.
cargobay status
cargobay stage notes.txt
cargobay commit -m "Update notes" --author "Your name"
cargobay historyWhen you’re signed in, a commit is saved and then uploaded in the same command. Add --local to keep it on your Mac; it works offline too, and cargobay push shares it later. If an upload can’t happen, the commit is still saved, and the result says why and what to run next. status shows whether your work is shared.
Work with a shared repository
Use your existing desktop sign-in, or run cargobay login to sign in through your browser. List the repositories you can access and clone one, by name or ID, into a new or empty folder.
cargobay repositories
cargobay clone "Project name" my-project
cd my-project
# Check for and receive collaborators’ commits:
cargobay check
cargobay pullpull applies clean fast-forward updates. If histories have diverged, cargobay merge-server merges the server’s changes for you to review, then merge-finish saves and shares the result. Add --exclude FOLDER to a clone to leave large folders out. Repository owners can manage contributors with cargobay members and cargobay member add.
Several workspaces of one repository
You can keep several workspaces of a repository on one Mac, for example one per task or agent. They share downloaded data, so another workspace downloads almost nothing. Each works on its own branch:
cargobay clone "Project name" ~/work/task-a --branch task-a
# Later, in the workspace on main:
cargobay merge task-acargobay switch NAME also checks out a branch someone else uploaded. If you move a workspace’s folder, run any cargobay command in it before cloning again.
Sign in without a browser
For a machine where you can’t sign in through a browser, or to give an agent access to one repository rather than your whole account, create an access key on your account’s Access keys page (or with cargobay keys create). A key reads and writes one repository, expires after 90 days unless you choose otherwise, and can be revoked at any time. Then either set it for a command or save it:
CARGOBAY_TOKEN=cargobay_... cargobay -C my-project push
cargobay login --token < key-fileKeep keys out of your shell history and repositories: prefer CARGOBAY_TOKEN_FILE (the path of a file holding the key) or login --token, which reads standard input. Revoking a key stops new connections at once; connections already open can last a few more minutes.