Docs / Guides

Signing in

On your own machine you approve the CLI once in the browser and never handle a token. Agents and CI get a key of their own. This page is the whole picture: what happens, where things live, and how to undo them.

Two ways to be signed in

A loginAn API key
ForA person’s own machineAgents, CI, servers, sandboxes — anything without a browser
Howcolophon login, approved in the browserCOLOPHON_TOKEN in the environment
Acts asYou, in one workspace at a timeThe workspace, with the key’s scopes
Lives~/.config/colophon/credentials.json, mode 0600Nowhere on disk — the environment only
Expires30 days after its last useNever, until revoked
Can mint keysYes, if you are an ownerNo

When both are present, the environment variable wins. That is deliberate: an agent running inside your shell must never quietly act as you. colophon whoamialways says which one is in use.

What colophon login does

colophon login

In the terminal:

Open https://app.colophon.fyi/cli/authorize?code=WQ7K-4H2P
and confirm the code  WQ7K-4H2P
(opening your browser…)
Waiting for approval…

The browser opens that link. If you are not signed in to the dashboard you sign in first — Google, GitHub or an emailed link, as usual — and come straight back. The page then shows exactly what is being asked for:

Sign in to the colophon CLI?
CodeWQ7K-4H2P
Machinethe hostname the CLI reported
It will act asyour email address
In workspacethe workspace currently active in your browser
Approve · Deny

Check that the code on the page matches the one in your terminal and that the machine is yours, then click Approve. Within a couple of seconds the terminal finishes:

✓ Signed in as you@example.com · workspace acme (owner)
Saved to /Users/you/.config/colophon/credentials.json
  • The link is valid for ten minutes and works once. Reopening it afterwards says the code is no longer valid.
  • The session is bound to whichever workspace was active in your browser when you approved. Switch later if that was the wrong one.
  • Over SSH, or anywhere a browser can’t open, run colophon login --no-browser and open the printed link on any device where you are signed in — the approval does not have to happen on the same machine as the terminal.
Why a code, and why is nothing pasted? The short code identifies your request to a person who has already proved who they are by signing in. The token itself is only ever sent to the terminal that started the flow, over its own private channel, once. Nobody types a secret, so nothing ends up in a shell history, a screenshot or a chat.

What a login can do

Exactly what you could do in the dashboard, no more. An owner’s session publishes, manages links, reads traffic and can mint API keys. A member’ssession publishes and reads traffic; asking it to manage links is refused with a message naming the role. Everything it does is written to the audit log under your name, not a key’s.

Where the session lives

PlatformPath
macOS, Linux~/.config/colophon/credentials.json — or under $XDG_CONFIG_HOME if you set it
Windows%APPDATA%\colophon\credentials.json

The file is created readable only by you (0600) and holds the session token plus the user and workspace it was issued for, so whoami can answer without a network round trip. Treat it like an SSH key: don’t commit it, don’t copy it between machines — run login on each one instead, so each has its own revocable session.

Several workspaces

colophon switch            # list your workspaces; * marks the active one
colophon switch acme       # publish into acme from now on

A login points at one workspace at a time. Switching changes both the server-side session and the local file, and whoami confirms the change.

Signing out and revoking

colophon logout

Revokes the session on the server and deletes the local file. If the server can’t be reached the file is removed anyway, and you revoke from the dashboard instead.

Every signed-in machine is listed under Account → CLI sessions with its hostname, when it signed in, when it last did anything, and when it will expire. Revoke ends one immediately: the next command on that machine fails with your session has expired and asks for a fresh login. Use this for a lost laptop or a machine you no longer have.

Agents, CI and servers

A machine with no browser cannot log in — and shouldn’t act as a person anyway. Give it an API key: minted from your own signed-in terminal, or under API keys in the dashboard. Keys are owner-only to create, shown once, and scoped.

colophon create-token --name publishing-agent --scopes publish,links
# → colo_live_…   (shown once)

Then, in the agent’s environment — not your own shell profile:

export COLOPHON_TOKEN=colo_live_…

With the variable set, every command uses the key and nothing is written to disk. The key appears under API keys like any other, recorded as created by you, and can be revoked there. Keys cannot mint further keys; if an agent needs a different scope, mint it a new key.

When something goes wrong

You seeWhat it means
not signed inNo login on this machine and no COLOPHON_TOKEN. Run colophon login.
your session has expiredThirty days without use, or revoked from Account. Run colophon login again.
“That code is no longer valid” in the browserTen minutes passed, it was already used, or it was mistyped. Run colophon login for a fresh one.
denied in the browserSomeone clicked Deny. Nothing was issued.
Wrong workspace after approvingThe browser had a different workspace active. colophon switch <workspace>.
this command needs a signed-in sessioncreate-token or switch was run with COLOPHON_TOKEN set. Unset it, or run those from your own machine.
could not reach https://app.colophon.fyiNetwork, or COLOPHON_APP points somewhere else.

Full command details are in the CLI reference; how keys and roles fit together is in Workspaces, members & keys.

Signing in — Colophon docs