Skip to main content

workspace status

workspace status Reads CLI the login state file workflow-auth.json, and outputs whether the server URL, API Key, user information, and expiration time are currently saved. It does not request Workflow Server, and therefore cannot prove that API Key is still valid.

Command Format

pnpm exec workflow-code 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.

Example output

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

Example

pnpm exec workflow-code 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.