Skip to content

Getting Started


alphyn-cli integrates the Alphyn mobile security SDK into your app and keeps that integration correct as the SDK evolves. It is a single, self-contained binary with no runtime dependencies; the same tool works for an Android developer, an iOS developer, a Unity developer, and a CI runner, none of whom need a language toolchain to use it.

Integrating a mobile security SDK by hand means reading several pages, downloading platform artifacts, wiring native build files, and pasting an API key into a build script. That process is error-prone and has produced real problems in practice: API keys committed to repositories, build scripts pointing at the wrong environment, and integration code copied from documentation that has drifted out of sync with the SDK.

The CLI removes that entire class of problems:

  • No secrets in your repository: the API key is passed to the CLI by its per-platform flag (--android-api-key or --ios-api-key) or a -file path form, and written only to a gitignored .alphyn/ key file, never committed. At build time the same app key authenticates to the package registry as ALPHYN_REGISTRY_KEY (native iOS uses ~/.netrc), supplied from your environment or CI secret store, so it still never lives in your source tree.
  • Integrity-verified artifacts: every SDK artifact is checked against a published SHA-256 before it is used, so a tampered mirror cannot inject a modified SDK; the registry-resolved native binaries are pinned to the same checksum wherever they resolve.
  • No drift: the CLI generates only integration code that matches the SDK version it installed; it never reproduces stale documentation.
  • The right environment, every time: the register and signature endpoints come from the backend’s own SDK manifest, so the SaaS cloud and a self-hosted deployment behave identically and the CLI never guesses a host.
  • Registry-based delivery: the SDK’s native binaries resolve from the Alphyn package registry at build time. The CLI wires the authenticated repositories into your build; you supply the registry credential as ALPHYN_REGISTRY_KEY (native iOS via ~/.netrc). See SDK Registry Access.

For most projects, integration is two commands:

Terminal window
# 1. (Greenfield only) Scaffold a ready-to-run starter project.
alphyn-cli new android --android-api-key <your-key>
# 2. Add the SDK to the project (run this inside an existing app too).
alphyn-cli integrate --android-api-key <your-key>

new scaffolds a clean starter project; the SDK is added separately, by integrate. For an existing app, skip new and run integrate directly inside the project.

After integrating:

Terminal window
alphyn-cli doctor # verify every part of the integration is wired correctly
alphyn-cli status # show the platform, SDK version, and target backend

Android · iOS · Flutter · React Native · Unity

The CLI detects the platform automatically from the project in the current directory, so most commands need no platform argument. See Platform Integration for exactly what integrate does on each.