Neutrino Docs
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 logout

Output when credentials existed and were cleared:

✔ Logged out successfully

When not logged in

nno logout

Output:

ℹ Not currently logged in

Logout then re-authenticate (CI rotation pattern)

nno logout
nno login --token "$NEW_NNO_API_TOKEN"
nno whoami

Notes

  • The command never prompts for confirmation.
  • It does not delete the ~/.nno/ directory; only the contents of credentials.json are 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 --revoke flag to invalidate the server-side session once interactive login ships.
  • If you suspect a credential leak, follow up nno logout by 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.

PathAction
~/.nno/credentials.jsonOverwritten 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

CodeMeaning
0Always — the command does not surface failures via the exit code today.

Error Scenarios

ScenarioBehaviour
No credential file presentPrints "Not currently logged in" and exits 0
Credential file unwritableUnderlying 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.

On this page