Build a directory tree from a YAML description.
filefile (binary: ff) reads a YAML mapping and materializes it on disk.
Nested mappings become directories, string values become file contents, and
YAML tags like !git and !sh run commands in-place.
cargo install --path .This places ff on your PATH (via ~/.cargo/bin).
ff Filefile.yamlMaterializes the tree described by Filefile.yaml in the current directory.
The positional argument can also be an http:// or https:// URL β the
Filefile is streamed over HTTP and applied without ever touching disk:
ff https://example.com/Filefile.yamlFor safety, !git and !sh tags in a remote Filefile are rejected by
default (a remote Filefile is otherwise a remote-code-execution primitive).
Pass --allow-remote-ops to opt in when you trust the source:
ff --allow-remote-ops https://example.com/Filefile.yamlLocal Filefiles run tags unconditionally.
A Filefile is a YAML mapping. The key is the on-disk name; the value decides what kind of node it is:
| Value | Result |
|---|---|
"string" |
file with those contents |
{ ... } (mapping) |
directory containing the nested mapping |
null (empty value) |
empty file |
!git <url> |
git clone <url> into this node's path |
!sh "<cmd>" |
run <cmd>; its stdout becomes the file's contents |
hello:
world: "contents of the file"
here:
I: "am"
empty_file:
scripted:
marker: !sh "printf hi"
today: !sh "date -u +%Y-%m-%d"Applying this yields:
.
βββ hello/
β βββ world # "contents of the file"
β βββ here/
β β βββ I # "am"
β βββ empty_file # 0 bytes
βββ scripted/
βββ marker # "hi" (captured stdout)
βββ today # "2026-04-23"
The command runs with cwd set to the node's parent directory, so sibling files can be referenced by name. Stderr is inherited, so build errors still surface on your terminal.
ff apply -p <dir> -i <file>β explicit form. Apply<file>into<dir>.ff generate -p <dir> -sβ walk a directory tree and print its Filefile on stdout.
-d,--dry-runβ print the planned writes, mkdirs, and command invocations without touching the filesystem.-v,--verboseβ extra output on stderr.-f,--forceβ run operations that would otherwise warn.--allow-remote-opsβ permit!git/!shin Filefiles fetched over http(s).
cargo build
cargo test
cargo test -- --ignored # also runs the !git network testGPL-3.0. See LICENSE.