Switchyard: a local gateway that builds and runs only the services you are working on, and quietly sends everything else to dev. Open source, a .NET tool, made for humans and coding agents alike.

Our platform at OGOship is thirteen .NET services with an MCP gateway in front of them — fourteen processes — plus two Vue frontends and a Postgres database for the gateway’s tool catalog. Orders, products, merchants, notifications, tracking, labels, warehouses, and so on. Each one has its own port, its own config and its own idea of how long it takes to start.
For a long time we ran all of them locally with process-compose, and I want to say this clearly: process-compose is a great tool. One YAML file, dependencies with health checks, restarts, a terminal UI, a REST API. It took us from “open fourteen terminal tabs” to ./start, and I would recommend it to anyone.
It wasn’t frictionless for us, though. On our Macs the .NET services jammed every now and then: a service that didn’t shut down in time kept holding its port, the restart failed with “address already in use”, and you went hunting for the process to kill. Part of that is dotnet run itself — it is two processes, the SDK and your app, and stopping one does not always take the other with it.
And above all, it answers one question — which processes are running — and we kept needing a second one: where should a request go? On a normal day I change one service, maybe two. The other twelve are already running perfectly well on our dev environment; they are deployed there after every merge. Still, to test my one change I started all fourteen, waited while the dotnet runs fought over the CPU, and kept a pile of ngrok tunnels for the callbacks that need a public URL.
So I wanted a bit more: run the service I’m working on, borrow the rest from dev, and let one tool know both.

Switch, don’t start
Switchyard is one local entry point for all the services, and the paths are the same as in the deployed environment:
http://localhost:8088/api/os/... ──▶ Order Service, built and run from my checkout
http://localhost:8088/api/ps/... ──▶ https://dev-api.example.com/api/ps/...
http://localhost:8088/api/ns/... ──▶ https://dev-api.example.com/api/ns/...
Every service is either local or goes to the backup environment. You flip a service with the space bar. Flip it local and Switchyard builds it and starts it. Flip it back and it stops the process, and from that moment the same URL goes to dev again. The frontend running on my machine never notices — it only ever talks to localhost:8088.
The backup is one setting for all services: dev, beta, or whatever environments you configure. Prod is there too when you really need to reproduce something with live data, and the UI shows a red warning for as long as it is selected, because then every service you are not running reads and writes production.
The name comes from railways. A switchyard is where the tracks are switched so that each train ends up where it should. That’s all this does, for HTTP requests.
It runs the services too
A router alone would not have been enough: something still has to start the local services, and running a process manager next to a router means two tools that each know half of the truth. So Switchyard does what we used process-compose for, too, and knows a bit more about what it runs. Every process has a type:
- dotnet — dotnet build, then the built dll with the launch profile from launchSettings.json. Before every start, like dotnet run does, so you never run stale code. Running the dll directly also means one process per service, so a stop is a stop: SIGTERM, a grace period, then the whole process tree is killed. Anything left behind by a crash is cleaned up on the next start.
- vite — npm ci when node_modules is missing or older than package-lock.json, then npm run dev. A fresh checkout just works.
- docker — a container in the foreground, for things like the Postgres the MCP gateway needs. Leftover containers from a crashed run are removed first.
- command — anything else. Our tunnel client is one.
Dependencies are smarter than in a normal process manager. If the MCP gateway depends on the Order Service, Switchyard waits for it — but only while the Order Service is local. If it’s on dev, there’s nothing to wait for. A database that nobody else serves is simply started along.
A process that crashes is restarted up to three times. Logs are kept per service, with a filter and a toggle that hides the debug noise.

Compile errors are first-class
This is the feature I didn’t know I wanted until I had it. Press b and the selected service is rebuilt. If the build succeeds, the service is restarted. If it fails, the old build keeps running — you don't lose your working service because of a typo — and the errors are parsed out of the MSBuild or TypeScript output:
$ switchyard build os
os: BUILD FAILED in 2.8s, 2 errors
os/OrderService/Program.cs:480:24: CS0029: Cannot implicitly convert type 'string' to 'int'
os/OrderService/Program.cs:480:43: CS0103: The name 'Undefined' does not exist in the current context
file:line:col, relative to the repository, with a non-zero exit code. In the text UI, e lists them and Enter jumps to the error in the build log.

