Skip to content

project

Manage ProductifyFW projects - the top-level organizational unit.

Synopsis

bash
pfy project <subcommand> [flags]

Aliases: p

Description

Projects are the highest level of organization in ProductifyFW. Each project can contain multiple tenants and serves as a complete product or service unit.

Subcommands

  • list - List all projects
  • create - Create a new project
  • get - Get project details by slug

project list

List all projects you have access to.

Usage

bash
pfy project list [flags]

Example

bash
pfy project list

Output:

Projects:
  - My SaaS Platform (my-saas): A multi-tenant SaaS application
  - E-commerce Store (ecommerce): Online retail platform

Verbose output:

bash
pfy --verbose project list
Connecting to ProductifyFW manager...
Fetching projects list...
Found 2 project(s)
Projects:
  - My SaaS Platform (my-saas): A multi-tenant SaaS application
    ID: 01234567-89ab-cdef-0123-456789abcdef
  - E-commerce Store (ecommerce): Online retail platform
    ID: 12345678-9abc-def0-1234-56789abcdef0

project create

Create a new project with a unique slug.

Usage

bash
pfy project create --slug <slug> --name <name> [--description <desc>]

Flags

FlagRequiredDescription
--slugYesProject slug (unique identifier, lowercase, hyphen-separated)
--nameYesProject display name
--descriptionNoProject description

Examples

Basic creation:

bash
pfy project create \
  --slug my-project \
  --name "My Project"

With description:

bash
pfy project create \
  --slug my-saas \
  --name "My SaaS Platform" \
  --description "A multi-tenant SaaS application for customer management"

Output:

Project created successfully: My SaaS Platform (my-saas)

Verbose output:

bash
pfy --verbose project create \
  --slug my-saas \
  --name "My SaaS Platform" \
  --description "A multi-tenant SaaS application"
Connecting to ProductifyFW manager...
Creating project with slug 'my-saas'...
Project created successfully: My SaaS Platform (my-saas)
  ID: 01234567-89ab-cdef-0123-456789abcdef

project get

Retrieve detailed information about a specific project.

Usage

bash
pfy project get --slug <slug>

Flags

FlagRequiredDescription
--slugYesProject slug

Example

bash
pfy project get --slug my-saas

Output:

Project: My SaaS Platform (my-saas)
Description: A multi-tenant SaaS application
ID: 01234567-89ab-cdef-0123-456789abcdef

GraphQL Operations

The project commands use these GraphQL operations:

GetProjects

graphql
query GetProjects(
  $filters: [FilterInput!]
  $order: [OrderInput!]
  $pagination: PaginationInput
) {
  projects(filters: $filters, order: $order, pagination: $pagination) {
    id
    slug
    name
    description
  }
}

GetProject

graphql
query GetProject($slug: String!) {
  project(slug: $slug) {
    id
    slug
    name
    description
  }
}

CreateProject

graphql
mutation CreateProject($input: CreateProjectInput!) {
  createProject(input: $input) {
    id
    slug
    name
    description
  }
}

Common Workflows

Create a complete project structure

bash
# Create project
pfy project create \
  --slug my-app \
  --name "My Application" \
  --description "Production application"

# Get project ID
PROJECT_ID=$(pfy project get --slug my-app | grep "ID:" | awk '{print $2}')

# Create development tenant
pfy tenant create \
  --project-id $PROJECT_ID \
  --slug dev \
  --name "Development"

# Create production tenant
pfy tenant create \
  --project-id $PROJECT_ID \
  --slug prod \
  --name "Production"

List and filter projects

bash
# List all projects
pfy project list

# With verbose details
pfy --verbose project list

# Quiet mode for scripting
pfy --quiet project list

Verify project exists

bash
if pfy project get --slug my-project &> /dev/null; then
    echo "Project exists"
else
    echo "Project not found"
fi

Best Practices

  1. Use descriptive slugs - Make them memorable and URL-friendly
  2. Include descriptions - Document the project's purpose
  3. Consistent naming - Follow a naming convention across projects
  4. Slug format - Use lowercase and hyphens: my-project-name

Error Handling

Project already exists

Error: failed to create project: project with slug 'my-project' already exists

Solution: Choose a different slug or update the existing project.

Project not found

Error: failed to get project: project 'nonexistent' not found

Solution: Verify the slug is correct using pfy project list.

Invalid slug format

Error: failed to create project: invalid slug format

Solution: Use lowercase letters, numbers, and hyphens only.

See Also