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:

  1. Command-line flags--org, --app, --api-url.
  2. EnvironmentPHAREN_AUTH_TOKEN (the one secret) and PHAREN_API_URL (development only; see below).
  3. .pharen.yml — your committed org and app.
yaml.pharen.yml
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.

bash
pharen init ios --org your-org --app your-app-id
FlagRequiredDescription
--orgrequiredYour tenant alias.
--apprequiredThe app id.
--team-idoptionalApple team id for exportOptions.plist (derived from Xcode when omitted).
--diroptionalApp directory to write release/ into (auto-detected otherwise).
--forceoptionalOverwrite existing .pharen.yml / release files.
--no-laneoptionalWrite 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.

bash
pharen releases new --platform ios --version 1.2.0 --build 42 --commit "$(git rev-parse HEAD)"
FlagRequiredDescription
--platformrequiredios | android | web.
--versionrequiredMarketing version (CFBundleShortVersionString on iOS).
--buildrequiredBuild number (CFBundleVersion on iOS).
--commitoptionalCommit sha, attached as provenance.
--commit-rangeoptionalCommit range for this release.
--finalizeoptionalMark the release as deployed.
--org / --app / --api-urloptionalOverride 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.

bash
pharen upload-build --platform ios --version 1.2.0 --build 42 \
  --bundle-id com.yourcompany.yourapp ./App.ipa
FlagRequiredDescription
<path>requiredPositional: path to the .ipa (or .apk).
--platformrequiredios | android.
--version / --buildrequiredRelease identity.
--bundle-idiOS requiredCFBundleIdentifier; used to generate the install manifest.
--titleoptionalInstall-dialog title (defaults to the app id).
--skip-latestoptionalLeave the stable "latest" pointer where it is.
--expiresoptionalTime-to-live for the build.
--org / --app / --api-urloptionalOverride 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.

bash
pharen upload-symbols ./App.dSYM
FlagRequiredDescription
<paths>requiredOne or more .dSYM bundles (or the DWARF binaries inside them).
--platformoptionalOverride the inferred platform.
--uuidoptionalDeclare debug ids explicitly (repeatable); otherwise read from the binary.
--typeoptionalauto | dsym.
--org / --app / --api-urloptionalOverride 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.

bash
pharen ingest-keys new --environment production
FlagRequiredDescription
--environmentrequiredproduction | staging | development.
--platformoptionalScope the key to a platform.
--org / --app / --api-urloptionalOverride the resolved config.