---
url: /firepit/cli.md
description: Firepit CLI Reference
---
# CLI
## Usage
```
fire [OPTIONS] [TASKS]... [VARS]...
```
## Arguments
### Tasks
One or more tasks to run. Tasks run in parallel by default, respecting dependencies.
### Vars
Template variables to override. Variable are in "Name=Value" format (e.g. `ENV=prod`, `DEBUG=true`)
## Options
### `-d, --dir
`
Working directory. Default is the same directory as `firepit.yml`.
### `-w, --watch`
Enable watch mode. Automatically re-run tasks when the input files change.
### `-f, --force`
Force the execution of only the specified tasks, ignoring dependencies.
### `--ff, --no-ff`
Enable or disable fail-fast mode.
In fail-fast mode, Firepit stops executing further tasks if any task fails.
It is enabled when CUI mode, and disabled when TUI mode by default.
### `--log-file `
Outputs Firepit debug log file to the specified path.
### `--log-level `
Log level of Firepit debug log. Options are: `error`, `warn`, `info`, `debug`, `trace`. Default is `info`.
### `--gantt-file `
Outputs a Gantt chart showing the execution time of each task in [Mermaid](https://mermaid.js.org/) format to the specified path.
### `--tui`
Force TUI mode, even if tty is not detected.
### `--cui`
Force CUI mode, even if tty is detected.
---
---
url: /firepit/configuration.md
description: Firepit Configuration Guide
---
# Configuration
Firepit configuration file is written in YAML format and named `firepit.yml`.
It defines tasks, services, dependencies, environment variables, and other settings for your project.
## Project Structure
Firepit can be used in single packages and monorepos.
### Single project
A single project contains a `firepit.yml` in the root directory.
### Multi project (monorepo)
A multi project contains multiple packages with their own `firepit.yml` files.
```
.
├── firepit.yml
└── packages/
├── client/
│ └── firepit.yml
└── server/
└── firepit.yml
```
The root `firepit.yml` defines subprojects and common tasks.
```yaml
projects:
client: packages/client
server: packages/server
tasks:
install:
command: bun install
```
Each `firepit.yml` in subprojects defines its own tasks.
::: code-group
```yaml [packages/client/firepit.yml]
tasks:
dev:
command: bun run dev
depends_on:
- "#install"
- server#dev
service: true
```
```yaml [packages/server/firepit.yml]
tasks:
dev:
command: bun run dev
depends_on:
- "#install"
service: true
```
:::
Tasks can be referenced across projects using the form `{project}#{task}`.
Note that the root project name is treated as an empty string, so you can reference root tasks with `#{task}`.
For example, to run client's dev task:
```bash
fire client#dev
```
Move to the client directory and run the dev task directly:
```bash
cd packages/client
fire dev
```
Run client & server dev tasks (because root project does not have dev task)
```bash
fire dev
```
This is how Firepit resolves which task to run:
```mermaid
flowchart LR
A(["Start"])
A --> B{"Task is in the form`{project}#{task}`?"}
B -->|Yes| C["Run the project's task"]
B -->|No| D{"Current directory?"}
D -->|Child| E["Run the task of the current project"]
D -->|Root| F{"Task defined in the root project?"}
F -->|Yes| G["Run the root project's task"]
F -->|No| H["Run all subprojects' task with the name"]
```
## Tasks and Services
Tasks and services are different in the following ways:
* **Tasks:** Run to completion and exit.
* **Services:** Long-running processes that stay active until stopped.
Services can be defined by setting `service: true` in the task definition.
```yaml
tasks:
dev:
command: bun run --hot src/index.ts
service: true
```
## Dependencies
Tasks can depend on other tasks using the `depends_on` field.
Dependency tasks are executed before the target task.
In this example, `install` and `compile` tasks are executed sequentially before the `build` task.
```yaml
tasks:
install:
command: bun install
compile:
command: bun build src/index.ts --compile --outfile dist/app
depends_on:
- install
build:
command: docker build -t single:latest .
depends_on:
- compile
```
## Service Readiness
When a service task is added to the dependencies, target task run immediately after the service starts by default.
In this example, the `dev` service may start before the `db` service is ready to accept connections.
```yaml
tasks:
dev:
command: bun run --hot src/index.ts
service: true
depends_on:
- install
- db
db:
command: redis-server
service: true
```
You can configure the `db` service to signal its readiness by using the `healthcheck` field.
There are two ways to define a healthcheck:
* **Command:** Runs a command periodically until it exits with a zero status.
* **Log:** Waits until log message appears that matches the given regex.
Most services become *Ready* when they start listening on a port, so you can easily check this with the `nc` (netcat) command.
By default, healthcheck command is run every 5 seconds, with a timeout of 5 seconds, and up to 3 retries.
```yaml
db:
command: redis-server
service:
healthcheck:
command: nc -z localhost 6379
# Default values
start_period: 0
interval: 5
timeout: 5
retries: 3
```
Sometimes it is sufficient to wait for a specific log output.
In such cases, you can configure the service to be considered *Ready* when a log message like `Ready to accept connections tcp` appears.
```yaml
db:
command: redis-server
service:
healthcheck:
log: Ready to accept connections tcp
```
## Template Variables
You can define template variables using the `vars` field.
```yaml
# Project level variables
vars:
aws_account_id: 123456789012
aws_region: ap-northeast-1
ecr_registry: "{{ aws_account_id }}.dkr.ecr.{{ aws_region }}.amazonaws.com"
tasks:
build:
# Task level variables
vars:
app_name: single
ecr_repository: "{{ ecr_registry }}/{{ app_name }}"
command: docker build -t {{ ecr_repository }}:latest .
```
Firepit performs template processing using [Tera](https://keats.github.io/tera/).
Check the documentation for details about the template syntax.
Template processing is supported in the following fields:
* `vars`
* `label`
* `command`
* `env`
* `env_files`
* `working_dir`
* `depends_on`
There are also some built-in variables available for use in templates.
| Name | Type | Description |
| -------------- | ------------------- | ---------------------------------------------------------------------- |
| `root_dir` | string | The absolute path of the root project dir. Multi-projects only. |
| `project_dirs` | Map\ | Map of all project names to their absolute paths. Multi-projects only. |
| `project_dir` | string | The absolute path of the current project directory. |
| `project` | string | The project name. Multi-projects only. |
| `task` | string | The task name. |
| `watch` | boolean | `true` if running in watch mode, `false` otherwise. |
## Environment Variables
Environment variables can be defined in the `env` field.
You can also specify [dotenv](https://github.com/motdotla/dotenv) files in the `env_files` field.
The precedence of environment variables is as follows:
1. Environment variables in the `env` field
2. Environment variables from each dotenv file listed in the `env_files` field.
If the same environment variable is defined in multiple files, the later file takes precedence.
3. OS environment variables
Note that dependency tasks do not inherit the environment variables of their parent task.
```yaml
# Project level environment variables
env:
TZ: Asia/Tokyo
# Project level dotenv files
env_files:
- .env
tasks:
dev:
command: bun run --hot src/index.ts
# Task level environment variables
env:
PORT: 3000
REDIS_URL: redis://localhost:6379
# Task level dotenv files.
# .env.local has a higher priority than .env
env_files:
- .env.local
- .env
depends_on:
- install
- db
service:
healthcheck:
command: nc -z localhost 3000
interval: 2
```
## Merging Config Files
You can merge multiple configuration files using `includes` field.
Starting from an empty YAML, files specified in `includes` are merged in order, followed by the original `firepit.yml`.
If the field name conflicts, merging strategy depends on the field type.
* number, string, boolean: the later one takes precedence.
* list: the later one is appended to the former one.
* map: merged recursively.
Assume we have the following files:
::: code-group
```yaml [common-vars.yml]
vars:
aws_account_id: 123456789012
aws_region: ap-northeast-1
```
```yaml [common-tasks.yml]
tasks:
install:
command: bun install
```
:::
::: code-group
```yaml [firepit.yml]
includes:
- common-vars.yml
- common-tasks.yml
vars:
ecr_registry: "{{ aws_account_id }}.dkr.ecr.{{ aws_region }}"
tasks:
dev:
command: bun run --hot src/index.ts
depends_on:
- install
```
:::
Then, the merged configuration is equivalent to:
```yaml
vars:
aws_account_id: 123456789012
aws_region: ap-northeast-1
ecr_registry: "{{ aws_account_id }}.dkr.ecr.{{ aws_region }}"
tasks:
install:
command: bun install
dev:
command: bun run --hot src/index.ts
depends_on:
- install
```
## Incremental Build
Firepit can skip tasks if there have been no changes since the last successful run that would produce different outputs.
This is called incremental build.
To enable incremental build, specify the `inputs` and `outputs` fields for each task.
You can use glob patterns to specify multiple files. Check the [globset documentation](https://docs.rs/globset/latest/globset/) for the supported syntax.
```yaml
tasks:
compile:
command: bun build src/index.ts --compile --outfile dist/app
inputs:
- src/**
outputs:
- dist/app
depends_on:
- install
```
The task will be skipped if the following conditions are met:
* There is at least one file matching the patterns specified in the `inputs` and `outputs` fields
* All files listed in `inputs` are older than the files listed in `outputs`.
## Watch Mode
In watch mode, Firepit monitors the files specified in the `inputs` field and automatically re-runs the task and dependents when changes are detected.
To enable watch mode, add `-w` or `--watch` option.
```bash
fire -w build
```
---
---
url: /firepit/getting-started.md
description: Guide for getting started with Firepit
---
# Getting Started
## Run the First Task
Create a `firepit.yml`.
```yaml
tasks:
# Task name
hello:
# The command to execute in shell
command: npx -y cowsay "hello,firepit"
```
Run `firepit` in the terminal. You can use the alias `fire`.
```bash
fire hello
```
Press `q` key to quit the TUI.
```
% #hello (Finished - Success, Restart: 0/0, Reload: 0, Elapsed: 1s)
_______________
< hello,firepit >
---------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
```
The task logs are preserved, and you can view them again even after exiting the TUI.
---
---
url: /firepit/installation.md
description: Installation methods for Firepit
---
# Installation
## Installer Script
To install the latest version of Firepit, run the following command.
```bash
curl -LsSf https://github.com/kota65535/firepit/releases/latest/download/firepit-installer.sh | sh
```
To install the specific version, replace the `{version}` placeholder with the desired version number.
```bash
curl -LsSf https://github.com/kota65535/firepit/releases/download/{version}/firepit-installer.sh | sh
```
## Mise
[Mise](https://mise.jdx.dev/) is a cross-platform package manager that acts as a "frontend" to a variety
of other package managers "backends" such as `asdf`, `ubi` and `github`.
If using Mise, we recommend using the `github` backend to install Firepit.
```shell [github]
mise use -g github:kota65535/firepit@latest
mise install
```
---
---
url: /firepit/schema.md
description: Firepit Configuration File Schema
---
# Schema
The JSON schema file is available [here](https://raw.githubusercontent.com/kota65535/firepit/main/schema.json).
Each property section is described as follows:
* **Type**: Type of the property. We use `Array<{item type}>` for arrays, `Map<{key type}, {value type}>` for objects.
* **Required**: Whether the property is required.
* **Default**: Default value of the property.
* **Options**: Available values of the property.
* **Template**: Whether the property is a template string. Only for `string` or types containing strings.
* **Description**: Description of the property.
## Project
### concurrency
* **Type:** integer
* **Required:** no
* **Default:** `Number of available CPU cores`
* **Description:** Task concurrency.
Valid only in a root project config.
```yaml
concurrency: 4
```
### depends\_on
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Description:** Dependency tasks for all the project tasks.
```yaml
depends_on:
- '#install'
```
### env
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Environment variables for all the project tasks.
```yaml
env:
TZ: Asia/Tokyo
```
### env\_files
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** yes
* **Description:** Dotenv files for all the project tasks.
In case of duplicated environment variables, the latter one takes precedence.
```yaml
env_files:
- .env
- .env.local
```
### gantt\_file
* **Type:** string
* **Required:** no
* **Template:** no
* **Description:** Gantt chart output file path.
Valid only in a root project config.
```yaml
gantt_file: gantt.svg
```
### includes
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** yes
* **Description:** Additional config files to be included.
```yaml
includes:
- common-vars.yml
- common-tasks.yml
```
### log
* **Type:** LogConfig
* **Required:** no
* **Default:** `{"file":null,"level":"info"}`
* **Description:** Log configuration.
Valid only in a root project config.
```yaml
log:
level: debug
file: "{{ root_dir }}/firepit.log"
```
### projects
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** no
* **Description:** Child projects.
Valid only in a root project config.
```yaml
projects:
client: packages/client
server: packages/server
```
### shell
* **Type:** ShellConfig
* **Required:** no
* **Default:** `{"args":["-c"],"command":"bash"}`
* **Description:** Shell configuration for all the project tasks.
```yaml
shell:
command: "bash"
args: ["-eux", "-c"]
```
### tasks
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** no
* **Description:** Task definitions.
### ui
* **Type:** UI
* **Required:** no
* **Default:** `cui`
* **Description:** UI configuration.
Valid only in a root project config.
```yaml
ui: cui
```
### vars
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Template variables for all the project tasks.
```yaml
vars:
aws_account_id: 123456789012
aws_region: ap-northeast-1
ecr_registry: "{{ aws_account_id }}.dkr.ecr.{{ aws_region }}.amazonaws.com"
```
### working\_dir
* **Type:** string
* **Required:** no
* **Default:** `.`
* **Template:** yes
* **Description:** Working directory for all the project tasks.
```yaml
working_dir: src
```
## DependsOnConfig
* **Type:** string | DependsOnConfigStruct
* **Template:** yes
## DependsOnConfigStruct
### cascade
* **Type:** boolean
* **Required:** no
* **Default:** `true`
* **Description:** Whether the task restarts if this dependency task restarts.
### task
* **Type:** string
* **Required:** yes
* **Template:** yes
* **Description:** Dependency task name
### vars
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Variables to override the dependency task vars.
## ExecProbeConfig
### command
* **Type:** string
* **Required:** yes
* **Template:** yes
* **Description:** Command to check if the service is ready
### env
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Environment variables. Merged with the task `env`.
### env\_files
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** yes
* **Description:** Dotenv files. Merged with the task `env_files`.
### interval
* **Type:** integer
* **Required:** no
* **Default:** `5`
* **Description:** Interval in seconds.
The command will run interval seconds after the task is started,
and then again interval seconds after each previous check completes.
### retries
* **Type:** integer
* **Required:** no
* **Default:** `3`
* **Description:** Number of consecutive readiness-check failures allowed before giving up.
### shell
* **Type:** ShellConfig
* **Required:** no
* **Description:** Shell configuration
### start\_period
* **Type:** integer
* **Required:** no
* **Default:** `0`
* **Description:** Initialization period in seconds.
Probe failure during that period will not be counted towards the maximum number of retries.
### timeout
* **Type:** integer
* **Required:** no
* **Default:** `5`
* **Description:** Timeout in seconds
### working\_dir
* **Type:** string
* **Required:** no
* **Template:** yes
* **Description:** Working directory
## HealthCheckConfig
* **Type:** LogProbeConfig | ExecProbeConfig
## LogConfig
### file
* **Type:** string
* **Required:** no
* **Template:** no
* **Description:** Log file path.
### level
* **Type:** string
* **Required:** no
* **Default:** `info`
* **Template:** no
* **Description:** Log level. Valid values: error, warn, info, debug, trace
## LogProbeConfig
### log
* **Type:** string
* **Required:** yes
* **Template:** yes
* **Description:** Log regex pattern to determine the task service is ready
### timeout
* **Type:** integer
* **Required:** no
* **Default:** `20`
* **Description:** Timeout in seconds
## Restart
* **Type:** string
* **Options:** `always`, `on-failure`, `never`
* **Template:** no
## ServiceConfig
* **Type:** boolean | ServiceConfigStruct
## ServiceConfigStruct
### healthcheck
* **Type:** HealthCheckConfig
* **Required:** no
* **Description:** Readiness probe configuration
### restart
* **Type:** Restart
* **Required:** no
* **Default:** `never`
* **Description:** Restart policy
## ShellConfig
### args
* **Type:** Array\
* **Required:** no
* **Default:** `["-c"]`
* **Template:** no
* **Description:** Arguments of the shell command.
### command
* **Type:** string
* **Required:** no
* **Default:** `bash`
* **Template:** no
* **Description:** Shell command.
## TaskConfig
### command
* **Type:** string
* **Required:** no
* **Template:** yes
* **Description:** Command to run
### depends\_on
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Description:** Dependency tasks
### description
* **Type:** string
* **Required:** no
* **Template:** no
* **Description:** Description
### env
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Environment variables. Merged with the project `env`.
### env\_files
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** yes
* **Description:** Dotenv files. Merged with the project `env_files`.
### inputs
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** no
* **Description:** Inputs file glob patterns
### label
* **Type:** string
* **Required:** no
* **Template:** yes
* **Description:** Label to display instead of the task name.
### outputs
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** no
* **Description:** Output file glob patterns
### service
* **Type:** ServiceConfig
* **Required:** no
* **Description:** Service configurations
### shell
* **Type:** ShellConfig
* **Required:** no
* **Description:** Shell configuration
### vars
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Template variables. Merged with the project `vars`.
Can be used at `label`, `command`, `working_dir`, `env`, `env_files`, `depends_on`, `depends_on.{task, vars}`,
`service.healthcheck.log` and `service.healthcheck.exec.{command, working_dir, env, env_files}`
### working\_dir
* **Type:** string
* **Required:** no
* **Template:** yes
* **Description:** Working directory
```yaml
working_dir: dist
```
## UI
* **Type:** string
* **Options:** `cui`, `tui`
* **Template:** no
---
---
url: /firepit/tui.md
description: Firepit Terminal UI Guide
---
# TUI
Firepit provides a TUI (Terminal User Interface) to monitor and interact with running tasks and services.

## Task Status
The sidebar on the left displays a list of running tasks and their statuses.
The highlighted task is the currently selected task whose logs are shown in the main view.
Task statuses are indicated by the following icons:
| Icon | Name | Detail |
| ---- | ---------- | ------------------------------------------------------- |
| 🪵 | Planned | The task is waiting for running |
| 🔥 | Running | The task is currently executing |
| ✅ | Success | The task has completed successfully |
| 🍖 | Ready | The service task is ready to use |
| 🥬 | Up to date | The task is already up to date and does not need to run |
| ❌ | Failure | The task has completed with an error |
| 🚫 | Stopped | The task has been manually stopped |
| ⚠️ | Skipped | The task has been skipped due to failed dependencies |
## Main View
The main view on the right displays real-time logs of the selected task.
You can scroll through the logs using mouse wheel or keyboard.
### Log Search
To search logs, press `/` to open the search bar. Type the search query and press `Enter`.
The search results are highlighted in the logs, and you can navigate through the results using `n` (next) and `N` (previous) keys.
Press `Esc` to remove the search results.
### Interaction
Some commands require user inputs such as Yes/No. Firepit supports these interactive commands.
You can switch to "Interaction mode" and enter the shell of the currently selected task by pressing the `Enter` key.
At this time, keyboard inputs are sent directly to the task's standard input.
To exit interaction mode, press `Ctrl-Z`.
## TUI vs CUI
TUI is available if tty is detected (in most cases, when you run Firepit in a terminal).
If tty is not detected, such as CI environments, Firepit runs tasks with CUI mode and stream logs directly to stdout.

---
---
url: /firepit/schema-body.md
---
## Project
### concurrency
* **Type:** integer
* **Required:** no
* **Default:** `Number of available CPU cores`
* **Description:** Task concurrency.
Valid only in a root project config.
```yaml
concurrency: 4
```
### depends\_on
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Description:** Dependency tasks for all the project tasks.
```yaml
depends_on:
- '#install'
```
### env
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Environment variables for all the project tasks.
```yaml
env:
TZ: Asia/Tokyo
```
### env\_files
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** yes
* **Description:** Dotenv files for all the project tasks.
In case of duplicated environment variables, the latter one takes precedence.
```yaml
env_files:
- .env
- .env.local
```
### gantt\_file
* **Type:** string
* **Required:** no
* **Template:** no
* **Description:** Gantt chart output file path.
Valid only in a root project config.
```yaml
gantt_file: gantt.svg
```
### includes
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** yes
* **Description:** Additional config files to be included.
```yaml
includes:
- common-vars.yml
- common-tasks.yml
```
### log
* **Type:** LogConfig
* **Required:** no
* **Default:** `{"file":null,"level":"info"}`
* **Description:** Log configuration.
Valid only in a root project config.
```yaml
log:
level: debug
file: "{{ root_dir }}/firepit.log"
```
### projects
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** no
* **Description:** Child projects.
Valid only in a root project config.
```yaml
projects:
client: packages/client
server: packages/server
```
### shell
* **Type:** ShellConfig
* **Required:** no
* **Default:** `{"args":["-c"],"command":"bash"}`
* **Description:** Shell configuration for all the project tasks.
```yaml
shell:
command: "bash"
args: ["-eux", "-c"]
```
### tasks
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** no
* **Description:** Task definitions.
### ui
* **Type:** UI
* **Required:** no
* **Default:** `cui`
* **Description:** UI configuration.
Valid only in a root project config.
```yaml
ui: cui
```
### vars
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Template variables for all the project tasks.
```yaml
vars:
aws_account_id: 123456789012
aws_region: ap-northeast-1
ecr_registry: "{{ aws_account_id }}.dkr.ecr.{{ aws_region }}.amazonaws.com"
```
### working\_dir
* **Type:** string
* **Required:** no
* **Default:** `.`
* **Template:** yes
* **Description:** Working directory for all the project tasks.
```yaml
working_dir: src
```
## DependsOnConfig
* **Type:** string | DependsOnConfigStruct
* **Template:** yes
## DependsOnConfigStruct
### cascade
* **Type:** boolean
* **Required:** no
* **Default:** `true`
* **Description:** Whether the task restarts if this dependency task restarts.
### task
* **Type:** string
* **Required:** yes
* **Template:** yes
* **Description:** Dependency task name
### vars
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Variables to override the dependency task vars.
## ExecProbeConfig
### command
* **Type:** string
* **Required:** yes
* **Template:** yes
* **Description:** Command to check if the service is ready
### env
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Environment variables. Merged with the task `env`.
### env\_files
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** yes
* **Description:** Dotenv files. Merged with the task `env_files`.
### interval
* **Type:** integer
* **Required:** no
* **Default:** `5`
* **Description:** Interval in seconds.
The command will run interval seconds after the task is started,
and then again interval seconds after each previous check completes.
### retries
* **Type:** integer
* **Required:** no
* **Default:** `3`
* **Description:** Number of consecutive readiness-check failures allowed before giving up.
### shell
* **Type:** ShellConfig
* **Required:** no
* **Description:** Shell configuration
### start\_period
* **Type:** integer
* **Required:** no
* **Default:** `0`
* **Description:** Initialization period in seconds.
Probe failure during that period will not be counted towards the maximum number of retries.
### timeout
* **Type:** integer
* **Required:** no
* **Default:** `5`
* **Description:** Timeout in seconds
### working\_dir
* **Type:** string
* **Required:** no
* **Template:** yes
* **Description:** Working directory
## HealthCheckConfig
* **Type:** LogProbeConfig | ExecProbeConfig
## LogConfig
### file
* **Type:** string
* **Required:** no
* **Template:** no
* **Description:** Log file path.
### level
* **Type:** string
* **Required:** no
* **Default:** `info`
* **Template:** no
* **Description:** Log level. Valid values: error, warn, info, debug, trace
## LogProbeConfig
### log
* **Type:** string
* **Required:** yes
* **Template:** yes
* **Description:** Log regex pattern to determine the task service is ready
### timeout
* **Type:** integer
* **Required:** no
* **Default:** `20`
* **Description:** Timeout in seconds
## Restart
* **Type:** string
* **Options:** `always`, `on-failure`, `never`
* **Template:** no
## ServiceConfig
* **Type:** boolean | ServiceConfigStruct
## ServiceConfigStruct
### healthcheck
* **Type:** HealthCheckConfig
* **Required:** no
* **Description:** Readiness probe configuration
### restart
* **Type:** Restart
* **Required:** no
* **Default:** `never`
* **Description:** Restart policy
## ShellConfig
### args
* **Type:** Array\
* **Required:** no
* **Default:** `["-c"]`
* **Template:** no
* **Description:** Arguments of the shell command.
### command
* **Type:** string
* **Required:** no
* **Default:** `bash`
* **Template:** no
* **Description:** Shell command.
## TaskConfig
### command
* **Type:** string
* **Required:** no
* **Template:** yes
* **Description:** Command to run
### depends\_on
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Description:** Dependency tasks
### description
* **Type:** string
* **Required:** no
* **Template:** no
* **Description:** Description
### env
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Environment variables. Merged with the project `env`.
### env\_files
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** yes
* **Description:** Dotenv files. Merged with the project `env_files`.
### inputs
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** no
* **Description:** Inputs file glob patterns
### label
* **Type:** string
* **Required:** no
* **Template:** yes
* **Description:** Label to display instead of the task name.
### outputs
* **Type:** Array\
* **Required:** no
* **Default:** `[]`
* **Template:** no
* **Description:** Output file glob patterns
### service
* **Type:** ServiceConfig
* **Required:** no
* **Description:** Service configurations
### shell
* **Type:** ShellConfig
* **Required:** no
* **Description:** Shell configuration
### vars
* **Type:** Map\
* **Required:** no
* **Default:** `{}`
* **Template:** yes
* **Description:** Template variables. Merged with the project `vars`.
Can be used at `label`, `command`, `working_dir`, `env`, `env_files`, `depends_on`, `depends_on.{task, vars}`,
`service.healthcheck.log` and `service.healthcheck.exec.{command, working_dir, env, env_files}`
### working\_dir
* **Type:** string
* **Required:** no
* **Template:** yes
* **Description:** Working directory
```yaml
working_dir: dist
```
## UI
* **Type:** string
* **Options:** `cui`, `tui`
* **Template:** no