Skip to content

Turbo Server CLI (ts) ​

Use ts to administer a Turbo Server from a terminal or a script. It works the same against the server on the machine you are sitting at and a server across the network, and it covers the day-to-day administration you would otherwise do in the Administration site.

What You'll Learn

  • How to point ts at a server and sign in
  • Which commands cover which part of administration
  • How to get machine-readable output for scripts
  • What the exit codes mean

Installing ​

ts ships with Turbo Server. On a server it is installed to the Bin directory under the install root — ts.cmd on Windows, ts elsewhere. That directory keeps its name across upgrades, unlike the versioned directory holding the binary itself, so it is the path to put on your PATH or in a script. Adding it to PATH is a manual step; the installer does not modify PATH for you.

Name collision

On Linux, moreutils provides an unrelated ts (a timestamp filter). If you use both, alias one of them on your PATH.

Signing In ​

Sign in once, naming the server, and every later command goes to it:

bash
ts login --server=https://turbo.example.net

ts login opens the server's sign-in page in your browser. On a machine with no browser, or over SSH, it prints a code to enter on another device instead; --device-code asks for the code anywhere. Signing in to a server when no default is set makes it the default. Once a default is set it stays, and ts login says how to change it with ts config --server=<url>.

Sign-ins are kept per server, so several servers can stay signed in at once. ts logout signs out of one; ts logout --revoke also ends the session on the server.

A script or CI job authenticates as a client you register with ts client, rather than as a person. Set TSCLIENTID and TSCLIENTSECRET, and each command exchanges them for a fresh token, with nothing stored.

Administration commands require a Server Administrator: an account in the built-in Administrators group, directly or through a nested group.

Pointing at a Server ​

Override the default server for one command with the global --server flag, or for a whole script with the TSSERVER environment variable. Precedence is flag, then environment variable, then the stored default. --server takes a URL, or the host name of a server you signed in to.

bash
ts --server=staging.example.net workspaces

Administering the Local Machine ​

On the server itself, --local administers the install over loopback with no sign-in at all:

bash
ts --local status

Authorization here is file permissions rather than an account: ts reads a service credential that only root or an Administrator can read, and exchanges it for a short-lived token. Run it elevated, or it will tell you it cannot read the credential. The audit log records the operating-system account and machine you ran it as.

This is the way to administer a server whose sign-in you have broken — a bad authentication setting, an identity provider that is down. ts identity-source can take a broken provider off the sign-in page from here, and ts certificate can fix the HTTPS setup browsers refuse. A few commands need the service token rather than a person's sign-in; their pages say so. ts release runs only on the server, with or without --local.

Environment Variables ​

VariableEffect
TSSERVERThe server to target, between --server and the stored default.
TSCLIENTID, TSCLIENTSECRETAuthenticate every command as this registered client. Both are required.
TSACCESSTOKENAn access token to send instead of any stored sign-in or client.
TSCONFIGDIRThe directory holding the settings and sign-ins, instead of the default.

TSACCESSTOKEN takes precedence over TSCLIENTID, which takes precedence over a stored sign-in. --local uses none of them.

Output ​

Every command prints a readable table or summary by default, and structured JSON on request:

bash
ts workspaces                  # table
ts workspaces --csv            # tab-separated, nothing truncated
ts workspaces --no-trunc       # full-width columns
ts workspaces --format=json    # one JSON result envelope

The JSON envelope is stable and safe to parse:

json
[{
  "name": "workspaces",
  "arguments": ["workspaces", "--format", "json"],
  "result": { "exitCode": 0, "workspaces": [ { "id": "acme", "name": "Acme" } ] },
  "messages": ["..."]
}]

--format=json-stream emits one JSON event per line instead, for long-running commands.

Global Options ​

FlagDescriptionDefault/ValuesNotes
--serverTarget server for this invocation.URL, or the host of a server you signed in toOverrides the stored default and TSSERVER. On ts config it names the default to store.
--localAdminister the install on this machine over loopback, with no sign-in.Requires an account that can read the service credential — root or an Administrator. Wins over --server.
--formatOutput format.Default table; json, json-streamAnything else is an error.
--wait-after-exitWait for a key press before exiting.For double-click launches on Windows.
--wait-after-errorWait for a key press only on failure.

Commands ​

Run ts help for the list, or ts help <command> for one command's usage and options. A page covering a plural list command and its singular counterpart is listed once, under the singular name.

Session ​

CommandPurpose
loginSign in in a browser, with a code, or as a registered client.
logoutSign out of a server, and optionally end the session there.
configShow or set the default server.
statusShow the targeted server's health and its Portal, API, and Hub addresses.
versionShow the version of ts.
helpList the commands, or show one command's usage.

Identity ​

