zunoy-appshare-cli
v0.5.2
Published
cli app for appshare
Readme
Zunoy Appshare CLI
The official command-line tool for uploading mobile app builds (.apk, .aab, .ipa) to Zunoy Appshare. Point it at a build artifact, and it validates the file, uploads it, and prints back a shareable URL — locally or as a step in your CI pipeline.
Features
- Uploads Android (
.apk,.aab) and iOS (.ipa) builds - Validates the file extension and archive format before uploading, so bad paths fail fast with a clear error
- Associates uploads with a specific app via
--app-id, or does a Quick Release when omitted - Prints the shareable URL on success and exits non-zero on failure, so it's safe to use as a CI/CD gate
- Ships as a small, dependency-free native binary — no runtime required beyond npm to install it
Requirements
- Node.js and npm (only needed to install the CLI; the CLI itself is a native binary)
- macOS, Linux, or Windows on amd64/arm64
Installation
Install the CLI globally with npm:
npm install -g zunoy-appshare-cliThis downloads the prebuilt appshare binary for your platform during postinstall and puts it on your PATH.
Alternatively, run it without a global install using npx:
npx zunoy-appshare-cli ./build/app-release.apkVerify the install:
appshare helpAuthentication
The CLI reads your API key from the APPSHARE_API_KEY environment variable. Get a key from your Zunoy Appshare account, then export it in your shell:
export APPSHARE_API_KEY="your_api_key_here"For CI/CD, set APPSHARE_API_KEY as a secret/protected environment variable in your provider (GitHub Actions secret, Bitrise secret, Jenkins credential, etc.) rather than committing it anywhere.
Usage
appshare <file-path> [--app-id <appID>]Basic upload:
export APPSHARE_API_KEY="your_api_key_here"
appshare ./build/app-release.ipaThe CLI:
- Validates that the file exists, has a
.apk,.aab, or.ipaextension, and is a valid archive - Validates the API key against the server
- Uploads the file
- Prints the shareable URL and exits
0on success, or prints an error and exits non-zero on failure
This makes it suitable for both local use and automated environments like GitHub Actions, Bitrise, or Jenkins.
Running appshare with no arguments, or appshare help, shows the built-in help text.
Associating an upload with a specific app
Pass --app-id to tag the upload with an app slug:
appshare ./build/app-release.apk --app-id my-app-slug--app-id can appear anywhere in the argument list, and also accepts the --app-id=my-app-slug form:
appshare --app-id=my-app-slug ./build/app-release.apkQuick Release (no --app-id)
--app-id is optional. If you omit it, Appshare treats the upload as a Quick Release — a one-off release that isn't tied to an existing app in your Appshare account, useful for ad-hoc builds you just want a shareable link for:
appshare ./build/app-release.apkPass --app-id instead whenever you want the upload to become a new release under an app you already manage in Appshare.
Options
| Flag | Required | Description |
| --- | --- | --- |
| <file-path> | Yes | Path to the build file to upload (.apk, .aab, or .ipa) |
| --app-id <appID> | No | Slug of the app to associate this upload with. Omit it to create a Quick Release instead |
| Environment variable | Required | Description |
| --- | --- | --- |
| APPSHARE_API_KEY | Yes | Your Zunoy Appshare API key, used to authenticate the upload |
Available commands
appshare help # Show detailed help informationExit codes
The CLI exits 0 on a successful upload and non-zero if any step fails (missing API key, invalid file, failed validation, or a failed upload). Check the exit code in scripts to gate a pipeline on a successful release:
appshare ./build/app-release.apk || exit 1CI/CD examples
GitHub Actions
- name: Upload build to Appshare
env:
APPSHARE_API_KEY: ${{ secrets.APPSHARE_API_KEY }}
run: |
npx zunoy-appshare-cli ./build/app-release.apk --app-id my-app-slugBitrise
Add a Script step:
#!/usr/bin/env bash
set -e
npm install -g zunoy-appshare-cli
appshare "$BITRISE_APK_PATH" --app-id my-app-slugSet APPSHARE_API_KEY as a Secret in your Bitrise app's environment variables.
Jenkins
withEnv(["APPSHARE_API_KEY=${env.APPSHARE_API_KEY}"]) {
sh 'npx zunoy-appshare-cli ./build/app-release.apk --app-id my-app-slug'
}Troubleshooting
Please add the APPSHARE_API_KEY as an environment variable and try again.— the environment variable isn't set in the current shell/CI job. Export it before invokingappshare.invalid file extension— the CLI only accepts.apk,.aab, or.ipafiles.invalid file format: not a valid ZIP archive— the file exists but isn't a real APK/AAB/IPA (these formats are ZIP archives under the hood). Confirm your build step produced a complete, uncorrupted artifact.API key invalid— double-check the key value and that it hasn't been revoked/rotated.
Uninstall
npm uninstall -g zunoy-appshare-cli