Skip to main content

Main Flow Structure (main.yaml)

The main.yaml file defines the flow's metadata and execution logic. By default, main.yaml is the primary file executed in Phlow, serving as the entry point for defining workflows and their associated configurations.

Structure

FieldDescription
mainSpecifies the main module, typically providing initial context (e.g., cli for command-line arguments).
nameA user-friendly name for the flow.
versionThe flow's semantic version.
descriptionA brief summary of the flow's purpose.
modulesA list of required modules (loaded using !include).
stepsThe sequence of steps the flow will execute.

Example

main: cli
name: Are you a student?
version: 1.0.0
description: Check if you are a student.
author: Your Name
modules: !include modules.yaml
steps:
# Flow execution steps

Custom Fields

It is possible to add custom fields to the main.yaml file to better suit your workflow's needs. For example, you can include fields like tags to categorize your flow or author to specify the creator of the flow.

These fields can help improve the organization and documentation of your workflows.

Example with custom fields:

main: cli
name: Are you a student?
version: 1.0.0
description: Check if you are a student.
author: Your Name
tags:
- education
- student
modules: !include modules.yaml
steps:
# Flow execution steps