Configuration Management
Use pb config commands to manage CLI configuration.
Supported keys:
| Key | Description | Default |
|---|---|---|
api_key | API key for authentication | (empty) |
network_timeout | Request timeout in seconds | 30 |
device_default | Default device ID | (empty) |
Show Configuration
pb config show
Display the current effective configuration. Sensitive values (API keys) are masked.
Example:
bash
pb config showtext
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Configuration key (api_key, network_timeout, device_default) |
Example:
bash
pb config get api_keytext
api_key = pb_sk_xx...xxxxjson
{
"code": 200,
"data": { "key": "api_key", "value": "pb_sk_xx...xxxx" },
"msg": "OK"
}Set Configuration
pb config set <key> <value>
Set a configuration value.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Configuration key |
value | string | Yes | New value |
Example:
bash
pb config set api_key pb_sk_xxxxxxxxxxxxxxxxxxxxtext
✓ api_key = pb_sk_xx...xxxxjson
{
"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.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Configuration key to remove |
Example:
bash
pb config unset device_defaulttext
✓ Unset: device_defaultjson
{
"code": 200,
"data": null,
"msg": "Unset: device_default"
}List Configuration
pb config list
List all configuration values currently set.
Example:
bash
pb config listtext
api_key = pb_sk_xx...xxxx
network_timeout = 30json
{
"code": 200,
"data": {
"api_key": "pb_sk_xx...xxxx",
"network_timeout": 30
},
"msg": "OK"
}