Skip to content

Fish Configuration Guide

🌐 Translations & Contributions: Want to translate or improve this document in your language? See our Translation Guidelines.

This guide describes how to configure Fish workspaces using fish.toml.


Configuration File Overview

Fish reads project configuration from a fish.toml file located in the root of your workspace. If no fish.toml is present, Fish applies sensible defaults automatically.

toml
[build]
backend = "rust"
jobs = 8
no_cache = false
sandbox = false
semantic = true
critical_path = true
ram_limit = 85

[cache]
dir = "~/.Fish/cache"
reflink = true

[remote]
cache_url = "http://127.0.0.1:8080"
token = "secret-cache-token"

[daemon]
port = 9527

[pipelines.build]
depends_on = ["^build"]
inputs = ["src/**/*", "Cargo.toml", "Cargo.lock"]
outputs = ["target/release/**/*"]

[pipelines.test]
depends_on = ["build"]
inputs = ["tests/**/*", "src/**/*"]

Top-Level Sections

[build] —" Execution Settings

KeyTypeDefaultDescription
backendstringAutoPrimary toolchain backend (rust, ts, go, cc, python, java, dotnet, docker).
jobsintegernum_cpusMaximum concurrent worker tasks.
no_cachebooleanfalseDisable local and remote cache lookup.
sandboxbooleanfalseExecute tasks in isolated sandbox environments.
semanticbooleanfalseEnable AST semantic change detection.
critical_pathbooleanfalsePrioritize bottlenecks on the dependency graph critical path.
ram_limitinteger (1-100)85Throttle concurrency when available system memory drops below this percentage.
timeoutintegerNoneTask execution timeout in seconds.

[cache] —" Local Storage Settings

KeyTypeDefaultDescription
dirstring~/.Fish/cachePath to the local Content-Addressable Storage (CAS) directory.
reflinkbooleantrueUse Copy-on-Write (CoW) extents or hardlinks to materialize artifacts without I/O copy.

[remote] —" Distributed Cache & Execution

KeyTypeDefaultDescription
cache_urlstringNoneRemote cache server endpoint (HTTP).
tokenstringNoneAuthentication bearer token for remote operations.
workerslist of strings[]List of remote worker cluster endpoints (e.g. ["worker1:9000", "worker2:9000"]).
send_sourcebooleanfalseCompress and transmit source snapshots to workers without shared filesystems.

[daemon] —" Background IPC Service

KeyTypeDefaultDescription
portinteger9527Loopback TCP port for the Fish background daemon.

[pipelines.<task>] —" Task Pipeline Topology

Configure dependencies and caching boundaries between tasks across packages:

toml
[pipelines.build]
depends_on = ["^build"]
inputs = ["src/**/*", "Cargo.toml"]
outputs = ["target/release/*"]

[pipelines.test]
depends_on = ["build"]
inputs = ["tests/**/*", "src/**/*"]
  • ^build: Topological dependency rule. Ensures that all dependency packages run their build task before the dependent package starts.
  • inputs: Micro-glob patterns. Only files matching these patterns affect the task fingerprint hash.
  • outputs: File paths to capture into the Content-Addressable Storage (CAS) upon task success.

Environment Variable Overrides

Configuration settings can be overridden via environment variables:

VariableOverrides
fish_CACHE_DIRcache.dir
fish_JOBSbuild.jobs
fish_REMOTE_CACHEremote.cache_url
fish_REMOTE_TOKENremote.token
fish_RAM_LIMITbuild.ram_limit
fish_DAEMON_PORTdaemon.port