workspace logout
workspace logout deletes the server URL, API Key, and user information from the CLI login status file. It does not request a server, nor does it delete remote workflow or local project files.
Command Format
pnpm exec workflow-code workspace logout
Parameter
| Parameter | Description |
|---|---|
| None | The command does not read positional parameters. |
Behavior
| Steps | Description |
|---|---|
| Locate Configuration Directory | Use WORKFLOW_CLI_AUTH_DIR or the system default directory. |
| Clean Configuration | Delete workflow-auth.json. |
| Output status | Output { loggedIn: false }. |
Output
| Situation | Output |
|---|---|
| Success | { errCode: 0, errMessage: "", data: { loggedIn: false } } |
| File write failed | Output error message with exit code 1. |
Example
pnpm exec workflow-code workspace logout
pnpm exec workflow-code workspace status
Precautions
| Scene | Description |
|---|---|
WORKFLOW_SERVER_ADMIN_KEY set | The environment variables are still read by subsequent commands. |
| Need to switch accounts completely | Clean up the shell environment variables and the CLI login state at the same time. |