Configuration
The Teenode CLI stores configuration automatically. Learn how to manage and customize it.
Config File Location
Configuration is stored at:
~/.teenode/config.jsonConfig 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
| Variable | Default | Description |
|---|---|---|
TEENODE_API_URL | https://api.teenode.com | API base URL (useful for testing/staging) |
TEENODE_MOCK | false | Enable mock mode (no API calls required) |
TEENODE_HOME | ~/.teenode | Config directory location |
Switching Between Environments
Local Development
export TEENODE_API_URL=http://localhost:3001
teenode auth loginStaging Environment
export TEENODE_API_URL=https://staging-api.teenode.com
teenode project listProduction (Default)
unset TEENODE_API_URL
teenode project listMock 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_MOCKDebug Mode
Enable debug output to see detailed information about CLI operations:
DEBUG=teenode:* teenode project listOr for more verbose output:
DEBUG=* teenode project listSetting 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 statusClearing Configuration
To reset all configuration and log out:
teenode auth logoutTo completely remove all CLI data:
rm -rf ~/.teenodeRemoving
~/.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 loginWrong API URL
Check your current configuration:
cat ~/.teenode/config.jsonReset to production:
unset TEENODE_API_URLPermissions Issues
If you get permission errors, fix the permissions:
chmod 700 ~/.teenode
chmod 600 ~/.teenode/config.json