Skip to main content

expanso-cli profile

expanso-cli profile​

Manage client connection profiles

Synopsis​

Manage named profiles for connecting to different Expanso endpoints.

Why Profiles?​

Expanso is a managed service - you can run it in Expanso Cloud or your own infrastructure. Profiles store connection details (endpoint, authentication, TLS settings) so you don't need to specify --endpoint and auth flags with every command.

Common Patterns:​

• Multiple environments: Save profiles for dev, staging, and production • Team collaboration: Share profile configs (without credentials) via dotfiles • Quick switching: Use 'profile select' to switch between endpoints instantly

Profile Storage:​

Profiles are stored as YAML files in ~/.expanso/cli-client/profiles/ Current profile selection is stored in ~/.expanso/cli-client/current-profile

WHAT'S STORED IN A PROFILE: • Endpoint URL (API server address) • Authentication credentials (tokens, certs) • TLS configuration • Request timeout settings

Examples​

# Save a new profile for production
expanso-cli profile save prod --endpoint api.expanso.io --token YOUR_TOKEN --select

# Save a development profile
expanso-cli profile save dev --endpoint dev.expanso.example.com --token DEV_TOKEN

# List all profiles
expanso-cli profile list

# Switch to a different profile
expanso-cli profile select dev

# Show current profile details
expanso-cli profile current

# View a specific profile
expanso-cli profile show prod

Options​

-h, --help help for profile

Options inherited from parent commands​

--api-key string API key for authentication (e.g., exp_ak_...). Env: EXPANSO_CLI_AUTH_API_KEY (preferred; flag values show in ps output)
-e, --endpoint string API endpoint URL
-k, --insecure Skip TLS certificate verification
-p, --profile string Profile to use for configuration
--timeout string Request timeout duration
-v, --verbose Enable verbose logging

SEE ALSO​