Reference
CLI reference
The pharen command-line tool is the thin, authenticated client behind distribution and symbol upload. The fastlane plugin and the Xcode run script wrap it — this page is the underlying surface.
Configuration
Three inputs configure every command. In precedence order, highest first:
- Command-line flags —
--org,--app,--api-url. - Environment —
PHAREN_AUTH_TOKEN(the one secret) andPHAREN_API_URL(development only; see below). .pharen.yml— your committed org and app.
org: your-org # customer-facing alias of your tenant
app: your-app-id # the app_id.pharen.yml is found by walking up from the working directory — the nearest one wins — so it works whether a command runs from the repo root or an app subdirectory. It holds no secrets. Your --org never grants access on its own: the auth token's tenant is authoritative, and a token/config mismatch is a hard 403.
PHAREN_AUTH_TOKEN is a secret — set it in your CI environment, never commit it. Every command that talks to the control plane needs it (init ios is the exception; it's purely local). Output is JSON on stdout, so Fastlane and CI can parse it.
pharen init ios
Sets up a repo: writes .pharen.yml at the root and copies the release lane into your app. Local only — no network, no prompts. Re-running won't overwrite existing files unless you pass --force.
pharen init ios --org your-org --app your-app-id| Flag | Required | Description |
|---|---|---|
--org | required | Your tenant alias. |
--app | required | The app id. |
--team-id | optional | Apple team id for exportOptions.plist (derived from Xcode when omitted). |
--dir | optional | App directory to write release/ into (auto-detected otherwise). |
--force | optional | Overwrite existing .pharen.yml / release files. |
--no-lane | optional | Write only .pharen.yml, skip the release lane. |
pharen releases new
Registers or updates a release — the anchor incoming crashes resolve against. Idempotent: re-running for the same version and build is a safe no-op.
pharen releases new --platform ios --version 1.2.0 --build 42 --commit "$(git rev-parse HEAD)"| Flag | Required | Description |
|---|---|---|
--platform | required | ios | android | web. |
--version | required | Marketing version (CFBundleShortVersionString on iOS). |
--build | required | Build number (CFBundleVersion on iOS). |
--commit | optional | Commit sha, attached as provenance. |
--commit-range | optional | Commit range for this release. |
--finalize | optional | Mark the release as deployed. |
--org / --app / --api-url | optional | Override the resolved config. |
pharen upload-build
Uploads the installable and returns the OTA install link. On iOS, --bundle-id is required — the server generates the install manifest and the device refuses a mismatch.
pharen upload-build --platform ios --version 1.2.0 --build 42 \
--bundle-id com.yourcompany.yourapp ./App.ipa| Flag | Required | Description |
|---|---|---|
<path> | required | Positional: path to the .ipa (or .apk). |
--platform | required | ios | android. |
--version / --build | required | Release identity. |
--bundle-id | iOS required | CFBundleIdentifier; used to generate the install manifest. |
--title | optional | Install-dialog title (defaults to the app id). |
--skip-latest | optional | Leave the stable "latest" pointer where it is. |
--expires | optional | Time-to-live for the build. |
--org / --app / --api-url | optional | Override the resolved config. |
pharen upload-symbols
Uploads debug symbols, kept private under your tenant. Slim by design — a token and a path is a complete invocation. Platform is inferred from the artifact (a dSYM implies iOS), and the server deduplicates by debug id, so re-uploads are cheap no-ops that still exit 0.
pharen upload-symbols ./App.dSYM| Flag | Required | Description |
|---|---|---|
<paths> | required | One or more .dSYM bundles (or the DWARF binaries inside them). |
--platform | optional | Override the inferred platform. |
--uuid | optional | Declare debug ids explicitly (repeatable); otherwise read from the binary. |
--type | optional | auto | dsym. |
--org / --app / --api-url | optional | Override the resolved config. app is provenance only — symbols join by debug id. |
pharen ingest-keys new
Mints an ingest key for an environment — the phi_live_… / phi_test_… value that goes in PharenIngestKey. The secret is shown once.
pharen ingest-keys new --environment production| Flag | Required | Description |
|---|---|---|
--environment | required | production | staging | development. |
--platform | optional | Scope the key to a platform. |
--org / --app / --api-url | optional | Override the resolved config. |