Configuration

The Teenode CLI stores configuration automatically. Learn how to manage and customize it.

Config File Location

Configuration is stored at:

~/.teenode/config.json

Config File Format

{
  "apiUrl": "https://api.teenode.com",
  "apiKey": "your-api-key-here",
  "email": "[email protected]",
  "userId": "user_123",
  "currentTeamId": "team_abc123",
  "defaultRegion": "us-east"
}
Never share or commit your config file to version control. It contains your API key!

Environment Variables

VariableDefaultDescription
TEENODE_API_URLhttps://api.teenode.comAPI base URL (useful for testing/staging)
TEENODE_MOCKfalseEnable mock mode (no API calls required)
TEENODE_HOME~/.teenodeConfig directory location

Switching Between Environments

Local Development

export TEENODE_API_URL=http://localhost:3001
teenode auth login

Staging Environment

export TEENODE_API_URL=https://staging-api.teenode.com
teenode project list

Production (Default)

unset TEENODE_API_URL
teenode project list

Mock Mode for Testing

Mock mode allows you to test CLI commands without making API calls. Useful for development, testing, and CI/CD pipelines.

# Enable mock mode
export TEENODE_MOCK=true

# No need to run API server
teenode auth login --email [email protected] --password test123

# Test commands
teenode team list
teenode project create --name test-project --type GIT_DEPLOY --region us-east
teenode vm create proj_123 --cpu-cores 4 --ram-mb 4096

# Disable mock mode
unset TEENODE_MOCK

Debug Mode

Enable debug output to see detailed information about CLI operations:

DEBUG=teenode:* teenode project list

Or for more verbose output:

DEBUG=* teenode project list

Setting Default Region

The CLI automatically saves your preferred region. Create a project in a different region and the CLI will remember it for future operations.

To view your current default settings:

teenode auth status

Clearing Configuration

To reset all configuration and log out:

teenode auth logout

To completely remove all CLI data:

rm -rf ~/.teenode
Removing ~/.teenode will delete your stored credentials and configuration.

Troubleshooting Config Issues

Config File Corrupted

If your config file becomes corrupted, you can reset it:

rm ~/.teenode/config.json
teenode auth login

Wrong API URL

Check your current configuration:

cat ~/.teenode/config.json

Reset to production:

unset TEENODE_API_URL

Permissions Issues

If you get permission errors, fix the permissions:

chmod 700 ~/.teenode
chmod 600 ~/.teenode/config.json
    Configuration - Teenode CLI Documentation