Command Reference
Every command accepts -h / --help. Commands that talk to the backend take the app’s API
key and an optional backend URL. Every Alphyn app is either an Android app or an iOS app,
each with its own key, and the key flags are per platform:
--android-api-key <key>/--android-api-key-file <path>: the Android app’s API key. The primary key onandroid,unity,flutterandreact-nativeprojects.integrateprovisions it into a gitignored.alphyn/android-api.keyfile so builds register automatically; see Configuration.--ios-api-key <key>/--ios-api-key-file <path>: the iOS app’s API key. The primary key on a nativeiosproject; onflutterandreact-nativeit is passed alongside the Android key sointegrateprovisions both platforms’ key files in one run. Not used on Unity (its iOS build registers through the Xcode post-action).--ios-debug-hash <64-hex>/--ios-debug-hash-file <path>: the iOS app’s development debug hash from the dashboard (App Details), for the development loop onios,flutterandreact-native; see each platform’s page. Rendered into DEBUG builds only.--android-debug-hash <64-hex>/--android-debug-hash-file <path>: the Android counterpart, for the deliberate cases (a build environment without the Gradle hook, or pinning one specific registered build); applied to debuggable builds only.--base-url <url>: the backend to target. Omit it to use the Alphyn cloud (SaaS). See Configuration.
The -file flag forms read the key from a file, which keeps it off the command line; the CLI
reads no environment variable for the key. Most commands operate on the project in the
current directory and detect the platform automatically.
alphyn-cli new <platform> --android-api-key <key> [--base-url <url>]Scaffold a ready-to-run starter project for <platform> (android, ios, flutter,
react-native); on ios the key flag is --ios-api-key. The starter is a clean, buildable
app; the SDK is added separately, by integrate. Fails if the target directory already
contains a project.
Unity projects are created in the Unity Editor, not by
new.
integrate
Section titled “integrate”alphyn-cli integrate --android-api-key <key> [--ios-api-key <key>] [--base-url <url>]Add the SDK to the project in the current directory: wire the native build files so the SDK
resolves from the Alphyn package registry at build time, add SDK initialization, and install the
build/archive register hook. It also writes each API key into a gitignored .alphyn/ key file
that the hook reads automatically, so builds register with no further setup. The build supplies the
registry credential separately as ALPHYN_REGISTRY_KEY (native iOS via ~/.netrc); see
SDK Registry Access. A native iOS project takes --ios-api-key
only; on a cross-platform (Flutter, React Native) project pass both keys so both platforms’ key
files are provisioned. Re-running integrate is safe; every change is marker-bounded and
idempotent. Records the result in alphyn.json.
register
Section titled “register”alphyn-cli register --android-api-key <key> [--apk <path>] [--base-url <url>]- Android builds (native, Flutter, or React Native): register automatically.
integrateinstalls a Gradle build hook that registers every APK build (debug and release) as it is packaged. Pass a signed APK with--apkonly to register one by hand: a split or App Bundle output the hook skips, or a CI step. The CLI computes its build hash, prints it, and registers it with the attestation backend. - iOS builds (native iOS, Flutter, or React Native) and Unity: register automatically at
archive/build time through the post-action or post-build step
integrateinstalled, so there is nothing to run here. The archive does not need the Xcode UI: a terminal or CIxcodebuild ... archiveruns the same scheme post-action. With a development debug hash pinned,registeralso re-ensures the development build signature enrollment (a pure CLI call, no build or archive needed); see each platform page’s development-builds section.
sdk update
Section titled “sdk update”alphyn-cli sdk update --android-api-key <key> [--base-url <url>]Remove the installed SDK and re-integrate the latest version, with integrity verification (on a
native iOS project the key flag is --ios-api-key). Removing first guarantees a clean result;
no files are left behind from the previous version.
doctor
Section titled “doctor”alphyn-cli doctorDiagnose the integration in the current directory and print an honest pass/fail per item: the
SDK is wired, the initialization hook is present as real code, the register hook is installed,
and the integrated SDK still matches its recorded checksum. With the platform’s key
supplied, it also verifies build enrollment against the backend, and, when a development debug
hash is pinned, whether the development build signature is enrolled (both advisory). Read-only;
exits non-zero if a local integration check fails. Repair a failing integration by re-running
integrate.
status
Section titled “status”alphyn-cli statusShow the project state: platform, whether the SDK is integrated (and its version), the app id (once registered), and the target backend. Read-only.
remove
Section titled “remove”alphyn-cli removeCleanly remove Alphyn from the project, reversing everything integrate added and restoring
the project to its pre-integration state.
self-update
Section titled “self-update”alphyn-cli self-update --android-api-key <key> [--base-url <url>]Download the latest published CLI release, verify its SHA-256, and atomically replace the
running binary. Any of your apps’ keys works here (--android-api-key or --ios-api-key).
Never downgrades; a development build is refused (it has no release version to
compare against).
Global flags
Section titled “Global flags”| Flag | Meaning |
|---|---|
-h, --help | Show usage for the CLI or a command. |
-v, --version | Print the CLI version. |