Skip to content

application

Manage project-level applications and their per-tenant enablement.

Synopsis

bash
pfy application <subcommand> [flags]

Aliases: app

Description

Applications are deployable products defined once at the project level. Each has its own configuration, modules, themes, and version management, and is made available to a customer organization by enabling it for that tenant.

Model change in the Wave 3 release train

Applications are no longer created inside a tenant — they live at the project level and are enabled per tenant via Tenant2Application. The cross-tenant promote and copy subcommands are removed: with one project-level application row there is nothing to promote between tenants. Use enable / disable / list-tenants to manage per-tenant access, and copy configuration between environments for the dev → qas → run flow. See the Migration Guide. The promote/copy sections below are retained only as historical reference.

Subcommands

  • list - List a project's applications
  • create - Create a new application at the project level
  • enable - Enable an application for a tenant (--tenant <slug>)
  • disable - Disable an application for a tenant
  • list-tenants - List the tenants an application is enabled for
  • update-version - Update the version of an application
  • promote / copy - Removed (see the note above)

application list

List all applications within a specific tenant.

Usage

bash
pfy application list --tenant <tenant-slug> [flags]

Flags

FlagRequiredDescription
--tenantYesTenant slug to list applications from
--limitNoMaximum number of items to return — if unset, every item is fetched
--offsetNoNumber of items to skip before returning results — defaults to the first item

Example

bash
pfy application list --tenant production

Output:

Applications:
  - Web App (web-app) v1.2.3
  - Admin Portal (admin) v2.0.1
  - API Gateway (api) v1.0.0

Verbose output:

bash
pfy --verbose application list --tenant production
Connecting to ProductifyFW manager...
Fetching applications for tenant 'production'...
Found 3 application(s)
Applications:
  - Web App (web-app) v1.2.3
    ID: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
  - Admin Portal (admin) v2.0.1
    ID: bbbbbbbb-cccc-dddd-eeee-ffffffffffff
  - API Gateway (api) v1.0.0
    ID: cccccccc-dddd-eeee-ffff-000000000000

application create

Create a new application within a tenant.

Usage

bash
pfy application create \
  --tenant-id <id> \
  --slug <slug> \
  --name <name> \
  [--version <version>] \
  [--description <desc>]

Flags

FlagRequiredDescription
--tenant-idYesTenant ID (not slug)
--slugYesApplication slug (unique within tenant)
--nameYesApplication display name
--versionNoInitial version (default: "0.1.0")
--descriptionNoApplication description

Examples

Basic creation:

bash
pfy application create \
  --tenant-id 33333333-4444-5555-6666-777777777777 \
  --slug web-app \
  --name "Web Application"

With version and description:

bash
pfy application create \
  --tenant-id 33333333-4444-5555-6666-777777777777 \
  --slug admin-portal \
  --name "Admin Portal" \
  --version "1.0.0" \
  --description "Internal administration interface for managing tenant data"

Output:

Application created successfully: Admin Portal (admin-portal) v1.0.0

Verbose output:

bash
pfy --verbose application create \
  --tenant-id 33333333-4444-5555-6666-777777777777 \
  --slug admin-portal \
  --name "Admin Portal" \
  --version "1.0.0" \
  --description "Internal administration interface"
Connecting to ProductifyFW manager...
Creating application 'admin-portal' v1.0.0 in tenant ID '33333333-4444-5555-6666-777777777777'...
Application created successfully: Admin Portal (admin-portal) v1.0.0
  ID: bbbbbbbb-cccc-dddd-eeee-ffffffffffff

Workflow Example

Creating a Complete Application Stack

bash
# 1. Get the tenant ID
TENANT_ID=$(pfy --verbose tenant list --project my-saas | awk '/\(prod\)$/ {getline; print $2}')

# 2. Create main application
pfy application create \
  --tenant-id $TENANT_ID \
  --slug web-app \
  --name "Web Application" \
  --version "1.0.0" \
  --description "Customer-facing web application"

# 3. Create API gateway
pfy application create \
  --tenant-id $TENANT_ID \
  --slug api \
  --name "API Gateway" \
  --version "1.0.0" \
  --description "REST API for mobile and third-party integrations"

# 4. List all applications to verify
pfy application list --tenant production

GraphQL Operations

GetApplications

graphql
query GetApplications(
  $tenantSlug: String!
  $filters: [FilterInput!]
  $order: [OrderInput!]
  $pagination: PaginationInput
) {
  applications(
    tenantSlug: $tenantSlug
    filters: $filters
    order: $order
    pagination: $pagination
  ) {
    id
    slug
    name
    version
  }
}

CreateApplication

graphql
mutation CreateApplication($tenantId: ID!, $input: CreateApplicationInput!) {
  createApplication(tenantId: $tenantId, input: $input) {
    id
    slug
    name
    version
  }
}

Input Type:

graphql
input CreateApplicationInput {
  slug: String!
  name: String!
  description: String
  version: String
}

application promote

Promote an application version from one tenant to another.

Usage

bash
pfy application promote \
  --application-id <id> \
  --target-tenant-id <id> \
  --slug <slug> \
  [--version <version>] \
  [--update-version]

Flags

FlagAliasesRequiredDescription
--application-id--app-idYesSource application ID
--target-tenant-id--to-tenantYesTarget tenant ID to promote to
--slugYesApplication slug in the target tenant
--versionNoVersion to promote (defaults to project.yaml version)
--update-versionNoUpdate project.yaml with the promoted version (default: true)

Description

The promote command creates a new application instance in the target tenant with the specified version from the source application. This is useful for promoting tested application versions from development to staging or production environments.

