config
Manage CLI configuration. GPC looks for .gpcrc.json in the current directory, parent directories, and the user config directory (~/.config/gpc/).
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 a new .gpcrc.json configuration file. In interactive mode, prompts for common settings.
Synopsis
gpc config init [options]Options
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--global | boolean | false | Create in user config directory (~/.config/gpc/) |
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: .gpcrc.jsonNon-interactive init:
gpc config init --no-interactiveCreates a minimal .gpcrc.json:
{}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"]
}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"config set
Set a configuration value in the .gpcrc.json file.
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 path to the active configuration file.
Synopsis
gpc config pathOptions
No command-specific options.
Example
gpc config path/Users/you/projects/my-app/.gpcrc.jsonConfiguration File Format
The .gpcrc.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"],
"approvedPlugins": ["gpc-plugin-slack"],
"profiles": {
"production": {
"auth": {
"serviceAccount": "./production-key.json"
}
},
"staging": {
"auth": {
"serviceAccount": "./staging-key.json"
}
}
}
}Related
- auth -- Authentication and profiles
- plugins -- Plugin configuration
- Configuration Guide -- Detailed configuration reference