Overview
The.ftlignore file controls which files and directories are excluded when FTL creates project snapshots. It works similarly to .gitignore.
File Location
Place.ftlignore in your project root, next to .ftlconfig:
Always-Ignored Patterns
FTL automatically excludes these directories from all snapshots, even if not listed in.ftlignore:
ftl/ignore.py:3-20
The
.env file is always ignored to prevent your real credentials from entering the sandbox.Syntax
Basic Rules
- One pattern per line
- Lines starting with
#are comments - Blank lines are ignored
- Patterns are matched as directory/file names (not globs)
Example File
.ftlignore
Pattern Matching
FTL uses directory/file name matching, not full glob patterns. A pattern matches if it appears anywhere in the path.How Matching Works
ftl/ignore.py:41-46
Examples
Loading Process
FTL loads ignore patterns in two steps:- Built-in patterns - Always-ignored directories (see above)
.ftlignorefile - Additional project-specific patterns
ftl/ignore.py:23-38
Snapshot Behavior
When FTL creates a snapshot:- Walks the project directory tree from the root
- For each path, checks if any component matches the ignore set
- Skips the entire subtree if a match is found
- Copies non-ignored files to
~/.ftl/snapshots/<id>/(local) or S3 (if configured)
ftl/ignore.py:41-46
Common Use Cases
Ignoring Large Datasets
.ftlignore
Ignoring Generated Code
.ftlignore
Ignoring Documentation Builds
.ftlignore
Ignoring Temporary Files
.ftlignore
Debugging Ignored Files
To see which files would be included in a snapshot:~/.ftl/snapshots/<project-hash>/<id>/
Limitations
Best Practices
- Exclude build artifacts - These can be regenerated by the agent if needed
- Exclude dependencies - Use the
setuphook in.ftlconfigto install them - Exclude large files - Speeds up snapshot creation and reduces storage
- Keep sensitive files out -
.envis always ignored, but add others if needed
Integration with Rsync
For local snapshots, FTL usesrsync with exclude patterns generated from the ignore set:
Source Reference
- Always-ignore list:
ftl/ignore.py:3-20 - Load .ftlignore:
ftl/ignore.py:23-33 - Build ignore set:
ftl/ignore.py:36-38 - Should ignore check:
ftl/ignore.py:41-46