--slug is required and is not defaulted from the source application. If the slug you pass already exists in the target tenant, the manager's promoteApplication mutation updates that application in place rather than creating a new one — so a guessed default could silently overwrite an unrelated app. Pass the target slug explicitly.

Examples

Promote from dev to staging:

bash
# Get application ID from dev tenant
APP_ID=$(pfy --verbose application list --tenant dev | awk '/\(web-app\)/ {getline; print $2}')

# Get staging tenant ID
STAGING_TENANT_ID=$(pfy --verbose tenant list --project my-project | awk '/\(staging\)$/ {getline; print $2}')

# Promote version 1.2.0 to staging
pfy application promote \
  --app-id $APP_ID \
  --to-tenant $STAGING_TENANT_ID \
  --slug web-app \
  --version 1.2.0

Promote to production:

bash
pfy application promote \
  --application-id aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee \
  --target-tenant-id 33333333-4444-5555-6666-777777777777 \
  --slug web-app \
  --version 2.0.0

Output:

Application promoted successfully: Web Application (web-app) v2.0.0

application copy

Copy an application from one tenant to another with a new slug and optional customizations.

Usage

bash
pfy application copy \
  --source-application-id <id> \
  --target-tenant-id <id> \
  --slug <slug> \
  [--name <name>] \
  [--version <version>] \
  [--update-version]

Flags

FlagAliasesRequiredDescription
--source-application-id--from-appYesSource application ID to copy from
--target-tenant-id--to-tenantYesTarget tenant ID to copy to
--slugYesApplication slug in target tenant
--nameNoApplication name (defaults to source name)
--versionNoVersion (defaults to project.yaml version, then source version)
--update-versionNoUpdate project.yaml with the copied version (default: false)

Examples

Basic copy:

bash
pfy application copy \
  --from-app aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee \
  --to-tenant 44444444-5555-6666-7777-888888888888 \
  --slug web-app-copy

Copy with custom name and version:

bash
pfy application copy \
  --source-application-id aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee \
  --target-tenant-id 44444444-5555-6666-7777-888888888888 \
  --slug customer-portal \
  --name "Customer Portal" \
  --version 1.0.0

application update-version

Update the version number of an existing application.

Usage

bash
pfy application update-version \
  --application-id <id> \
  --version <version>

Flags

FlagAliasesRequiredDescription
--application-id--app-idYesApplication ID
--versionYesNew version number

Examples

Update to new version:

bash
pfy application update-version \
  --app-id aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee \
  --version 1.3.0

Semantic version bump:

bash
# Patch version
pfy application update-version --app-id $APP_ID --version 1.2.1

# Minor version
pfy application update-version --app-id $APP_ID --version 1.3.0

# Major version
pfy application update-version --app-id $APP_ID --version 2.0.0

Version Promotion Workflow

Development to Production Pipeline

bash
# 1. Create application in dev tenant
DEV_TENANT_ID=$(pfy --verbose tenant list --project my-saas | awk '/\(dev\)$/ {getline; print $2}')
pfy application create \
  --tenant-id $DEV_TENANT_ID \
  --slug web-app \
  --name "Web Application" \
  --version 0.1.0

# 2. Get application ID
APP_ID=$(pfy --verbose application list --tenant dev | awk '/\(web-app\)/ {getline; print $2}')

# 3. Update version after testing
pfy application update-version --app-id $APP_ID --version 1.0.0

# 4. Promote to staging
STAGING_TENANT_ID=$(pfy --verbose tenant list --project my-saas | awk '/\(staging\)$/ {getline; print $2}')
pfy application promote \
  --app-id $APP_ID \
  --to-tenant $STAGING_TENANT_ID \
  --slug web-app \
  --version 1.0.0

# 5. After staging approval, promote to production
PROD_TENANT_ID=$(pfy --verbose tenant list --project my-saas | awk '/\(prod\)$/ {getline; print $2}')
pfy application promote \
  --app-id $APP_ID \
  --to-tenant $PROD_TENANT_ID \
  --slug web-app \
  --version 1.0.0

Multi-Tenant Deployment

bash
# Create base application
BASE_APP_ID="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"

# Copy to multiple customer tenants
for CUSTOMER in customer-a customer-b customer-c; do
  TENANT_ID=$(pfy --verbose tenant list --project my-saas | awk -v c="($CUSTOMER)" 'index($0,c) {getline; print $2}')
  pfy application copy \
    --from-app $BASE_APP_ID \
    --to-tenant $TENANT_ID \
    --slug web-app \
    --name "Web Application" \
    --version 1.0.0
done

GraphQL Operations for New Commands

PromoteApplication

graphql
mutation PromoteApplication($input: PromoteApplicationInput!) {
  promoteApplication(input: $input) {
    id
    slug
    name
    version
  }
}

Input Type:

graphql
input PromoteApplicationInput {
  applicationId: ID!
  targetTenantId: ID!
  slug: String!
  name: String
  version: String
}

CopyApplication

graphql
mutation CopyApplication($input: CopyApplicationInput!) {
  copyApplication(input: $input) {
    id
    slug
    name
    version
  }
}

Input Type:

graphql
input CopyApplicationInput {
  sourceApplicationId: ID!
  targetTenantId: ID!
  slug: String!
  name: String
  version: String
}

UpdateApplicationVersion

Uses the existing UpdateApplication mutation:

graphql
mutation UpdateApplication($id: ID!, $input: UpdateApplicationInput!) {
  updateApplication(id: $id, input: $input) {
    id
    slug
    name
    version
  }
}

See Also

  • project - Manage projects
  • tenant - Manage tenants
  • version - Manage project version
  • ci - CI/CD template generation