CLI
The pfy CLI is the command-line interface for the Productify Framework, designed for managing projects, tenants, applications, and development workflows from your terminal.
Overview
The pfy CLI provides a type-safe, GraphQL-powered interface to interact with the ProductifyFW Manager, enabling automation, scripting, and streamlined development workflows.
Key Features
Type-Safe GraphQL Client
Built on hasura/go-graphql-client for compile-time validation and type safety.
Hierarchical Configuration
Multiple levels of configuration:
- User Configuration (
~/.pfy/config.yaml) - Authentication and global settings - Project Configuration (
project.yaml) - Project metadata and CI/CD settings - Command Flags - Per-command overrides
Priority order: Command flags > Project config > User config > Environment variables > Defaults
Resource Management
Complete CRUD operations for:
- Projects - Top-level organization units
- Tenants - Multi-tenant isolation within projects
- Applications - Deployable application instances
- Language Packs - Internationalization support
Developer Workflows
- Project Initialization - Initialize projects with
pfy initand sync from manager - Version Management - Automated semantic versioning with
pfy version - Application Promotion - Promote applications between tenants (environments)
- Application Copying - Copy applications to different tenants
- CI/CD Integration - Generate parameterized pipeline templates with auto-versioning
- Nomad Deployment - Automated Nomad job deployment with version management
- Language Packs - Manage internationalization through language pack commands
Shell Completion
Auto-completion support for Bash, Zsh, and Fish shells.
Technology Stack
- Language: Go 1.25+
- CLI Framework: urfave/cli/v3
- GraphQL Client: hasura/go-graphql-client
- Configuration: YAML (gopkg.in/yaml.v3)
Architecture
┌─────────────────────────────────────────────────┐
│ pfy CLI │
│ ┌──────────────────────────────────────────┐ │
│ │ Command Handlers (urfave/cli) │ │
│ └──────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────┐ │
│ │ Configuration Management (YAML) │ │
│ │ • Flags • Env Vars • Config File │ │
│ └──────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────┐ │
│ │ GraphQL Client (hasura/go-graphql) │ │
│ │ • Type-safe queries and mutations │ │
│ │ • Bearer token authentication │ │
│ └──────────────────────────────────────────┘ │
└─────────────────────────────────────────────────┘
│
│ GraphQL over HTTPS
▼
┌─────────────────────────────────────────────────┐
│ Manager Backend │
│ (GraphQL API + PostgreSQL) │
└─────────────────────────────────────────────────┘Quick Links
- Installation - Install and set up the CLI
- Quick Start Guide - Get started in minutes
- Configuration - User-level authentication and settings
- Project Configuration - Project-level configuration with
project.yaml - Version Management - Semantic versioning and automation
- Auto-Versioning in CI/CD - Automated version bumping in pipelines
- Nomad Deployment - Deploying to Nomad with automated versioning
- Command Reference - Complete command documentation
- API Implementation - GraphQL integration details