fed documentation
fed runs your local dev stack — Docker containers, native processes, and Compose services — from one config file. This page gets you from install to a running stack. The rest of the docs are reference.
Install
# macOS / Linux (Homebrew)
brew install service-federation/tap/fed
# Prebuilt binary
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/service-federation/fed/releases/latest/download/fed-installer.sh | sh
# From source
cargo install --git https://github.com/service-federation/fed
First config
Create service-federation.yaml in your project root
(or run fed init for a starter config). Adapt it to your app —
this example assumes a Node backend in ./backend that reads PORT and serves /health:
parameters:
API_PORT:
type: port
default: 8080
DB_PORT:
type: port
default: 5432
services:
database:
image: postgres:15
ports: ["{{DB_PORT}}:5432"]
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: app
healthcheck:
command: pg_isready -U postgres
backend:
process: npm start
cwd: ./backend
depends_on: [database]
environment:
PORT: '{{API_PORT}}'
DATABASE_URL: 'postgres://postgres:password@localhost:{{DB_PORT}}/app'
healthcheck:
httpGet: 'http://localhost:{{API_PORT}}/health'
entrypoint: backend
Start it
fed start # Start services (polls healthchecks, backgrounds)
fed status # What's running
fed logs backend # View logs
fed stop # Stop all
Once the host runtimes and Docker are installed, that's the whole project-specific
workflow for the next teammate: git clone, fed start.
In a repo that already uses fed?
Joining a project that has a service-federation.yaml — or a coding agent
dropped into a worktree? Three rules keep you out of trouble:
- New worktree? Isolate first. Run
fed isolate enablebefore any other fed command — it persists, and everything after it gets this directory's own ports, containers, and volumes. - Run tasks through fed.
fed <script>(likefed test:integration) resolves the ports andDATABASE_URLthis directory was actually allocated; the same command run bare hits whichever checkout owns the default ports. Thescripts:section of the config lists what's available. - Never fix a port conflict with
--replacein a worktree — it kills the other checkout's services.fed isolate enableis the fix.
Isolation has the full story.
Troubleshooting
Services not starting?
fed logs <service> --tail 100
Port conflicts? Pick by cause:
fed isolate enable # Another checkout owns the ports: give this one its own
fed start --replace # A stray process squats on the port: kill it and start
In a worktree, always fed isolate enable — --replace would
kill the other checkout's services. See Isolation.
Reference
- Configuration — services, parameters, secrets, health checks, templates, profiles, packages, resource limits
- Commands — all commands, flags, and subcommands
- Team secrets — shared development secrets, local caching, and revocation boundaries
- Isolation — directory scoping, worktrees, coding agents
- Scripts — scripts with dependencies, isolated scripts, argument passing