> ## Documentation Index
> Fetch the complete documentation index at: https://errand.nuvrel.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Write your first playbook and run your first task.

<Steps>
  <Step title="Create a playbook">
    Create a file named `main.ern` in your project:

    ```hcl theme={null}
    task "default" {
      description = "Build the project"
      commands    = ["go build ./..."]
    }
    ```
  </Step>

  <Step title="Run the task">
    ```bash theme={null}
    errand run
    ```

    When no task name is given, Errand runs the task named `default`.
  </Step>

  <Step title="Add variables and dependencies">
    Extend the playbook:

    ```hcl theme={null}
    variable "output" {
      description = "Output binary path"
      type        = string
      default     = "bin/app"
    }

    task "test" {
      description = "Run tests"
      commands    = ["go test ./..."]
    }

    task "build" {
      description = "Build the binary"
      depends_on  = [task.test]
      commands    = ["go build -o ${var.output} ./cmd/app"]
    }

    task "default" {
      description = "Test and build"
      depends_on  = [task.build]
      commands    = []
    }
    ```

    Run a specific task:

    ```bash theme={null}
    errand run build
    ```

    Override a variable:

    ```bash theme={null}
    errand run build --var output=bin/myapp
    ```
  </Step>

  <Step title="Run tasks in parallel">
    Use `--concurrency` to run independent tasks at the same time:

    ```bash theme={null}
    errand run --concurrency 4
    ```

    Pass `0` for no limit:

    ```bash theme={null}
    errand run --concurrency 0
    ```
  </Step>
</Steps>

## Next steps

<CardGroup cols={3}>
  <Card title="Playbook" icon="book" href="/language/index">
    Learn all the block types: errand, variable, computed, and task.
  </Card>

  <Card title="Functions" icon="florin-sign" href="/functions/index">
    Use built-in functions in expressions and commands.
  </Card>

  <Card title="CLI reference" icon="terminal" href="/cli/run">
    See all flags for the `errand run` command.
  </Card>
</CardGroup>
