Command reference ยท Cursor CLI
agent status | agent whoami
Shows the current authentication status plus account and endpoint info.
agent status (alias: agent whoami) shows whether and with which account the CLI is signed in, including the endpoint configuration. --format json returns the output as machine-readable JSON instead of the default text format.
โ WHEN TO USE IT?
Check whether the CLI is signed in before a script run
agent status --format json
โ WHEN NOT TO?
You want to switch accounts, not just look one up
agent status changes nothing, it only shows the current state.
Better: Use agent logout followed by agent login
SOURCES
- Cursor Docs โ CLI Reference: Parameters โ cursor.com