Overview

Authenticate with the NimbleTools platform using Clerk OAuth. This command opens your browser to complete the OAuth flow and stores authentication credentials locally.

Syntax

ntcli auth login [options]

Options

-p, --port
number
Port for local callback server. Default: 41247
-t, --timeout
number
Authentication timeout in milliseconds. Default: 60000 (60 seconds)
-v, --verbose
boolean
Enable verbose output to show detailed authentication flow

Examples

Basic Authentication

ntcli auth login
This will:
  1. Start a local callback server on the default port (41247)
  2. Open your default browser to the NimbleTools OAuth page
  3. Wait for you to complete authentication
  4. Store the credentials locally for future use

Custom Port

ntcli auth login --port 3000
Use a custom port for the OAuth callback server. Useful if the default port is already in use.

Extended Timeout

ntcli auth login --timeout 120000
Extend the authentication timeout to 2 minutes (120,000 milliseconds) for slower authentication flows.

Verbose Output

ntcli auth login --verbose
Show detailed information about the authentication process, including:
  • Callback server startup
  • OAuth URLs and parameters
  • Token exchange details
ntcli auth login

Authentication Flow

1

Start Local Server

ntcli starts a local HTTP server to receive the OAuth callback
2

Open Browser

Your default browser opens to the NimbleTools OAuth page
3

Complete OAuth

Sign in with your existing account or create a new one

OAuth Provider Details

ntcli uses Clerk as the OAuth provider, supporting:
  • Email/Password authentication
  • Social logins (Google, GitHub, etc.)
  • Magic links for passwordless authentication
  • Multi-factor authentication (MFA)

Credential Storage

Authentication credentials are stored securely:
Stored in the macOS Keychain using the keytar library

Troubleshooting

Environment Variables

The following environment variables affect authentication:
VariableDescriptionDefault
CLERK_OAUTH_CLIENT_IDOAuth client IDSet automatically
CLERK_DOMAINClerk domainSet automatically
NTCLI_DEFAULT_PORTDefault callback port41247

Security Considerations

  • Local callback server: Only runs during authentication and shuts down immediately after
  • HTTPS enforcement: All OAuth flows use HTTPS for security
  • Automatic cleanup: Failed authentication attempts clean up temporary servers

Next Steps

After successful authentication:
  1. Check status: ntcli auth status
  2. Create workspace: ntcli workspace create my-project
  3. Browse servers: ntcli registry list
  4. Deploy server: ntcli server deploy nationalparks-mcp