Skip to content

Quick Start

This walkthrough takes a project from nothing to a verified Alphyn integration. You will need an API key; generate one from your app’s page in the Alphyn dashboard (see How to Register Your App).

Run integrate inside your project’s root directory. The CLI detects the platform automatically. Every Alphyn app is either an Android app or an iOS app, each with its own key, so pass the key under its platform’s flag:

Terminal window
cd my-android-app
alphyn-cli integrate --android-api-key <your-key>
Terminal window
cd my-ios-app
alphyn-cli integrate --ios-api-key <your-key>

integrate wires the version-matched SDK into your native build files so it resolves from the Alphyn package registry at build time, adds the SDK initialization, and installs the build/archive register hook. It also writes your key into a gitignored .alphyn/ key file that the hook reads automatically, so every build registers with no further setup. It records what it did in an alphyn.json file at the project root so later commands are reproducible.

On a cross-platform project (Flutter, React Native) each platform enrolls under its own app, so pass both apps’ keys in one run:

Terminal window
alphyn-cli integrate --android-api-key <android-app-key> --ios-api-key <ios-app-key>

After a React Native integrate, run npm install (or yarn) to resolve the SDK package from the registry and cd ios && pod install to link the native pod; after a Flutter integrate, run flutter pub get.

The SDK’s native binaries resolve from the Alphyn package registry at build time, so set your app API key as ALPHYN_REGISTRY_KEY in the build environment (native iOS authenticates through ~/.netrc). See SDK Registry Access.

Then verify:

Terminal window
alphyn-cli doctor

doctor checks each part of the integration (the SDK is wired, the init hook is present as real code, the register hook is installed, and the integrated SDK still matches its recorded checksum) and reports an honest pass/fail per item.

For a greenfield project, new scaffolds a clean, ready-to-build starter, then integrate adds the SDK:

Terminal window
alphyn-cli new ios --ios-api-key <your-key>
cd <project>
alphyn-cli integrate --ios-api-key <your-key>

(For an Android, Flutter, or React Native starter, the key flag is --android-api-key.)

Unity projects are created in the Unity Editor, not from the CLI. Create the project in the Editor, then run alphyn-cli integrate in the project folder.

Registration is automatic. integrate installs a hook that registers the build’s hash at build or archive time, so you normally run nothing:

  • Android builds (a native, Flutter, or React Native project): a Gradle build hook registers every APK build (debug and release) as it is packaged.
  • iOS builds (a native iOS, Flutter, or React Native project): the archive registers itself via the Xcode post-action that integrate installed.
  • Unity: registers via its post-build step.

alphyn-cli doctor confirms the relevant hooks are wired. Run register by hand only for a build with no hook: a split or App Bundle output the Android hook deliberately skips, or a CI step.

Terminal window
alphyn-cli register --android-api-key <your-key> --apk app/build/outputs/apk/release/app-release.apk

The CLI reads the APK’s signing certificate, computes its SHA-256 - the same value the SDK reports at run time - prints it, and registers it with the attestation backend.

Terminal window
alphyn-cli sdk update --android-api-key <your-key>

(On a native iOS project, the key flag is --ios-api-key.)

This removes the installed SDK and re-installs the latest version (integrity-verified), so the project never ends up with files left behind from an older release.

Terminal window
alphyn-cli remove

remove reverses everything integrate added, restoring the project to its pre-integration state.