Skip to content

doctor / docs / completion

Utility commands for environment verification, documentation access, and shell completions.

Commands

CommandDescription
doctorVerify setup and connectivity
docsOpen documentation in browser
completion bashGenerate bash completions
completion zshGenerate zsh completions
completion fishGenerate fish completions

gpc doctor

Run diagnostic checks to verify your GPC setup end-to-end.

Synopsis

bash
gpc doctor [--json]

Options

FlagDescription
--jsonOutput results as machine-readable JSON

Checks performed

CheckWhat it verifies
nodeNode.js ≥ 20
configConfig file loads without errors
default-appA default package name is configured
package-namePackage name matches Android naming rules
config-dirConfig directory is readable and writable
cache-dirCache directory is readable and writable
service-account-fileSA key file exists and is readable (if configured)
service-account-permissionsSA key file is not group/world-readable (Unix)
profileGPC_PROFILE env var points to a known profile
proxyProxy URL is valid (if HTTPS_PROXY etc. are set)
ca-certCA cert file exists (if GPC_CA_CERT is set)
dnsBoth API endpoints resolve: androidpublisher.googleapis.com and playdeveloperreporting.googleapis.com
authCredentials load and authenticate successfully
api-connectivityAccess token can be obtained from Google

Example

bash
gpc doctor

All checks passing:

GPC Doctor

  ✓ Node.js 22.12.0
  ✓ Configuration loaded
  ✓ Default app: com.example.myapp
  ✓ Package name format OK: com.example.myapp
  ✓ Config directory: /Users/you/.config/gpc
  ✓ Cache directory: /Users/you/.cache/gpc
  ✓ Service account file: /path/to/key.json
  ✓ Service account file permissions OK (mode: 600)
  ✓ DNS: androidpublisher.googleapis.com
  ✓ DNS: playdeveloperreporting.googleapis.com
  ✓ Authenticated as play-api@my-project.iam.gserviceaccount.com
  ✓ API connectivity verified

  ✓ 12 passed  ⚠ 0 warnings  ✗ 0 failed

All checks passed!

With failures:

GPC Doctor

  ✓ Node.js 22.12.0
  ✗ Configuration could not be loaded
    Run gpc config init to create a config file, or check .gpcrc.json for syntax errors

  ✓ 1 passed  ⚠ 0 warnings  ✗ 1 failed

Some checks failed. Fix the issues above and run again.

JSON output

bash
gpc doctor --json
json
{
  "success": true,
  "errors": 0,
  "warnings": 0,
  "checks": [
    { "name": "node", "status": "pass", "message": "Node.js 22.12.0" },
    { "name": "config", "status": "pass", "message": "Configuration loaded" }
  ]
}

Exits 0 if all checks pass, 1 if any check fails.


gpc docs

Open the GPC documentation in your default browser.

Synopsis

bash
gpc docs

Options

No command-specific options.

Example

bash
gpc docs

Opens https://github.com/yasserstudio/gpc#readme in the default browser. If the browser cannot be opened, prints the URL to stdout.


completion bash

Generate bash shell completions. Pipe the output to your bash completions directory or source it directly.

Synopsis

bash
gpc completion bash

Options

No command-specific options.

Example

Add to your .bashrc:

bash
eval "$(gpc completion bash)"

Or save to completions directory:

bash
gpc completion bash > /etc/bash_completion.d/gpc

Or for user-local completions:

bash
mkdir -p ~/.local/share/bash-completion/completions
gpc completion bash > ~/.local/share/bash-completion/completions/gpc

completion zsh

Generate zsh shell completions.

Synopsis

bash
gpc completion zsh

Options

No command-specific options.

Example

Add to your .zshrc:

bash
eval "$(gpc completion zsh)"

Or save to your fpath:

bash
gpc completion zsh > "${fpath[1]}/_gpc"

Or for Oh My Zsh users:

bash
gpc completion zsh > ~/.oh-my-zsh/completions/_gpc

completion fish

Generate fish shell completions.

Synopsis

bash
gpc completion fish

Options

No command-specific options.

Example

Save to fish completions directory:

bash
gpc completion fish > ~/.config/fish/completions/gpc.fish

Or load for the current session:

bash
gpc completion fish | source

Released under the MIT License.