Skip to main content

Overview

Clear all stored authentication credentials from your system. This includes your NimbleTools JWT token and any cached workspace tokens.

Syntax

ntcli auth logout

Examples

Basic Logout

ntcli auth logout
This will:
  1. Remove all stored authentication tokens
  2. Clear workspace token cache
  3. Confirm successful logout
ntcli auth logout

What Gets Cleared

When you run ntcli auth logout, the following credentials are removed:

NimbleTools JWT

Your main authentication token used for platform access

Workspace Tokens

All cached workspace-specific access tokens

OAuth Tokens

Clerk OAuth refresh tokens and session data

User Profile

Cached user profile information

Credential Storage Locations

Credentials are removed from secure system storage:
  • macOS
  • Linux
  • Windows
macOS Keychain
  • Location: ~/Library/Keychains/login.keychain
  • Service: ntcli-auth
  • Items: JWT tokens, OAuth tokens, user data

Security Benefits

Regular logout provides several security benefits:
  • Token Invalidation: Prevents use of cached tokens if device is compromised
  • Session Management: Clears browser-based OAuth sessions
  • Multi-Device Security: Prevents token reuse across different machines
  • Compliance: Meets security requirements for shared or managed systems
Logout only clears local credentials. Your account and workspaces remain active on the NimbleTools platform.

When to Use Logout

When you need to authenticate with a different NimbleTools account:
ntcli auth logout
ntcli auth login  # Login with different account
On shared or public computers:
# After completing your work
ntcli auth logout
When experiencing authentication issues:
ntcli auth logout
ntcli auth login  # Fresh authentication
When workspace tokens are corrupted or expired:
ntcli auth logout
ntcli auth login
ntcli token refresh

Verification

After logout, verify that credentials were cleared:
ntcli auth status
Expected output:
❌ Not authenticated
Please run 'ntcli auth login' to authenticate

Re-authentication

To authenticate again after logout:
1

Login

ntcli auth login
2

Verify Status

ntcli auth status
3

Refresh Workspace Tokens

ntcli token refresh

Logout vs Token Management

Understanding the difference between logout and token operations:
CommandEffectUse Case
ntcli auth logoutClears all credentialsComplete logout, account switching
ntcli token refreshRefreshes workspace tokens onlyToken expired, need new permissions
ntcli auth statusShows current statusCheck authentication state

Error Handling

Message: “No credentials found to clear”Action: This is normal - you’re already logged out

Next Steps

After logout, you’ll need to re-authenticate to use ntcli:
  1. Login: ntcli auth login
  2. Select workspace: ntcli workspace select or ntcli workspace create
  3. Refresh tokens: `ntcli token refresh
  4. Resume work: Continue with your MCP server management
I