CommandPurpose
userShow, create, disable, unlock, delete, or restore an account.
groupShow and manage groups, their members, and the groups nested in them.
identity-sourceShow and manage where accounts come from, and move accounts between sources.
clientRegister a client, rotate its secret, or revoke it.
deviceShow, disable, enable, or remove a computer that signs in as itself.
device-keyRevoke a person's sign-in key.
locationShow and manage named locations, the address ranges and countries an app's access can be limited to.
ip-countriesImport IP-to-country data, or look up the country of an address.

Workspaces ​

CommandPurpose
workspaceShow and manage a workspace and who has permission on it.
appShow and manage a workspace's apps, their licensing, and seat reservations.
channelShow and manage a channel and who can see it.
linkShow and manage a workspace link.
notificationShow and manage notifications and who sees them.
shareShow or revoke a share link.

Policy and Network ​

CommandPurpose
policyShow or replace the launch policy, or fetch its schema.
network-ruleShow and manage the network allow-list's access rules.
destination-classShow and manage the named host sets that network access rules refer to.

Infrastructure ​

CommandPurpose
serverShow and set a server's settings, hostname, and tags; stop, decommission, or delete it; act on its Application Server.
certificateShow or change how a server's Gateway serves HTTPS.
join-linkIssue the link a new server joins the cluster with.
logsShow servers' logs, and archive, download, or delete their log files.
siteShow and manage a site.
proxyShow and manage a proxy.
routing-ruleShow and manage a proxy routing rule.
fleetGroup application servers into fleets.
sessionShow, terminate, or diagnose one of your sessions.
runnerShow or remove a runner, or show a cloud runner's Remote Desktop credentials.

Storage ​

CommandPurpose
storage-providerShow and manage a cloud storage provider.
storage-connectionShow and manage storage connections and who can use them.
storage-scopeShow and manage a storage scope.

Hub ​

CommandPurpose
repoList, inspect, and remove repositories on this server's hub.
importCopy repositories from an upstream server and watch the runs.

Releases ​

CommandPurpose
releaseManage the Turbo Client, Turbo Update Service, and Turbo Server releases this server offers, and how its channels get them. Runs on the server itself.
publisherRegister a CI workflow that publishes releases without a credential.

AI ​

The AI commands sit under an ai namespace, because tool, endpoint, connector, and skill are generic nouns on their own — a bare ts ai lists what is there.

CommandPurpose
ai endpointShow, create, update, or delete an AI model endpoint.
ai toolShow, update, or delete an AI tool.
ai connectorShow, update, or delete an MCP connector.
ai skillEnable or disable a stored skill.
ai transcriptList AI calls, or read one call's prompt and response.
ai usageShow AI usage and token totals.

System ​

CommandPurpose
settingsGet and set global server settings.
auditQuery the operator audit log.
licenseShow or apply the server license.
usageShow usage reporting.
reportExport a built-in admin report as CSV or PDF.
signing-keyList and rotate the token signing keys.

Command Shape ​

Commands follow the same two patterns throughout.

Plural lists, singular acts. ts workspaces lists them; ts workspace acme shows one. On a singular command the first word is an action when it names one, and the target otherwise, so ts workspace acme and ts workspace delete acme both read naturally. print is the default action.

Some resources are edited as JSON. Sites, proxies, routing rules, network rules, destination classes, apps, channels, links, storage providers and scopes carry more configuration than a flag list can express, so they are read and written as documents:

bash
ts site 8f14e45f-ceea-467a-9a1f-6b3f0c1e77aa > site.json
# edit site.json
ts site set 8f14e45f-ceea-467a-9a1f-6b3f0c1e77aa --file=site.json

For a single field, reach for the accessor instead of a round trip through a file:

bash
ts site 8f14e45f-ceea-467a-9a1f-6b3f0c1e77aa display-name    # read one field
ts site set 8f14e45f-ceea-467a-9a1f-6b3f0c1e77aa display-name "HQ"

Property names are kebab-case, and the value is typed from the field it replaces, so a number stays a number. A structured field — an object or an array — has no accessor form and is refused with a pointer at --file. Commands that are not edited as documents, such as ts server, ts settings and ts identity-source, take one property at a time in the same way.

Do not add --format=json to the read half

--format=json wraps output in the result envelope, so the file you capture is an envelope rather than the document set expects. Redirect the default output, as above. The round trip also works only for set; creating a resource with new needs a document you write yourself, not one produced by print.

Destructive commands ask for confirmation. Pass --force (or -f) to skip the prompt; when there is no terminal, --force is required rather than assumed.

Exit Codes ​

CodeMeaning
0Success
-1The command failed, or the server refused it
-2The arguments could not be parsed
-3The server could not be reached
-4Not signed in, or the session ended
-5Signed in, but not permitted
-6The named resource does not exist
9009No such command

Exit codes on Linux and macOS

The shell reports an exit code as an unsigned byte, so -4 appears as 252 in $?. Scripts that need the exact value should read result.exitCode from --format=json.