Git isolates files.
fed isolates the stack.

Run your app natively and its dependencies in Docker from one fed.yaml. Give every Git worktree and coding agent its own ports, containers, and volumes—and stop copy-pasting .env files across checkouts and teammates.

Getting-started guide

MIT-licensed CLI · runs locally with no account required.

~/app main checkout
$ fed start
Starting: api (with deps: database)
database: Healthy
api: Healthy
API running on http://localhost:8080
$ fed ports list
5432 DB_PORT
8080 API_PORT
~/app-agent-1 isolated Git worktree
$ fed isolate enable
Isolation mode enabled. Allocated ports:
54318 DB_PORT
58080 API_PORT
$ fed start
database: Healthy
api: Healthy
API running on http://localhost:58080
Same fed.yaml, two live stacks — each checkout gets its own Postgres container, volume, and allocated ports without colliding.

One full stack per Git worktree.

Run parallel branches and coding agents without port, container, or database collisions. fed uses the checkout directory as the isolation boundary, so no editor plugin or agent wrapper is required.

Worktrees and coding agents
Auto-allocated ports
Every type: port parameter gets a conflict-free port in an isolated worktree, and every service, URL, and script receives it automatically.
Scoped containers, volumes, and state
Docker container names, named volumes, generated secrets, and .fed/ state stay bound to the checkout. Nothing leaks across branches.
Main checkout stays untouched
Enabling isolation in a worktree never disturbs your primary checkout’s ports or database.
AGENTS.md · CLAUDE.md
Run `fed isolate enable` before any other fed command in a new worktree.
Run project tasks through fed so they receive this worktree's ports and credentials.
Run `fed clean` before removing the worktree.

Stop copy-pasting .env files.

A missing API key shouldn’t stall a new worktree or a new teammate. Generate local secrets automatically, or link the repo with fed link org/project so fed start injects shared dev credentials into every checkout.

How team secrets work
optional team vaultinjected at fed start
$ fed login
Signed in as you@example.com · org: acme
$ fed start
✓ resolved 4 secrets from acme/web
  • Out of Git and shell history. Values stay out of repositories, logs, and list responses; admins update values via fed secrets set NAME from stdin or a hidden prompt.
  • Memory-only by default, offline when you want it. Vault values stay in fed and its child processes unless you opt into secret_cache: file (mode 0600, Git-ignored).
  • Dev keys and private registries. Share Google Maps, Stripe, or OAuth dev keys—plus read-only pull tokens so teammates skip manual docker login.
Free for three people then €8 / seat / month · billing never blocks fed start

Built for development credentials, not production secrets. The open-source CLI and local type: secret generation work completely offline without an account.

Your local setup, executable in fed.yaml.

Define Docker dependencies, native host processes, installs, migrations, and health checks in one dependency graph. Every checkout runs the same setup with fed start.

Install once, migrate on every start
install handles one-time dependency setup. migrate runs repeatable schema or seed steps before your app boots.
Wait for readiness, not sleep 5
depends_on waits for the healthcheck to pass, not just for the container to exist. Your API starts only after Postgres reports ready.
Declare typed values once
{{API_PORT}} and {{DB_PASSWORD}} flow into environments, healthchecks, and scripts—so every worktree gets fresh values automatically.
Configuration reference
fed.yamla complete local stack
parameters:
  API_PORT: { type: port, default: 8080 }
  DB_PORT: { type: port, default: 5432 }
  DB_PASSWORD: { type: secret }
  DATABASE_URL:
    type: string
    default: "postgres://app:{{DB_PASSWORD}}@localhost:{{DB_PORT}}/app"

services:
  database:
    image: postgres:16-alpine
    ports: ["{{DB_PORT}}:5432"]
    volumes: ["app-data:/var/lib/postgresql/data"]
    environment:
      POSTGRES_USER: app
      POSTGRES_PASSWORD: "{{DB_PASSWORD}}"
      POSTGRES_DB: app
    healthcheck:
      command: pg_isready -U app -d app

  api:
    process: npm run dev
    depends_on: [database]
    install: npm install
    migrate: npm run db:migrate
    startup_message: "API running on http://localhost:{{API_PORT}}"
    environment:
      PORT: "{{API_PORT}}"
      DATABASE_URL: "{{DATABASE_URL}}"
    healthcheck:
      http_get: "http://localhost:{{API_PORT}}/health"

scripts:
  db:studio:
    depends_on: [database]
    environment:
      DATABASE_URL: "{{DATABASE_URL}}"
    script: npm run db:studio

entrypoint: api

Run tests against throwaway stacks.

Put database tools, seeds, and integration tests under scripts. A task reuses running services—or spins up a fresh, isolated database with isolated: true and cleans it up when done.

Scripts and isolated test runs
fed.yamlan isolated integration test
scripts:
  test:integration:
    isolated: true
    depends_on: [database]
    environment:
      DATABASE_URL: "{{DATABASE_URL}}"
    script: npm run test:integration
Starts what’s missing, stops what it started
Run fed run db:studio or fed run test:integration on a cold checkout and fed boots dependencies, passes the right ports and secrets, and cleans up after.
Leaves your dev database alone
isolated: true allocates a fresh container and port for the test run so integration tests never wipe your working data.

Use fed when

  • You run multiple checkouts at once—Git worktrees, parallel branches, or coding agents.
  • You’re tired of pasting .env files and API keys into every new worktree or teammate’s laptop.
  • Your app runs natively on the host while Postgres, Redis, or queues run in Docker.
  • Integration tests and local scripts need real dependencies started in health-checked order.

fed runs local development environments. It does not deploy applications.

Why I built fed

I built fed because I kept fighting port collisions across Git worktrees and copy-pasting .env files for API keys every time I spun up a fresh checkout or brought a teammate onto a repo.

I hope it saves you the same friction. If something gets in your way, open an issue or fork it. The CLI is MIT licensed.