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
| Parameter | Description |
|---|---|
| None | The command does not read positional parameters. |
Output field
| Field | Description |
|---|---|
loggedIn | CLI When both a non-empty server URL and API Key are present in the login state, it is true. |
serverUrl | CLI The server URL saved in the login state. |
user | The user summary obtained from the most recent device flow login. |
expiresAt | API Key expiration time. |
expiringSoon | It is true when less than 3 days remain until expiration. |
source | Login 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
| Scene | Description |
|---|---|
| Server availability needs to be verified. | Use health. |
| Need to verify that the token is available | Use login to re-authenticate, or execute a command that requires authentication. |