API ReferenceCLI Reference
logout
Sign out from the NNO platform
Usage
nno logout [options]Behaviour
nno logout removes the locally stored NNO credentials by overwriting ~/.nno/credentials.json with an empty payload via clearCredentials(). The command is purely local — it does not call IAM to revoke the session server-side.
Examples
Standard logout
nno logoutOutput when credentials existed and were cleared:
✔ Logged out successfullyWhen not logged in
nno logoutOutput:
ℹ Not currently logged inLogout then re-authenticate (CI rotation pattern)
nno logout
nno login --token "$NEW_NNO_API_TOKEN"
nno whoamiNotes
- The command never prompts for confirmation.
- It does not delete the
~/.nno/directory; only the contents ofcredentials.jsonare cleared. - It does not contact the IAM service. Sessions remain valid server-side until they expire naturally or are revoked through the console. A future revision may add a
--revokeflag to invalidate the server-side session once interactive login ships. - If you suspect a credential leak, follow up
nno logoutby revoking the session through the console "Active sessions" page so the server-side token is invalidated immediately.
Credential File
Cleared by nno logout. The parent ~/.nno/ directory is preserved.
| Path | Action |
|---|---|
~/.nno/credentials.json | Overwritten with empty payload |
~/.nno/ | Left intact |
Source of truth: packages/cli/src/utils/credentials.ts.
Environment Variables
None. nno logout requires no environment variables and honours no overrides — it operates on the default credential path only.
Exit Codes
| Code | Meaning |
|---|---|
0 | Always — the command does not surface failures via the exit code today. |
Error Scenarios
| Scenario | Behaviour |
|---|---|
| No credential file present | Prints "Not currently logged in" and exits 0 |
| Credential file unwritable | Underlying fs error bubbles to the console; exit code undefined in current build |
See Also
nno login— authenticate and write the credential file.nno whoami— show the currently authenticated user.