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.
The folder
Section titled “The folder”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.
The project file: truss.yaml
Section titled “The project file: 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/.
Flow files
Section titled “Flow files”- A flow is a file directly in
.truss/flows/, named<name>.yamlor<name>.yml. - The file name without its extension is the name you type:
truss run buildruns.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.YAMLin capitals. If a flow is missing from the list, check this first. build.yamlnext tobuild.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.
.trussand.truss/flowsmust be real folders, not links, andflows/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.
The project folder
Section titled “The project folder”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.
What TRUSS writes: .truss/state/
Section titled “What TRUSS writes: .truss/state/”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/orcache/. Delete them yourself to start clean, or runtruss cache clear <name>for the cache. - The first time TRUSS creates
.truss/state, it writes.truss/.gitignorewithstate/, 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.