Skip to content

Project and files

A project is a folder with a truss.yaml at its root. Its flows are files in .truss/flows/. This page covers the project file, how flow files are found and named, and the folders TRUSS writes.

my-project/
├── truss.yaml # the project file: name, description, shared env
└── .truss/
├── .gitignore # written by TRUSS: ignores state/
├── flows/ # your flows, one file each: commit these
│ ├── build.yaml
│ └── nightly.yml
└── state/ # written by runs: not committed
└── build/
├── run.log
└── data/
└── cache/

truss init creates the first two pieces for you.

truss.yaml
version: "1"
project:
name: my-project # required
description: Build and release tools # optional
env: # optional: for every flow of the project
REGION: eu
Key Required Meaning
version yes The string "1".
project.name yes Starts with a letter or digit, then letters, digits, ., _ or -.
project.description no Free text.
env no Variables for every flow of the project. The flow’s own env wins. Same rules as env, ${NAME} included.

Any other key is an error, and the error names the key. A truss.yaml with steps or jobs is rejected: flows belong in .truss/flows/.

  • A flow is a file directly in .truss/flows/, named <name>.yaml or <name>.yml.
  • The file name without its extension is the name you type: truss run build runs .truss/flows/build.yaml.
  • A name starts with a letter or digit, then letters, digits, ., _ or -. It does not end in a dot or a space, and it is not a Windows device name (CON, NUL, COM1 …).
  • Ignored: folders, links, hidden files (names that start with .), other extensions, and .YAML in capitals. If a flow is missing from the list, check this first.
  • build.yaml next to build.yml, or two files that differ only in letter case, are an error.
  • A file is at most 1 MiB. A file that cannot be read or parsed is an error; TRUSS never skips a broken flow.
  • .truss and .truss/flows must be real folders, not links, and flows/ holds at most 256 entries.

A flow outside .truss/flows/ runs by path: truss run ./other/build.yaml. Its name is the file name without its extension.

TRUSS looks for truss.yaml in the current folder only, never in a parent. Run commands from the project folder. If a command needs a project and finds none, it names the folder it looked in.

For each flow that runs with truss run, TRUSS keeps its files in .truss/state/<name>/:

Path Holds
run.log The log of the last finished run: the text truss run printed.
data/ The data folder, TRUSS_DATA_DIR. Your steps put what should stay between runs here.
data/cache/ The cache folder, TRUSS_CACHE_DIR.
  • TRUSS never empties data/ or cache/. Delete them yourself to start clean, or run truss cache clear <name> for the cache.
  • The first time TRUSS creates .truss/state, it writes .truss/.gitignore with state/, so git ignores generated files and keeps your flows. It never changes an existing .truss/.gitignore.
  • Flows run by the daemon keep their data in the TRUSS home instead: Where the daemon keeps things.