Command reference Β· Cursor CLI
/logout
Signs out of the current Cursor account.
/logout signs you out of the currently logged-in account in the Cursor CLI. According to the reference table, the short description is "Sign out from Cursor"; the separate parameter documentation for the corresponding CLI subcommand (agent logout, callable outside the interactive session) specifies this as "Sign out and clear stored authentication" β the command thus also removes the locally stored credentials, not just the active session.
After /logout you're no longer signed in; the next time you use the CLI, you need to sign in again before you can make requests to models.
This makes /logout useful when you want to switch accounts or leave a shared computer clean β the stored authentication doesn't persist afterward.
π THE SAME TASK (βLOG OUT/LOG INβ) ON OTHER PLATFORMS
β WHEN TO USE IT?
Remove the account on a shared computer
/logout β before switching to a different Cursor account, so no stored authentication remains
Sign out cleanly before restarting with a different account or API key
/logout, before setting up the CLI again with a different account
β WHEN NOT TO?
You just want to end the session briefly, not sign out of the account
/logout deletes the stored login; afterward a new login process is required.
Better: Use /quit or /exit to just end the session
SOURCES
- Cursor Docs β Slash Commands β cursor.com
MORE COMMANDS Β· Cursor CLI