Skip to main content
Configure Grok CLI to use Nordlys’s Nordlys model for 60-90% cost savings while maintaining the same AI-powered command line experience.
Save 60-90% on AI development costs with advanced Nordlys model. Works as a drop-in replacement for Grok CLI’s API backend. The installer automatically configures your shell environment.

Get Your Nordlys API Key

Sign up here to create an account and generate your API key.

Quick Setup

Run Installer

curl -fsSL https://raw.githubusercontent.com/Nordlys-Labs/nordlys/main/scripts/installers/unix/grok-cli.sh | bash
The installer will automatically:
  • Install Grok CLI if not present
  • Configure Nordlys API settings
  • Add environment variables to your shell config

Verify Configuration

grok --version
grok "Hello, test Nordlys integration"

Start Using

Begin using Grok CLI with cost-optimized Nordlys model for all your AI tasks.

Alternative Setup Methods

export NORDLYS_API_KEY='your-api-key-here'
curl -fsSL https://raw.githubusercontent.com/Nordlys-Labs/nordlys/main/scripts/installers/unix/grok-cli.sh | bash
# The installer will automatically add the API key to your shell config

Advanced Configuration

The installer automatically handles environment variable setup for all major shells (bash, zsh, fish). Manual configuration is typically not needed.

Shell-Specific Configuration

# Nordlys AI model API Configuration
export NORDLYS_API_KEY="your-nordlys-api-key"
export NORDLYS_BASE_URL="https://api.nordlylabs.com/v1"

Troubleshooting

  • Ensure you have the required dependencies (Node.js, Python, etc.)
  • Check installation logs for specific error messages
  • Try the interactive installation method for better error handling
  • Verify your API key at nordlylabs.com/dashboard
  • Check that API key is properly set in ~/.grok/user-settings.json
  • Ensure environment variables are exported in your shell config:
    # Check if variables are set
    echo $NORDLYS_API_KEY
    echo $NORDLYS_BASE_URL
    
    # If not set, restart terminal or source your shell config
    source ~/.bashrc  # or ~/.zshrc for Zsh users
    

Next Steps


Was this page helpful? Contact us at [email protected] for feedback or assistance with your Grok CLI integration.