Save
expanso-cli profile save
Save a profile (create new or update existing)
Synopsis
Save a connection profile for an Expanso environment.
What Are Profiles?
Profiles store connection settings for different Expanso environments (production, staging, development, etc.). Each profile contains: • Expanso endpoint URL (control plane or edge node) • Authentication credentials (bearer token) • TLS configuration • Default timeout settings
Why Use Profiles?
Instead of specifying --endpoint and --token with every command, save a profile once and reference it by name. Switch between environments easily without re-entering credentials.
Profile Behavior:
• Save new profile: Creates profile with specified configuration • Update existing: Merges new settings with existing profile • Copy from existing: Use --from to copy another profile as starting point • Auto-select: Use --select flag to make this the active profile
Endpoint Convenience:
You can specify just the hostname and the CLI will automatically add the scheme (https://) and port (:443) if not provided: --endpoint api.expanso.io → https://api.expanso.io:443
Profiles Location:
Profiles are stored in ~/.expanso/cli-client/profiles/
expanso-cli profile save PROFILE_NAME [flags]
Examples
# Create a profile for production (scheme and port are auto-added)
expanso-cli profile save prod --endpoint api.expanso.io --token YOUR_TOKEN --select
# Create a profile for development environment
expanso-cli profile save dev --endpoint dev.expanso.example.com --token DEV_TOKEN
# Copy from existing profile
expanso-cli profile save staging --from prod --endpoint staging.expanso.example.com
# You can still use full URLs if needed
expanso-cli profile save custom --endpoint https://custom.expanso.example.com:8080
Options
--auth-token string API bearer authentication token
--description string Profile description
-e, --endpoint string API endpoint URL
--from string Copy settings from an existing profile
-h, --help help for save
-k, --insecure Skip TLS certificate verification
--select Set as current profile
--timeout string Request timeout duration
Options inherited from parent commands
-p, --profile string Profile to use for configuration
-v, --verbose Enable verbose logging
SEE ALSO
- expanso-cli profile - Manage client connection profiles