Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt Include
Amplify CLI
Amplify CLI
nopaneltrue

 

The AMPLIFY Amplify CLI config command manages configuration values.

Settings

NameTypeDefaultDescription
auth.clientId string"amplify-cli" The global client ID to use when authenticating. You can be logged into multiple different client IDs at the same time.
auth.serverHost string"localhost" The hostname the local web server should listen on and await the successful login browser redirect.
auth.serverPort number3000 The port number the local web server should listen on and await the successful login browser redirect. The value must be between 1024 and 65535.
auth.tokenRefreshThreshold number0 The number of seconds before the access token expires and should be refreshed. As long as the refresh token is not expired, a new access token can be retrieved. This setting is only useful if the access token is still valid, but almost expired and you need a valid access token for an operation in the near future. The value must be a non-negative integer.
auth.tokenStoreType string"secure" 

The type of store to persist the access token after authenticating.

Allowed values:

  • "auto" - Attempts to use the "secure" store, but falls back to "file" if secure store is unavailable.
  • "secure" - Encrypts the access token using a generated key which is stored in the system's keychain.
  • "file" - Encrypts the access token using the embedded key.
  • "memory" - Stores the access token in memory instead of on disk. The access tokens are lost when the process exits. This is intended for testing purposes only.
  • "null" - Disables all forms of token persistence and only returns the access token. Subsequent calls to login in the same process will force the authentication flow. This is intended for migration scripts and testing purposes only.
network.httpProxy string 

The proxy server URL. This proxy server is used for both HTTP and HTTPS outbound requests.

Info

If the proxy server uses a self-signed certificate, you must set the environment variable NODE_TLS_REJECT_UNAUTHORIZED=0.

Usage

Code Block
languagebash
amplify config [--json] <action> [<key>] [<value>]

Actions

  • get - Display a specific config setting
  • ls, list - Display all config settings
  • pop - Remove the last value in a list
  • push - Add a value to the end of a list
  • rmdelete  - Remove a config setting
  • set - Change a config setting
  • shift - Remove the first value in a list
  • unshift - Add a value to the beginning of a list

...

  • --json - Output the value as JSON

get

Returns a config setting.

Code Block
languagebash
amplify config get <key>

ls, list

Displays a list of all installed packages.

Code Block
languagebash
amplify config ls

amplify config list

pop

Removes a value from the end of a list.

Code Block
languagebash
amplify config pop <key>

rm, delete

Deletes a config setting.

Code Block
languagebash
amplify config rm <key>

amplify config delete <key>

push

Adds a value to the end of a list. If there is no existing value, a new list is created. If a non-list value exists, it is converted to a list and the new value is appended.

Code Block
languagebash
amplify config pop <key> <value>

set

Sets a config value. If a value already exists, the existing value is overwritten.

Code Block
languagebash
amplify config set <key> <value>

shift

Removes a value from the beginning of a list.

Code Block
languagebash
amplify config shift <key>

unshift

Adds a value to the beginning of a list. If there is no existing value, a new list is created. If a non-list value exists, it is converted to a list and the new value is prepended.

...