Skip to main content
Nile CLI supports two primary methods of authentication:
  1. Browser-based OAuth authentication (Recommended)
  2. API key authentication

Browser-based Authentication

Browser-based authentication provides a secure and convenient way to connect to Nile. When you run the login command, the CLI will:
  1. Open your default browser
  2. Direct you to Nile’s authentication page
  3. After successful login, automatically configure your CLI
Browser Login

Authentication Flow

The following illustrate the browser-based authentication flow:
  1. CLI initiates auth flow
  2. Browser opens to Nile login
  3. User authenticates
  4. Token returned to CLI
  5. CLI stores credentials

Verifying Connection

After authentication, verify your connection:
Verify Connection

Session Management

Browser-based authentication creates a session that:
  • Remains valid for extended periods
  • Automatically refreshes when needed
  • Can be explicitly terminated
Session Management

API Key Authentication

For automated workflows or CI/CD environments, you can use API key authentication. API keys can be:
  • Used directly in commands
  • Stored in configuration
  • Set via environment variables

Using API Keys

API Key Examples

API Key Best Practices

API Key Security

Common Issues and Debugging

Authentication Failures

When authentication fails:
Auth Issues

Network Issues

When experiencing network problems:
Network Debug

Session Issues

When encountering session problems:
Session Issues

Environment Configuration

Configure your environment for different authentication methods:
Environment Setup

Workspace Selection

After authentication, select your workspace:
Workspace Selection
  • nile connect status - Check connection status
  • nile connect logout - End current session
  • nile config - Configure CLI settings
  • nile workspace list - List available workspaces