Skip to content

CLI ​

pfy is the command-line tool for ProductifyFW. Use it to manage projects, tenants, and applications on a Manager, to keep a project.yaml for your own repository, to generate CI pipelines, and to render and deploy Nomad jobs. It talks to the Manager over its GraphQL API using a Personal Access Token (PAT).

What you can do with it ​

Sign in ​

pfy login --server <url> signs you in through the platform's identity provider using a browser flow. The flow is a device grant: the CLI prints a URL and a short code, so it also works over SSH. On approval the Manager mints a PAT for the CLI and saves it to ~/.pfy/config.yaml.

If you already have a PAT, pass it with --token-stdin (or --token, or the PFY_MANAGER_TOKEN environment variable) and the browser is skipped. pfy whoami checks that the saved URL and token work; pfy logout removes the token. See login.

Configure once, run without flags ​

Settings come from three places, highest priority first:

  1. Command flags
  2. Environment variables (PFY_MANAGER_URL, PFY_MANAGER_TOKEN)
  3. ~/.pfy/config.yaml (written by pfy login)

A second file, project.yaml in your repository, holds project metadata, CI settings, and environment aliases. See Configuration and Project Configuration.

Manage Manager resources ​

Create, list, update, and delete:

  • projects, the top-level unit (pfy project)
  • tenants, customer organizations inside a project (pfy tenant)
  • applications, defined once per project and enabled per tenant (pfy application)
  • services and data stores, the parts of an application's stack (pfy service, pfy data)
  • environments, server-side environments and their local aliases (pfy env)
  • language packs and pilets (pfy languagepack, pfy pilet)

List and get commands accept -o json or -o yaml for scripting.

Run the platform locally ​

pfy dev starts a local Manager, database, identity provider, and proxy from an embedded Docker Compose file, seeds a project and application, and can run a header-injecting dev proxy in front of your app. See dev and the Zero-to-App Local Quickstart.

Deploy ​

Deploy artifacts are rendered from a deployment spec stored in the Manager; you do not hand-write Nomad jobs. See Generated Artifacts.

  • pfy nomad render|deploy: render an application's Nomad job from its spec, then validate, plan, and run it
  • pfy platform render|deploy: render the platform's own stack (Manager, proxy, identity provider, database) from install.yaml
  • pfy deploy diff: compare the spec with the committed job file and the running cluster
  • pfy deployment get|set|snapshot|apply: read and edit the spec, or export it to a file for review
  • pfy proxy status|diff|sync: inspect and drive the Manager's proxy-config sync

Version and CI helpers ​

  • pfy version show|set|bump: manage the version field in project.yaml
  • pfy ci update: generate GitHub Actions or GitLab CI pipeline files and a Dockerfile
  • pfy init / pfy sync: create project.yaml, or fill it from a Manager project

Shell completion ​

Completion scripts are available for Bash, Zsh, and Fish; see Installation.

How it is built ​

pfy CLI  ──GraphQL over HTTP(S), Authorization: Bearer <PAT>──▶  Manager (proxied entrypoint)

The Manager URL must be the proxied entrypoint, not the Manager container directly: the Manager only accepts PAT traffic that has passed through the proxy. See login.

Where to go next ​