co auth — authentication
Log in, log out, and check your auth status
co auth manages your CollabOps authentication. It stores the API host, your token / session cookie, and the default workspace slug in one place.
co auth login
There are three ways to log in: browser login (--web), email + password, and a token (--token). If you signed up with a social account such as Google or Apple and have no password, use browser login.
co auth login --web
co auth login
co auth login --host https://collabops.ai --identifier you@collabops.ai
co auth login --token <PAT>| Flag | Description |
|---|---|
| --host <url> | API host, e.g. https://collabops.ai |
| --identifier <email> | Email or username — skips the prompt |
| --web | Log in through the browser (Google, Apple, or any method the web supports) |
| --token <token> | Use a Personal Access Token instead of a password |
| --workspace <slug> | Default workspace slug (e.g. my-team) |
On success the host, session cookie, and workspace are written to ~/.config/collabops/config.json.
Running co auth login with no flags first asks how you want to log in (How would you like to log in?). Choosing Browser is the same as --web; choosing Email + password prompts for your email and password. Passing --identifier skips this question and goes straight to the password prompt.
Log in through the browser (--web)
This is the way in for users who signed up with a social account such as Google. You never type a password into the terminal: you log in on the web as usual, and the CLI receives that login.
-
Run co auth login --web. The terminal prints a confirmation code (XXXX-XXXX) and opens your browser.
-
Log in to CollabOps in the browser. If you are already logged in, this step is skipped.
-
The CLI login page shows which account the CLI will use. Enter the code from the terminal in the confirmation code field and approve.
-
When the browser tab shows a completion message, close it and return to the terminal. On a first login you then pick your default workspace.
co auth login --web
# ! Confirmation code: ABCD-EFGH (enter it on the browser page)
# - Complete login in your browser: https://collabops.ai/cli/authorize?...Finish browser login in a browser on the same computer that runs co. The login is handed back to a local address (127.0.0.1) on that computer, so it cannot complete when the browser is on a different machine, for example when you are connected to a remote server over SSH. Use --token in that case. If you don't approve within 5 minutes the login times out; just run it again.
If the browser doesn't open automatically, open the URL printed in the terminal yourself. If co reports that --web is an unknown flag, update the CLI with co update.
Automatic SSH key and Git setup
After you log in, co checks whether this computer is ready to clone and push CollabOps repositories and sign commits. If something needs to change, it lists the changes first and asks Proceed? (y/N). Nothing changes unless you type y; pressing Enter skips it. If everything is already set up, it asks nothing.
| Item | What it does |
|---|---|
| SSH key | Uses a key in ~/.ssh that is already registered to your account. Otherwise it creates ~/.ssh/collabops_<host>_<username>. ssh-keygen asks for a passphrase; press Enter twice to leave it empty. |
| Server registration | Registers the public key as an access key and a commit signing key. The private key stays on this computer. |
| Git config | Writes user.name, user.email, core.sshCommand and commit signing settings to ~/.config/collabops/gitconfig-<host>, and adds a single include line to ~/.gitconfig. It applies only to CollabOps repositories; other repositories are not affected. |
co auth login
# ✔ Logged in as <your-name>
# › CollabOps Git setup (clone/push/commit signing). The following will change:
# • Create a new SSH key: ~/.ssh/collabops_… (ssh-keygen asks for a passphrase next)
# • Register on server: access key (public key only; the private key stays on this machine)
# • Register on server: commit signing key
# • Commits in CollabOps repos will be signed with this key
# ? Proceed? (y/N) y
# ✔ Registered access key
# ✔ Registered signing keyIf you already set user.signingkey, your commit signing setup is kept. If you have a global user.name, that name is used. With git older than 2.36 the Git config step is skipped. It never runs outside a terminal, so scripts and CI are not affected.
co repo clone offers the same setup when you have no access key, so one line takes you from login through key setup to clone. If you skipped the setup, run co auth login again to be offered it again.
co auth login && co repo clone <workspace>/<repo>co auth status
Prints the current host, workspace, auth kind (cookie/token/none), and verifies the user.
co auth status
# Host: https://collabops.ai
# Workspace: my-team
# Auth: ✓ cookie
# ✓ Authenticated as <your-name>co auth logout
Clears stored credentials only. Host and default workspace stay so you can log back in quickly.
co auth logoutIf co created keys and Git config, logout asks whether to delete them (default N). It removes only the server keys it registered, the key file it created, and its Git config; keys you made yourself are left alone. On a shared computer, delete all of them.
Run co config path to see where the config file lives.