Authentication Setup

Configure secure authentication for Merlin CLI to access enterprise features, usage analytics, and premium analysis capabilities.

Quick Setup Guide

# Install Merlin CLI
pipx install merlin-cli

# Authenticate with your account
merlin auth login

# Verify authentication status
merlin auth status

Enterprise Security

Merlin CLI uses enterprise-grade JWT authentication with AES-256 encryption for secure credential storage. Your tokens are never transmitted in plaintext.

Step-by-Step Setup

1

Create Account

Sign up for a Merlin account to access enterprise features

Visit merlincode.ai to create your account
2

Get JWT Token

Generate your authentication token from the dashboard

Navigate to Settings → API Tokens → Generate New Token
3

Authenticate CLI

Use the token to authenticate your CLI installation

Run: merlin auth login --token YOUR_TOKEN
4

Verify Setup

Confirm authentication and check your subscription status

Run: merlin auth status && merlin auth subscription

Security Features

Encrypted Storage

JWT tokens are encrypted at rest using AES-256 encryption

  • Local credential encryption
  • Secure key derivation
  • No plaintext storage

Automatic Refresh

Tokens are automatically refreshed to maintain continuous access

  • Background token refresh
  • Session management
  • Seamless authentication

Audit Logging

All authentication events are logged for security monitoring

  • Login/logout tracking
  • Token usage logs
  • Security event alerts

Troubleshooting

Token Not Working

If your JWT token is rejected:

  • • Verify the token hasn't expired
  • • Check for extra whitespace or line breaks
  • • Ensure you have an active subscription
  • • Try regenerating the token from the dashboard

Authentication Failed

If authentication keeps failing:

$ merlin auth logout && merlin auth login --token NEW_TOKEN

This clears cached credentials and forces a fresh authentication.

CI/CD Setup

For continuous integration environments:

  • • Store JWT token as a secure environment variable
  • • Use MERLIN_JWT environment variable
  • • Test authentication with merlin auth status --ci

What's Next?

Now that you're authenticated, explore the full power of Merlin CLI's enterprise features.