Skip to content

Configuration Management

Use pb config commands to manage CLI configuration.

Supported keys:

KeyDescriptionDefault
api_keyAPI key for authentication(empty)
network_timeoutRequest timeout in seconds30
device_defaultDefault device ID(empty)

Show Configuration

pb config show

Display the current effective configuration. Sensitive values (API keys) are masked.

Example:

bash
pb config show
text
api_key         = pb_sk_xx...xxxx
network_timeout = 30
device_default  =

Environment:
  PHONEBASE_API_KEY  = (not set)
  PHONEBASE_API_URL  = (not set)
  PHONEBASE_LANG     = (not set)
json
{
  "code": 200,
  "data": {
    "values": {
      "api_key": "pb_sk_xx...xxxx",
      "network_timeout": 30,
      "device_default": ""
    },
    "env": {
      "PHONEBASE_API_KEY": null,
      "PHONEBASE_API_URL": null,
      "PHONEBASE_LANG": null
    }
  },
  "msg": "OK"
}

Get Configuration

pb config get <key>

Get the value of a specific configuration key.

ParameterTypeRequiredDescription
keystringYesConfiguration key (api_key, network_timeout, device_default)

Example:

bash
pb config get api_key
text
api_key = pb_sk_xx...xxxx
json
{
  "code": 200,
  "data": { "key": "api_key", "value": "pb_sk_xx...xxxx" },
  "msg": "OK"
}

Set Configuration

pb config set <key> <value>

Set a configuration value.

ParameterTypeRequiredDescription
keystringYesConfiguration key
valuestringYesNew value

Example:

bash
pb config set api_key pb_sk_xxxxxxxxxxxxxxxxxxxx
text
✓ api_key = pb_sk_xx...xxxx
json
{
  "code": 200,
  "data": null,
  "msg": "api_key = pb_sk_xx...xxxx"
}

Unset Configuration

pb config unset <key>

Remove a configuration key and restore its default value.

ParameterTypeRequiredDescription
keystringYesConfiguration key to remove

Example:

bash
pb config unset device_default
text
✓ Unset: device_default
json
{
  "code": 200,
  "data": null,
  "msg": "Unset: device_default"
}

List Configuration

pb config list

List all configuration values currently set.

Example:

bash
pb config list
text
api_key         = pb_sk_xx...xxxx
network_timeout = 30
json
{
  "code": 200,
  "data": {
    "api_key": "pb_sk_xx...xxxx",
    "network_timeout": 30
  },
  "msg": "OK"
}