Skip to content

setup

The interactive setup guide walks you through initial NDCLI configuration.

Terminal window
ndcli setup

The setup guide provides a guided experience for configuring NDCLI, especially useful for first-time users. It handles:

  1. Authentication - Login and credential storage setup
  2. Organization - Create a new organization or select an existing one
  3. Preferences - Configure default output format

The setup guide runs automatically when:

  • You run NDCLI for the first time (no config file exists)
  • You run any command that requires configuration

You can also run it manually at any time to reconfigure settings.

  • Initiates OAuth2 device authorization flow
  • Opens browser for authentication
  • Stores tokens securely in system keyring (or file fallback)

The guide offers three options:

  1. Create a new organization - For users starting fresh
  2. Select an existing organization - For users joining an existing org
  3. Accept a pending invitation - For users who received an invite

Choose your preferred default output format:

FormatBest For
detailedInteractive terminal use (default)
tableViewing lists and summaries
simpleQuick, compact output
jsonScripting and automation
Terminal window
ndcli setup
ndcli config show
ndcli auth show

You can run ndcli setup at any time to:

  • Re-authenticate with a different account
  • Change your default organization
  • Update output preferences

The guide preserves existing settings where possible and only updates what you change.

After setup completes, the following files are created:

PlatformConfig FileAuth Storage
macOS~/Library/Application Support/ndcli/config.yamlKeychain
Linux~/.config/ndcli/config.yamlSecret Service
Windows%APPDATA%\ndcli\config.yamlCredential Manager

If you prefer to configure NDCLI manually instead of using the guide:

Terminal window
ndcli auth login
ndcli config set org my-organization
ndcli config set output detailed

If the browser doesn’t open automatically during authentication:

  1. Copy the URL displayed in the terminal
  2. Paste it into your browser manually
  3. Complete authentication
  4. Return to the terminal

If the system keyring is unavailable, NDCLI falls back to file-based token storage at:

  • ~/.config/ndcli/auth.json (Linux)
  • ~/Library/Application Support/ndcli/auth.json (macOS)

If your organization isn’t listed:

  1. Ask an administrator to send you an invitation
  2. Accept the invitation: ndcli org invite accept org-name
  3. Re-run setup to select the organization