Appearance
ts login
Sign in to the targeted Turbo Server and store the ticket for later commands. Use it once per server; ts keeps a separate login for each.
Usage
text
ts login [<username> <password>] [--api-key=KEY] [--auth=basic|sso] [--device-code]Description
With no arguments, ts login prompts for a username and password. The password is not echoed as you type and never appears in logs.
--auth=sso signs in through whatever identity provider the server uses. ts prints a short code and a URL; you open the URL in a browser, sign in as you normally would, and approve the code. The command waits until you approve, deny, or the code expires after fifteen minutes. On an interactive terminal ts opens the browser for you; --device-code suppresses that, for a machine with no browser of its own.
--api-key signs in without a prompt and is the right choice for scripts and CI. Create the key with ts api-key new, which prints it exactly once — so a scripted setup can bootstrap its own credential without a trip to the Administration site.
Running ts login with no arguments when a login already exists reports who you are signed in as instead of prompting again.
The ticket is written to a private file under your user profile — %LOCALAPPDATA%\Turbo Server\cli on Windows, $XDG_CONFIG_HOME/turbo-server (usually ~/.config/turbo-server) elsewhere — readable only by you.
For a one-off command without storing anything, set TSTICKET (a ticket) or TSAPIKEY (an API key) in the environment.
Options
| Flag | Description | Default/Values | Notes |
|---|---|---|---|
--api-key | Sign in with an API key instead of a password. | Cannot be combined with a username or --auth=sso. | |
--auth | How to sign in. | Default basic; sso | sso requires approving a code in a browser. |
--device-code | Print the code and URL without opening a browser. | For headless machines. Implies --auth=sso. |
Examples
bash
# Prompt for username and password
ts login
# Provide the username, prompt for the password
ts login alice
# Through the server's identity provider
ts login --auth=sso
# On a build agent with no browser
ts login --device-code
# Unattended
ts login --api-key=tk_live_9f2c...
# Sign in to a second server without disturbing the first
ts --server=https://staging.example.net login aliceAvoid passing the password as an argument — it lands in your shell history and in the process list. Prompt for it, or use an API key.
Output
text
Logged in as aliceWith --auth=sso, before that:
text
To sign in, open:
https://turbo.example.net/authorize-cli?code=QBZ7-XFFB
and approve code QBZ7-XFFB. Waiting for approval...With --format=json, the result carries a user object with the server and login name.
Exit Codes
0 on success. -4 when the credentials are refused, the request is denied, or the code expires. -3 when the server cannot be reached.
