Skip to content

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 on android, unity, flutter and react-native projects. integrate provisions it into a gitignored .alphyn/android-api.key file 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 native ios project; on flutter and react-native it is passed alongside the Android key so integrate provisions 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 on ios, flutter and react-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.

Terminal window
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.

Terminal window
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.

Terminal window
alphyn-cli register --android-api-key <key> [--apk <path>] [--base-url <url>]
  • Android builds (native, Flutter, or React Native): register automatically. integrate installs a Gradle build hook that registers every APK build (debug and release) as it is packaged. Pass a signed APK with --apk only 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 integrate installed, so there is nothing to run here. The archive does not need the Xcode UI: a terminal or CI xcodebuild ... archive runs the same scheme post-action. With a development debug hash pinned, register also re-ensures the development build signature enrollment (a pure CLI call, no build or archive needed); see each platform page’s development-builds section.
Terminal window
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.

Terminal window
alphyn-cli doctor

Diagnose 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.

Terminal window
alphyn-cli status

Show the project state: platform, whether the SDK is integrated (and its version), the app id (once registered), and the target backend. Read-only.

Terminal window
alphyn-cli remove

Cleanly remove Alphyn from the project, reversing everything integrate added and restoring the project to its pre-integration state.

Terminal window
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).

FlagMeaning
-h, --helpShow usage for the CLI or a command.
-v, --versionPrint the CLI version.