Skip to content

Configuration

Rivet can be configured using environment variables to control task execution, output formatting, and connection settings. These variables can be set directly in your environment or defined inside .env configuration files, which Rivet automatically discovers and loads.

Environment

Variable Description
RIVET_ASSUME_YES Assume "yes" as answer to all prompts.
RIVET_CACHE_EXPIRY_DURATION Expiry duration for cached remote Taskfiles.
RIVET_CERT_KEY Path to a client certificate key for HTTPS connections.
RIVET_CERT Path to a client certificate for HTTPS connections.
RIVET_COLOR Colored output. Enabled by default. Set flag to false or use NO_COLOR=1 to disable.
RIVET_CONCURRENCY Limit number of tasks to run concurrently.
RIVET_C_A_CERT Path to a custom CA certificate for HTTPS connections.
RIVET_DISABLE_FUZZY Disables fuzzy matching for task names.
RIVET_DRY Compiles and prints tasks in the order that they would be run, without executing them.
RIVET_FAILFAST When running tasks in parallel, stop all tasks if one fails.
RIVET_INSECURE Forces Task to download Taskfiles over insecure connections.
RIVET_INTERACTIVE Prompt for missing required variables.
RIVET_OFFLINE Forces Task to only use local or cached Taskfiles.
RIVET_OUTPUT_GROUP_BEGIN Group output beginning text.
RIVET_OUTPUT_GROUP_END Group output end text.
RIVET_OUTPUT_GROUP_ERROR_ONLY Print group output only on error.
RIVET_OUTPUT Output configuration.
RIVET_REMOTE_CACHE_DIR Directory to cache remote Taskfiles.
RIVET_TASKFILE Choose which Taskfile to run.
RIVET_TIMEOUT Timeout for downloading remote Taskfiles.
RIVET_TRUSTED_HOSTS List of trusted hosts for remote Taskfiles (comma-separated).

Config Files

Rivet may be configured with standard .env files. Configuration files are evaluated in order of precedence from highest to lowest:

Priority Source / Scope Location or Variable
1 Explicit Environment Override $RIVET_ENV
2 Local Workspace (Visible) ./rivet.env
3 Local Workspace (Hidden) ./.rivet.env
4 Taskfile Directory (Visible) rivet.env
5 Taskfile Directory (Hidden) .rivet.env
6 Modern Linux XDG Config Path ~/.config/rivet/rivet.env
7 Legacy User Home Directory ~/.rivet.env

Examples

Docker Compose

Config file

# config/rivet.env
RIVET_TASKFILE=/etc/rivet/Taskfile.yml

Taskfile

# tasks/Taskfile.yml
version: '3'

tasks:
  default:
    cmds:
      - echo "Hello, World!"

Docker Compose

# docker-compose.yml
version: '3.8'

services:
  rivet:
    image: ghcr.io/go-rivet/rivet:latest
    environment:
      - RIVET_ENV=/etc/rivet/rivet.env
    volumes:
      - ./config/rivet.env:/etc/rivet/rivet.env:ro
      - ./tasks/Taskfile.yml:/etc/rivet/Taskfile.yml:ro
    working_dir: /etc/rivet