@hashdrop/cli
v1.0.6
Published
Build, version and upload mobile app builds to Hashdrop from an npm script.
Downloads
1,043
Maintainers
Readme
@hashdrop/cli
Build, version and upload mobile app builds to Hashdrop from an npm script.
npx @hashdrop/cli init # once, in your app repo
npm run drop:qa # then: build → version → upload → shareWhat it does
- Runs your build command (Gradle, Xcode, whatever you configure).
- Auto-versions from the platform's record: the next version name and
build number are always Hashdrop's latest plus one — never a stale local
file.
1.2.9becomes1.2.10;2.4becomes2.5; the format you use is the format you keep. Duplicate-version rejections simply stop happening. - Uploads the artifact with your git commit, branch and release notes attached, streaming — a 300 MB IPA never sits in memory.
- Prints the install link, and a QR code right in the terminal.
--waitholds the door until Hashdrop's malware scan clears the build, so your pipeline fails if the build would not be distributable.
Setup
npx @hashdrop/cli initinit asks for a CI token (create one in your Hashdrop dashboard under
CI tokens), detects your project layout, validates everything against the
server before saving, and writes the config and the four drop:* scripts
(dev, qa, prelive, live) into your package.json. The token is stored in ~/.config/hashdrop/token (mode 600) —
never in a committed file.
Daily use
npm run drop:qa -- --notes "Invoice rounding fix"
npm run drop:prelive -- --notes-from-git
npm run drop:live -- --set-version 2.0 # a deliberate version jumpIn CI, set HASHDROP_TOKEN as a secret:
- run: npx @hashdrop/cli --channel qa --no-build --wait --artifact app-release.apkOptions
| Flag | Meaning |
| --- | --- |
| --channel <dev\|qa\|prelive\|live> | Target channel (default dev) |
| --notes "…" / --notes-from-git | Release notes for the install page |
| --no-build | Upload an existing file; skips the version bump too, since the number is already baked in |
| --bump / --no-bump / --bump-code-only | Control auto-versioning per run |
| --set-version X.Y[.Z] | Set the version name deliberately; the sequence continues from it |
| --wait | Exit non-zero unless the malware scan passes |
| --app, --artifact | Override the configured app / artifact glob |
The rules it follows
- The platform is the authority. Version numbers come from what Hashdrop
has accepted, so every machine — laptops, CI, a fresh clone — converges on
the same sequence. A stale local file is corrected, not trusted; if your
local version is ahead (a deliberate jump), the CLI warns and points you
at
--set-versionbefore continuing. - Literals only. It edits
versionCode 28,versionName "1.2.8",MARKETING_VERSION = 1.2.8, or Expo'sapp.json— and refuses anything computed rather than guess at your build logic. For computed setups, readHASHDROP_BUILD_NUMBER/HASHDROP_VERSION_NAMEin your build file instead; the CLI sets both. - Zero dependencies, no install scripts. What you audit is what runs.
Docs: https://hashdrop.io/docs/npm-cli
