Skip to main content

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.

The Phrony CLI (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 so phrony is on your PATH:
pnpm add -g @phrony/cli
You can also run it once without a global install:
pnpm dlx @phrony/cli --help

Quick start

  1. Scaffold a project — creates manifests/, a starter manifest index, example manifest, and phrony.config.json:
    phrony init
    
  2. Lint — validates YAML (including merged includes) before you push or apply:
    phrony lint
    
  3. Sign in (terminal) — browser-based OAuth (PKCE). Tokens are stored under your home directory (see Credentials):
    phrony login
    
    CI / pipelines: skip this step and set PHRONY_ACCESS_TOKEN to a workspace access token from the Phrony dashboard (Settings → Access tokens), plus PHRONY_TENANT_ID (or --tenant / tenantId in config). See Workspace access tokens (CI).
  4. Plan then apply — preview reconciliation, then confirm (or pass --auto-approve for scripts):
    phrony plan
    phrony apply
    

Global flags

These flags are available on every command (including subcommands):
FlagDescription
--cwd <dir>Working directory (default: current directory).
--profile <name>Named credentials profile (see Credentials).
--debugExtra diagnostics on stderr (secrets are redacted).
--jsonMachine-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 lint

Login

phrony login (OAuth PKCE)

Profile and logout

phrony profile, phrony logout

Manifest

phrony plan, phrony apply, phrony diff

Agent and versions

phrony agent and phrony agent version

Authentication

Bearer auth, PAT scopes, tenant and API base

Credentials and config

~/.phrony/credentials and phrony.config.json

phrony version

Prints the CLI version (npm_package_version), or JSON with --json.

Exit codes

For plan, apply, diff, and agent:
CodeMeaning
0Success.
1Error (validation, HTTP failure, user cancelled apply, etc.).
2Manifest client unavailable (ManifestApiUnavailableError).
lint exits 1 if any file fails validation.

Automation and CI

  • Use phrony lint in CI to enforce manifest schema on every change (no API access required).
  • For plan, apply, diff, and agent, set PHRONY_ACCESS_TOKEN to a dashboard workspace access token with the right scopes (see Workspace access tokens (CI)), plus PHRONY_TENANT_ID and optional PHRONY_API_BASE. You do not need phrony login or a credentials file in the runner.
  • For JSON orchestration, pass --json and parse stdout.
  • For unattended apply, use --auto-approve (and --json if you need structured output).

  • Manifest — YAML structure, includes, and reconciliation behavior
  • TypeScript SDK — HTTP client for agents, runs, and more
  • API reference — Base URLs and authentication overview