Skip to main content

workspace status

workspace status reads the CLI login state file workflow-auth.json and reports whether a server URL, API Key, user, and expiration time are saved, plus an effective block naming the server the command would really talk to with these arguments, and where that value came from. It does not request SteamHarness Server, and therefore cannot prove that API Key is still valid.

The saved login and the effective target can be different servers. The order is --server / --token → the STEAMHARNESS_SERVER_URL / STEAMHARNESS_SERVER_ADMIN_KEY environment variables → the saved login → the built-in default: a command-line flag overrides the environment, and the environment overrides the file. A run or the built-in terminal started by Studio injects its own session, so steamharness there talks to the server the Studio is signed in to, not to whatever login that file holds. To answer "could this upload go to the wrong server", read effective, not serverUrl.

Command Format​

pnpm exec steamharness workspace status

Parameter​

ParameterDescription
NoneThe command does not read positional parameters.

Output field​

FieldDescription
loggedInCLI When both a non-empty server URL and API Key are present in the login state, it is true.
serverUrlCLI The server URL saved in the login state.
userThe user summary obtained from the most recent device flow login.
expiresAtAPI Key expiration time.
expiringSoonIt is true when less than 3 days remain until expiration.
sourceLogin source, currently device_flow or manual.
effective.serverUrlThe server URL this call would use.
effective.serverSourceWhere that server URL came from: env, flag, file, or default.
effective.tokenSourceWhere the token for this call came from: env, flag, file, or none.

Example output​

{
"errCode": 0,
"errMessage": "",
"data": {
"loggedIn": true,
"serverUrl": "http://localhost:7126",
"user": {
"userId": "user-1",
"email": "user@example.com",
"displayName": "Normal User"
},
"expiresAt": "2026-07-01T00:00:00.000Z",
"expiringSoon": false,
"source": "device_flow",
"effective": {
"serverUrl": "https://server-alpha.example.com",
"serverSource": "env",
"tokenSource": "env"
}
}
}

Example​

pnpm exec steamharness workspace status

Precautions​

SceneDescription
Server availability needs to be verified.Use health.
Need to verify that the token is availableUse login to re-authenticate, or execute a command that requires authentication.
Need to know which server a command would useRead effective; serverUrl only describes the saved login, which an environment variable or a command-line flag may already override.