cs login
Sign in to CoreSpeed through the browser and store the member session every other cs command runs under.
cs login opens your browser to CoreSpeed's sign-in, completes OAuth 2.1 with
PKCE against a loopback callback on 127.0.0.1, and stores the tokens under
~/.config/cs. The result is a member session — the same principal as
browser sign-in from an agent — so everything a signed-in member may do,
including the session-gated manage__* tools, is available to the CLI. See
Authentication.
Usage
cs login # opens the browser; prints the URL to visit if it cannot
cs login --org org_01J… # sign in to one organizationChoosing an organization
A member of several organizations picks one in the terminal. The default is the organization the browser sign-in selected, then the one this machine used last:
Choose an organization:
1) org_01J… (Acme) [admin] (default)
2) org_01K… (Side project) [member]
Organization [1]: 2
Logged in as ada@example.com.
Organization: org_01K… (Side project) [member]--org skips the question and hands the organization to the sign-in page, which
applies that organization's sign-in rules (SSO, MFA) before it lets you in.
Without a terminal (CI, agents, pipes) there is no question: the default is
used, and the output says how many organizations you belong to. Change it later
with cs switch.
What happens
- The browser reuses its CoreSpeed sign-in when it has one, so no password is
asked.
Logged in as …names the account that was used; to use another, sign out on the dashboard first, then runcs logoutandcs login. - A first sign-in provisions your personal organization, and the output marks
it
— created by this sign-in. - The access token lives five minutes. Every other command refreshes it silently, so you sign in once per machine, not once per command.
- Until you sign in, every command that needs the session fails with exit
code
3andError: not logged in; run `cs login`. cs logoutremoves the stored session.
Signing in on a remote machine
On a machine without a browser, such as a server you reach over SSH, open the
printed URL in your local browser. Sign-in finishes by redirecting that browser
to 127.0.0.1 on the machine running cs, so fix the port and forward it:
ssh -L 8765:127.0.0.1:8765 you@devbox
CS_LOGIN_PORT=8765 cs loginSign-in waits five minutes for the browser. The session is stored in
CS_CONFIG_DIR, ~/.config/cs by default.