Built for coding agents
Most of my code is written with Claude Code these days, and that changes what a dev tool needs to be.
An agent doesn’t look at a terminal UI. It needs commands that do one thing and exit with a clear result. So everything the UI can do is also a command and an HTTP API:
switchyard status
switchyard build os # errors as file:line:col, exit 1 on errors, restart on success
switchyard logs os -n 100
switchyard restart os ns
Our CLAUDE.md now says one thing about this: after changing a .NET service, run switchyard build <name>. The agent gets the compile errors in a format it can act on, fixes them, builds again, and when it's green the running service is already restarted with the new code. Before, it ran dotnet build and then had to remember to tell process-compose to restart the right process, through its own API on its own port — one more thing to get wrong.
One service from a worktree
The other thing agents changed is how many branches I have open at once. When three Claude Code sessions work on three features, each one has its own git worktree. Then the question is: which checkout is the running Order Service built from?
In Switchyard each service can run from the main checkout or from any worktree. Press w and pick one. Switchyard rebuilds it there and restarts it, and only that service moves. So I can run the Order Service from the refunds branch, the Product Service from the stock-reservation branch, and everything else from main — and test them together, behind one URL.

A new worktree needs no setup. The first start restores the packages, builds, and runs npm ci there.
Things I learned from Windows
I work on a Mac, but not everyone on the team does. So before publishing I tested it in a Windows 11 VM, and Windows taught me two things.
Process trees are a lie. Stopping a Vite dev server on macOS is simple: send SIGTERM to the process and its children. On Windows npm run dev is cmd → npm → cmd → node, and the only link between them is the parent's process id. When a process in the middle exits, the chain breaks, and the node process at the end is suddenly nobody's child. My first version "stopped" Vite and left it running, holding the port. The fix is a Windows Job Object: every process Switchyard starts goes into its own job, and stopping the service ends the job, all of it. As a bonus, the job is set to die with Switchyard, so if Switchyard itself crashes, Windows cleans up its children. On macOS a small pid file does the same on the next start.
Running dlls are locked. On macOS a rebuild can overwrite a running service’s files and swap it only if the build succeeds. On Windows the dll is locked while the process runs, so the service has to stop before it builds. A failed build there means the service is down until the next good build. That’s documented, not fixed — Windows wins this one.
What it doesn’t do
It’s a development tool, not infrastructure. No metrics, no CPU or memory graphs, no Kubernetes. The admin API only answers to localhost, so when you put the gateway behind a tunnel for webhooks (we run our own frp server for that), the webhooks reach your services but nobody on the internet can switch your routing.
What I learned
Most of a microservice platform is someone else’s problem today. On any given day I care about one or two services. Treating the rest as a remote dependency instead of a local process made my laptop quiet and my mornings faster.
Make the tool for the agent and you get a better tool for the human. Every command that exits with a clear code and prints file:line is also nicer for me. The text UI is just one more client of the same API.
Configuration is the product boundary. The first version had our company in its code: our route prefix, our Key Vault, our environment names. Moving every one of those into a switchyard.json in the repository is what made it something I could open source in an afternoon.
Try it
Switchyard is open source (MIT) at github.com/pylenius/switchyard, and it’s on NuGet as a .NET tool:
dotnet tool install -g Switchyard
Put a switchyard.json in the root of your repository — the example has two APIs, a Vite frontend and a Postgres container — and run switchyard there. It needs the .NET 10 SDK and works on macOS, Windows and Linux.
It was built for our .NET and Vue stack, but the project types are small classes, and adding one for Go, Python or Spring is an afternoon with your favourite coding agent. If you do, I’d love a pull request.