Skip to main content

Overview

Lua CLI requires authentication to access the platform and deploy skills. Authentication is done via API key stored securely in your system keychain.

Commands

configure

Set up authentication

key

Display stored key

logout

Remove credentials

lua auth configure

Set up API key authentication.
lua auth configure

Authentication Methods

Where Credentials are Stored

Credentials are stored securely in your system keychain:
KeychainStored in macOS Keychain with encryptionView in Keychain Access app:
  • Service: lua-cli
  • Account: Your email or user ID
Never commit API keys to version control or share them publicly!

lua auth key

Display your stored API key.
lua auth key

Security Confirmation

For security, you must confirm before displaying the key:
$ lua auth key
? This will display your API key. Are you sure you want to continue? Yes
🔑 Your API key:
lsk_abc123def456...
Only displays key after explicit confirmation to prevent accidental exposure.

Use Cases

  • Copying to another machine: Get key to set up elsewhere
  • CI/CD configuration: Copy key for automated deployments
  • Verification: Confirm which key is currently configured
  • Sharing with team: Share key with team members (use with caution)

lua auth logout

Delete stored API key from your system.
lua auth logout

Confirmation Required

$ lua auth logout
? Are you sure you want to delete your API key? This action cannot be undone. Yes
 API key deleted successfully.

What Happens

1

Key Removed

API key deleted from system keychain
2

CLI Access Lost

You’ll need to run lua auth configure to use CLI again
3

Key Still Valid

The key is NOT invalidated on the server - it just removes local copy
After logout, the key still works if used elsewhere. To fully revoke access, regenerate a new key.

Troubleshooting

Error: ❌ No API key found. Run lua auth configure first.Solution: Run lua auth configure to set up authentication
lua auth configure
Problem: Didn’t receive OTP emailSolutions:
  1. Check spam/junk folder
  2. Wait a few minutes (can take up to 5 min)
  3. Try again with lua auth configure
  4. Use API Key method instead
Error: ❌ Invalid OTP codeSolutions:
  • Double-check the code from email
  • OTP expires after 10 minutes
  • You have 3 attempts
  • Request new OTP by running command again
Error: ❌ API key validation failedSolutions:
  • Verify you copied the complete key
  • Check key hasn’t been revoked
  • Ensure no extra spaces
  • Generate new key via email method
Error: Permission denied accessing keychainSolution: Grant Terminal access to keychain:
  1. System Preferences → Security & Privacy
  2. Privacy → Automation
  3. Enable Terminal for Keychain Access
Error: libsecret not installedSolution: Install libsecret:
# Ubuntu/Debian
sudo apt-get install libsecret-1-dev

# Fedora/RHEL
sudo dnf install libsecret-devel

# Arch
sudo pacman -S libsecret

Best Practices

Recommended for individual developers:
  • Automatic key management
  • More secure than manual keys
  • Easy to set up
  • No key to remember
Never share or expose your API key:
  • Don’t commit to git
  • Don’t share in chat/email
  • Don’t log in console
  • Use logout when done on shared machines
For automated deployments:
  • Generate dedicated CI/CD key
  • Store as environment variable
  • Rotate regularly
  • Revoke when no longer needed
When using shared computers:
lua auth logout  # Before leaving

CI/CD Configuration

For automated deployments:
name: Deploy Skill
on: [push]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      
      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: '16'
      
      - name: Install Lua CLI
        run: npm install -g lua-cli
      
      - name: Configure Auth
        env:
          LUA_API_KEY: ${{ secrets.LUA_API_KEY }}
        run: |
          # Store key for CLI
          echo "$LUA_API_KEY" | lua auth configure --api-key
      
      - name: Deploy
        run: |
          lua push
          lua deploy
Add LUA_API_KEY to GitHub Secrets

Next Steps