Pgyer CLI
An overview of @pgyer/cli, Pgyer's official command-line tool for uploads, app and historical build management, authentication, and automation.
@pgyer/cli is Pgyer's official command-line tool. Upload packages, query and manage apps and historical builds from your terminal, or integrate these operations into build scripts, CI/CD pipelines, and AI assistants.
This page provides an overview and a few common examples. See the GitHub repository PGYER/pgyer-cli or the npm package page for complete commands and parameters.
For help choosing between the API, CLI, CI/CD plugins, MCP, and Agent Skill, see Automated App Uploads and CI/CD Integration.
Feature Overview
| Feature | What you can do |
|---|---|
| App uploads | Upload IPA, APK, and HAP packages through the fast upload API, with release notes, installation policies, channels, and other publishing options |
| App management | List and inspect apps, find an app by short link, update settings, or delete an app |
| Historical builds | List historical builds, check for updates, set or unset the latest-version flag, and delete a specific build |
| Upload tracking | Wait for release processing by default, or upload asynchronously and check or wait for the result later |
| Authentication | Sign in through a browser, check authentication status, sign out, or use an API Key for automation |
| Scripts and automation | Use --json for machine-readable results and preview supported changes with --dry-run |
| AI assistants | Run pgyer mcp to start an MCP server and upload or manage apps from AI clients; see Pgyer MCP |
Install
Requires Node.js 20.19 or later.
npm install -g @pgyer/cliQuick Start
Sign In
For local development, authorize via the browser:
pgyer auth loginIn CI/CD, pass the API Key via an environment variable:
export PGYER_API_KEY=YOUR_API_KEYUpload an App
pgyer upload ./app-release.apk --build-update-description "Fixed the login crash"Supports .apk, .ipa, and .hap. Without --install-type, the app keeps its current install setting. After the upload, the CLI waits up to 600 seconds for Pgyer to finish publishing; change this with --timeout.
Query Apps and Historical Builds
# List your apps
pgyer apps list
# Inspect an app
pgyer apps info YOUR_APP_KEY
# List an app's historical builds
pgyer versions list YOUR_APP_KEYReplace YOUR_APP_KEY with the target app's App Key. Add --json when processing results in a script, for example pgyer apps list --json.
More Examples and Options
For complete examples covering app settings, channel uploads, asynchronous tasks, and build management, see the CLI documentation. Run pgyer --help locally to list commands, or pgyer upload --help to inspect a command's options. Available features depend on your installed version.