Manage user-level CLI defaults: app, auth profiles, output format, and integrations.
gpc config <subcommand> [options]Commands
| Command | Description |
|---|---|
config init | Create a configuration file |
config show | Display resolved configuration |
config set | Set a configuration value |
config path | Show configuration file path |
config init
Create the user configuration file at ~/.config/gpc/config.json (or the XDG-equivalent path). In interactive mode, prompts for common settings. To scaffold a project .gpcrc.json, use gpc init.
Synopsis
gpc config init [options]Options
--global is accepted as a compatibility no-op; user config is always global to the current user.
Example
Interactive init (prompts for app, output format, service account):
gpc config init? Default package name (e.g. com.example.app, blank to skip): com.example.myapp
? Default output format: table
? Service account JSON path (blank to skip): ./service-account-key.json
Configuration file created at: /Users/you/.config/gpc/config.json2
3
4
Non-interactive init:
gpc config init --no-interactiveCreates a minimal user configuration:
{}config show
Display the fully resolved configuration, including values from the config file, environment variables, and defaults.
Synopsis
gpc config showOptions
No command-specific options.
Example
gpc config show{
"app": "com.example.myapp",
"output": "table",
"auth": {
"serviceAccount": "./service-account-key.json"
},
"profile": "production",
"plugins": ["@gpc-cli/plugin-ci"]
}2
3
4
5
6
7
8
9
Output as YAML:
gpc config show --output yamlapp: com.example.myapp
output: table
auth:
serviceAccount: ./service-account-key.json
profile: production
plugins:
- "@gpc-cli/plugin-ci"2
3
4
5
6
7
config set
Set a value in the user configuration. Project .gpcrc.json files remain explicit, reviewable files; edit them directly or scaffold one with gpc init.
Synopsis
gpc config set <key> <value>Options
No command-specific options. The key and value are positional arguments.
Common keys:
| Key | Description | Example |
|---|---|---|
app | Default package name | com.example.myapp |
profile | Default auth profile | production |
output | Default output format | json |
auth.serviceAccount | Service account path | ./key.json |
developerId | Developer account ID | 1234567890 |
Example
Set default app:
gpc config set app com.example.myappSet app = com.example.myappSet default profile:
gpc config set profile productionSet developer ID for user management:
gpc config set developerId 1234567890config path
Show the user configuration path written by config init and config set.
Synopsis
gpc config pathOptions
No command-specific options.
Example
gpc config path/Users/you/.config/gpc/config.jsonUser Configuration File Format
The user config.json file supports these fields:
{
"app": "com.example.myapp",
"output": "table",
"developerId": "1234567890",
"profile": "production",
"auth": {
"serviceAccount": "./service-account-key.json"
},
"plugins": ["@gpc-cli/plugin-ci"],
"profiles": {
"production": {
"auth": {
"serviceAccount": "./production-key.json"
}
},
"staging": {
"auth": {
"serviceAccount": "./staging-key.json"
}
}
}
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Plugin approvals also live only in this user config and cannot be set by a project .gpcrc.json. Use gpc plugins approve <name> to add one safely. See the Configuration Guide for project .gpcrc.json fields and precedence.
Related
- auth -- Authentication and profiles
- plugins -- Plugin configuration
- Configuration Guide -- Detailed configuration reference
