Configuration Reference
Complete reference for Angreal configuration files and options.
Template Configuration (angreal.toml)
Section titled “Template Configuration (angreal.toml)”The angreal.toml file defines template variables, user prompts, and validation rules for Angreal templates.
File Location
Section titled “File Location”- Templates:
angreal.tomlin the template root directory - Projects:
.angreal/angreal.tomlin initialized projects
Basic Structure
Section titled “Basic Structure”# Variable defaults (root level)project_name = "my-project"author_name = "Anonymous"license = "MIT"use_docker = falseport = 8080
# Custom prompts for variables[prompt]project_name = "Enter your project name"author_name = "Enter the author name"license = "Choose a license (MIT, Apache-2.0, GPL-3.0)"
# Validation rules for user input[validation]project_name.not_empty = trueproject_name.length_min = 3project_name.length_max = 50author_name.not_empty = truelicense.allowed_values = ["MIT", "Apache-2.0", "GPL-3.0"]port.type = "integer"port.min = 1024port.max = 65535use_docker.type = "boolean"Variable Types
Section titled “Variable Types”Only top-level scalar keys become template variables. The supported scalar types are string, boolean, and numeric (integer/float). Array values and [table] sections are not inserted into the template context — they are ignored when rendering.
String Variables
Section titled “String Variables”project_name = "default-name"description = "Default description"Boolean Variables
Section titled “Boolean Variables”use_docker = falseinclude_tests = trueNumeric Variables
Section titled “Numeric Variables”port = 8080timeout = 30version_major = 1Custom Prompts
Section titled “Custom Prompts”The [prompt] section customizes the text shown to users when they provide values:
[prompt]project_name = "Enter your project name"use_docker = "Include Docker support? (y/n)"license = "Choose a license (MIT, Apache-2.0, GPL-3.0)"Without custom prompts:
project_name:With custom prompts:
Enter your project name:Validation Rules
Section titled “Validation Rules”The [validation] section defines rules to validate user input:
String Validation
Section titled “String Validation”[validation]# Must not be emptyproject_name.not_empty = true
# Length constraintsusername.length_min = 3username.length_max = 20
# Regular expression matchingemail.regex_match = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"Numeric Validation
Section titled “Numeric Validation”[validation]# Type checkingage.type = "integer"price.type = "float"
# Range constraintsage.min = 18age.max = 65port.min = 1024port.max = 65535Choice Validation
Section titled “Choice Validation”[validation]# Restrict to specific valueslicense.allowed_values = ["MIT", "Apache-2.0", "GPL-3.0"]environment.allowed_values = ["development", "staging", "production"]Boolean Validation
Section titled “Boolean Validation”[validation]use_docker.type = "boolean"include_tests.type = "boolean"Validation Methods
Section titled “Validation Methods”| Method | Description | Example |
|---|---|---|
not_empty |
Field cannot be empty | field.not_empty = true |
length_min |
Minimum string length | field.length_min = 3 |
length_max |
Maximum string length | field.length_max = 50 |
min |
Minimum numeric value | field.min = 0 |
max |
Maximum numeric value | field.max = 100 |
type |
Type validation | field.type = "integer" |
allowed_values |
Restrict to specific values | field.allowed_values = ["a", "b"] |
regex_match |
Regular expression validation | field.regex_match = "^[a-z]+$" |
Error Messages
Section titled “Error Messages”When validation fails, Angreal shows descriptive error messages:
- not_empty: “Field cannot be empty”
- length_min: “Must be at least 3 characters”
- length_max: “Must be at most 50 characters”
- min/max: “Value must be between 18 and 65”
- type: “Value must be an integer”
- allowed_values: “Input must be one of: MIT, Apache-2.0, GPL-3.0”
- regex_match: “Input must match the pattern”
Environment Variables
Section titled “Environment Variables”Angreal supports these environment variables:
ANGREAL_DEBUG
Section titled “ANGREAL_DEBUG”Enable debug logging:
export ANGREAL_DEBUG=trueangreal init template/angreal init takes a single positional argument: the template. The output
directory is determined by the template’s top-level templated directory (its
name variable), not by a second positional argument.
Values:
true- Enable debug logging- Any other value - Normal logging
Relationship to -v/--verbose flags:
Setting ANGREAL_DEBUG=true forces debug-level logging and takes precedence
over the CLI verbosity flags. When ANGREAL_DEBUG=true, angreal uses debug
level and does not apply the -v count; the -v/-vv/-vvv flags are only
consulted when ANGREAL_DEBUG is unset.
For reference, the verbosity mapping is:
| Flag | Log level |
|---|---|
| (none) | Warnings only |
-v |
Info |
-vv |
Debug |
-vvv |
Trace |
See Global Options → Verbose Levels in the CLI reference for details on the flags themselves.
UV Configuration
Section titled “UV Configuration”UV-related environment variables for virtual environment management:
# Custom UV cache directoryexport UV_CACHE_DIR="/path/to/cache"
# Custom UV installation directoryexport UV_INSTALL_DIR="/path/to/uv"
# Disable UV progress barsexport UV_NO_PROGRESS=1See Install & Configure uv for complete details.
Global Cache Directory
Section titled “Global Cache Directory”Angreal caches Git templates in:
- Location:
~/.angrealrc/ - Purpose: Stores cloned Git repositories to avoid re-downloading
- Automatic: Created and managed automatically
Project Detection
Section titled “Project Detection”Angreal detects projects by walking up the directory tree looking for .angreal/ directories.
Example directory structure:
my-project/├── .angreal/│ ├── angreal.toml│ └── task_*.py├── src/└── README.mdWhen you run angreal commands from any subdirectory of my-project/, Angreal finds the .angreal/ directory and loads project-specific tasks.
Complete Example
Section titled “Complete Example”Here’s a comprehensive angreal.toml for a Python web application template:
# Project variables with defaultsproject_name = "my-webapp"project_description = "A Python web application"author_name = "Your Name"author_email = "you@example.com"license = "MIT"python_version = "3.11"use_docker = falseuse_database = truedatabase_type = "postgresql"include_tests = trueinclude_docs = false
# Database configuration[database]host = "localhost"port = 5432name = "webapp_db"
# API configuration[api]version = "v1"port = 8000base_url = "/api/v1"
# Dependenciesdependencies = ["fastapi", "uvicorn", "sqlalchemy"]dev_dependencies = ["pytest", "black", "flake8"]
# Custom prompts[prompt]project_name = "Enter your project name (lowercase, no spaces)"project_description = "Brief description of your web application"author_name = "Your full name"author_email = "Your email address"license = "Choose a license (MIT, Apache-2.0, GPL-3.0)"python_version = "Python version (3.8, 3.9, 3.10, 3.11)"use_docker = "Include Docker support? (y/n)"use_database = "Include database support? (y/n)"database_type = "Database type (postgresql, mysql, sqlite)"
# Validation rules[validation]project_name.not_empty = trueproject_name.length_min = 3project_name.length_max = 30project_name.regex_match = "^[a-z][a-z0-9_-]*$"
author_name.not_empty = trueauthor_name.length_min = 2
author_email.not_empty = trueauthor_email.regex_match = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
license.allowed_values = ["MIT", "Apache-2.0", "GPL-3.0"]
python_version.allowed_values = ["3.8", "3.9", "3.10", "3.11"]
database_type.allowed_values = ["postgresql", "mysql", "sqlite"]
database.port.type = "integer"database.port.min = 1database.port.max = 65535
api.port.type = "integer"api.port.min = 1024api.port.max = 65535
use_docker.type = "boolean"use_database.type = "boolean"include_tests.type = "boolean"include_docs.type = "boolean"See Also
Section titled “See Also”- Template Development - Creating templates with configuration
- CLI Reference - Command-line options and usage
- Tera Templating - Template syntax reference