Ports and hostnames
Each lane gets a port range and local hostnames. Run the checkout branch alongside main without assigning ports in .env files.
main :20000
checkout :21000Run multiple copies of your development stack locally or on a remote machine, and access each through localhost.
brew install devlanes-run/tap/devlanescurl -fsSL https://devlanes.run/install.sh | shnpm install -g devlanescargo binstall --git https://github.com/devlanes-run/devlanes devlanes| lane | checkout | web | api | worker | database | open locally |
|---|---|---|---|---|---|---|
| 0 | main | :20000 | :20001 | :20002 | myapp_main | myapp.localhost |
| 1 | feat/checkout | :21000 | :21001 | :21002 | myapp_lane1 | myapp-1.localhost |
| 2 | fix/login | :22000 | :22001 | :22002 | myapp_lane2 | myapp-2.localhost |
| 3 | agent/perf | :23000 | :23001 | :23002 | myapp_lane3 | myapp-3.localhost |
Each lane has its own ports, hostnames and database.
Run the stack on a remote machine and connect from your laptop's browser, database client or desktop app.
The SSH connection provides local HTTPS addresses for apps and TCP access for other services.
See the agent workflow$ devlanes connect my-vps
Connected to my-vps
https://myapp-1.localhostmy-vps / lane 1 / web :21000127.0.0.1:5432/myapp_lane1my-vps / shared postgres / lane 1 datahttps://api.myapp-1.localhostlocal window / remote backendA lane groups the services and configuration for one running stack. Use separate worktrees, another checkout, or the same checkout with different settings.
Each lane gets a port range and local hostnames. Run the checkout branch alongside main without assigning ports in .env files.
main :20000
checkout :21000Lanes can share a Postgres server while using separate databases. Test a migration in one lane without changing main's data.
postgres / myapp_main
postgres / myapp_lane1Define services and setup tasks in devlanes.yaml. Environment variables use each lane's ports and database names.
devlanes.yaml
web + api + workerAn agent can start a stack for its changes and give you a localhost URL to test. It uses the same commands you use to inspect logs or stop services.
The daemon keeps services running when a terminal session ends.
A lane groups processes and data. The machine or container running them defines the security boundary.
Start the checkout branch so I can test it.
$ devlanes up --lane feat/checkout
lane 1 ready / web :21000 / api :21001 / db myapp_lane1
The checkout stack is running alongside main. Open https://myapp-1.localhost on your laptop to try it.
Submitting the form returns a 500. Find out why.
$ devlanes logs api --lane 1
error: column "orders.coupon_code" does not exist
The orders table is missing coupon_code. I will add the migration and retry in lane 1.
Looks good. Clean up this lane.
$ devlanes lane clean feat/checkout
stopped 3 services / removed myapp_lane1 / released ports
The checkout lane is gone. Main is still running at https://myapp.localhost.
View logs and resource use by lane, including services started by agents. Stop or restart a service without switching terminals.
0 main 4.2 GB
1 feat/checkout 3.1 GB
2 fix/login 1.5 GB
3 agent/perf 2.9 GB
api / lane 1 / :21001
Listening on 127.0.0.1:21001
Database myapp_lane1 connected
GET /checkout 200
POST /orders 201
main is still running on :20001
Install devlanes and describe your stack in devlanes.yaml.