The Phrony CLI (Documentation Index
Fetch the complete documentation index at: https://docs.phrony.com/llms.txt
Use this file to discover all available pages before exploring further.
phrony) is the official command-line companion for working with manifests as code. You validate YAML locally, authenticate to Phrony (phrony login on your machine or PHRONY_ACCESS_TOKEN in CI), manage profiles and agents from the terminal, run plan / apply / diff, and tune credentials and config as described in the sections below.
Requirements
- Node.js 20 or newer
Install
Install the package globally sophrony is on your PATH:
Quick start
-
Scaffold a project — creates
manifests/, a starter manifest index, example manifest, andphrony.config.json: -
Lint — validates YAML (including merged includes) before you push or apply:
-
Sign in (terminal) — browser-based OAuth (PKCE). Tokens are stored under your home directory (see Credentials):
CI / pipelines: skip this step and set
PHRONY_ACCESS_TOKENto a workspace access token from the Phrony dashboard (Settings → Access tokens), plusPHRONY_TENANT_ID(or--tenant/tenantIdin config). See Workspace access tokens (CI). -
Plan then apply — preview reconciliation, then confirm (or pass
--auto-approvefor scripts):
Global flags
These flags are available on every command (including subcommands):| Flag | Description |
|---|---|
--cwd <dir> | Working directory (default: current directory). |
--profile <name> | Named credentials profile (see Credentials). |
--debug | Extra diagnostics on stderr (secrets are redacted). |
--json | Machine-readable JSON on stdout where the command supports it. |
Command guides
Each command family has its own page:Init and lint
phrony init and phrony lintLogin
phrony login (OAuth PKCE)Profile and logout
phrony profile, phrony logoutManifest
phrony plan, phrony apply, phrony diffAgent and versions
phrony agent and phrony agent versionAuthentication
Bearer auth, PAT scopes, tenant and API base
Credentials and config
~/.phrony/credentials and phrony.config.jsonphrony version
Prints the CLI version (npm_package_version), or JSON with --json.
Exit codes
Forplan, apply, diff, and agent:
| Code | Meaning |
|---|---|
0 | Success. |
1 | Error (validation, HTTP failure, user cancelled apply, etc.). |
2 | Manifest client unavailable (ManifestApiUnavailableError). |
lint exits 1 if any file fails validation.
Automation and CI
- Use
phrony lintin CI to enforce manifest schema on every change (no API access required). - For
plan,apply,diff, andagent, setPHRONY_ACCESS_TOKENto a dashboard workspace access token with the right scopes (see Workspace access tokens (CI)), plusPHRONY_TENANT_IDand optionalPHRONY_API_BASE. You do not needphrony loginor a credentials file in the runner. - For JSON orchestration, pass
--jsonand parse stdout. - For unattended
apply, use--auto-approve(and--jsonif you need structured output).
Related
- Manifest — YAML structure, includes, and reconciliation behavior
- TypeScript SDK — HTTP client for agents, runs, and more
- API reference — Base URLs and authentication overview