twilio:config command enables you to list and set configuration values that apply regardless of your active profile.
To see your current configuration including Edge, profiles, and active profile, use:
If a configuration value is currently determined by an environment variable, such as
TWILIO_EDGE, it will have
[env] appended to its value. For example, this could look like:
_10$ export TWILIO_EDGE=sydney_10$ twilio config:list_10Config Name Value_10edge "sydney[env]"_10# remaining config values...
All configurations are stored in
To set a configuration value, such as setting your target Edge to
sydney without an environment variable, use:
_10twilio config:set --edge=sydney
To configure the Twilio CLI to reject any commands that do not include a
profile flag, use:
_18$ twilio config:set --require-profile-input_18_18# ❌ This is doomed to fail since no profile is provided_18$ twilio phone-numbers:list_18» Error: Missing required flag:_18-p, --profile PROFILE Shorthand identifier for your profile. To disable this check run:_18_18twilio config:set --no-require-profile-input_18_18# ✅ profile is defined, request accepted_18$ twilio phone-numbers:list --profile=dev_18SID Phone Number Friendly Name_18PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +1646887XXXX Congress hotline_18_18# ✅ you can also use shorthand for the profile flag_18$ twilio phone-numbers:list -p dev_18SID Phone Number Friendly Name_18PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +1646887XXXX Congress hotline
Run the following command and confirm to revert this setting:
_10$ twilio config:set --no-require-profile-input_10? Overwrite existing requireProfileInput value? Yes
To remove the value of a configuration that has previously been set, set the value to an empty string. You will be prompted to confirm that you want to remove that value from your configuration.
This is useful in case you are temporarily setting the Edge to a non-US location for some work, and want to revert back to the US Edge afterwards. As an example:
_10$ twilio config:set --edge=_10? Remove existing edge value? Yes
If no profile is active after setting
twilio profiles:use PROFILE_ID to set an active profile for subsequent CLI commands.
The Twilio CLI will attempt to load configuration values in the following order of priority: