---
url: /docs/guide.md
description: >-
  Learn to define tasks, supply inputs, control execution, configure the
  environment and output, and include other Taskfiles.
---

# Guide

Use the guide to learn a feature or solve a specific problem. If you are new to
Task, start with the [Quick Start](/docs/getting-started.md). For accepted keys,
flags and functions, use the [Taskfile Schema](/docs/reference/schema.md),
[CLI](/docs/reference/cli.md) and [Templating](/docs/reference/templating.md)
references.

## Writing and running tasks {#writing-and-running-tasks}

* [Defining tasks](/docs/guide/defining-tasks.md): command lists, descriptions, aliases
  and display labels.
* [Running tasks](/docs/guide/running-tasks.md): choosing a Taskfile, running from other
  directories, previewing commands and using interactive applications.

## Variables and arguments {#variables-and-environment}

* [Variables](/docs/guide/variables.md): declaring values, computing them with shell
  commands, preserving types and understanding resolution order.
* [Command-line arguments](/docs/guide/arguments.md): assigning variables, forwarding
  arguments with `--` and capturing values from task names.
* [Validation and prompts](/docs/guide/required-variables.md): requiring inputs,
  restricting allowed values and asking for missing values.
* [Secret variables](/docs/guide/secret-variables.md): loading sensitive values and
  masking them in Task's command logs.

## Task execution {#controlling-what-runs}

* [Dependencies and task calls](/docs/guide/dependencies.md): running tasks concurrently
  or in sequence, limiting concurrency and controlling repeated calls.
* [Loops](/docs/guide/loops.md): repeating commands or task calls over values, files and
  matrices.
* [Conditional execution](/docs/guide/conditional-execution.md): skipping optional work
  with `if`, enforcing requirements with `preconditions` and asking for
  [confirmation](/docs/guide/conditional-execution.md#confirmation-prompts).
* [Errors and cleanup](/docs/guide/errors-and-cleanup.md): continuing after selected
  failures and running cleanup with `defer`.
* [Up-to-date checks](/docs/guide/up-to-date.md): skipping unchanged builds, checking for
  missing outputs and combining file checks with custom conditions.
* [Watch mode](/docs/guide/watch.md): rerunning tasks when source files change.

## Environment and output {#execution-environment}

* [Environment variables](/docs/guide/environment.md): setting the environment for
  commands and loading `.env` files.
* [Platforms and shells](/docs/guide/platforms.md): selecting platform-specific commands,
  understanding shell context and setting shell options.
* [Output and logging](/docs/guide/output.md): streaming, grouping and prefixing output,
  hiding command echoes and displaying CI annotations.

## Including Taskfiles {#composing-taskfiles}

* [Including Taskfiles](/docs/guide/includes.md): sharing tasks with namespaces,
  configuring includes and passing variables to them.
* [Remote Taskfiles](/docs/remote-taskfiles.md): loading Taskfiles over HTTP or Git
  and managing trust, checksums and cached copies.
