DevMesh

Peer-to-peer dev mesh for sharing local services across machines.

Overview

DevMesh lets you run services locally on your machine, discover peers on the same network (LAN or VPN), and route HTTP traffic by service name. Use http://mono:8080/ instead of http://localhost:3000—DevMesh routes to your local service or to a peer if you're not running it.

Install

Requires Rust. From the repo:

cargo install --path .

Or build and run:

cargo build --release
./target/release/devmesh --help

Quick Start

1. Create devmesh.toml

[services.mono]
port = 3000
version = "1.0.0"

2. One-time host setup

devmesh install

Add the printed line to /etc/hosts (macOS/Linux) or C:\Windows\System32\drivers\etc\hosts (Windows).

3. Start the proxy

devmesh proxy

Leave this running. Press Ctrl+C to stop gracefully.

4. Register and run your service

devmesh run mono
# Then start your app on port 3000

5. Access

curl http://mono:8080/

6. Add another machine

On another machine on the same network, run devmesh proxy and devmesh run mono. They discover each other. Requests route locally first, then to peers. Round-robin when multiple peers have the same service.

Commands

run <service>Register service (from config)
stop <service>Unregister service
statusList local and peer services (--routes for routing)
installShow /etc/hosts line
proxyStart HTTP proxy + discovery
graphASCII mesh (--json, -o file)
dashboardWeb UI (port 3005)
docsServe this documentation (port 3006)
db statusRegistry and peers paths/stats

Global: --config PATH uses a specific config file.

Configuration

Config is loaded from devmesh.toml (cwd), ~/.devmesh/config.toml, or DEVMESH_CONFIG / --config.

[proxy]
port = 8080
version_strict = false    # true = reject on version mismatch
cache_ttl_secs = 1

[discovery]
port = 35555
# broadcast_addr = "10.42.0.255"   # for VPN

[namespace]
override = "my-ns"        # overrides git branch
auto = true               # use git branch (default)

[services.mono]
port = 3000
version = "1.0.0"

[services.ui]
port = 3001

Namespaces

Services and peers are isolated by namespace. Default: namespace = current git branch (sanitized, e.g. feature/foofeature-foo).

Dashboard and API support ?namespace= to view other namespaces.

Dashboard

devmesh dashboard

Opens http://127.0.0.1:3005. Shows local services, peers, version mismatches. Use the namespace input to switch namespaces.

Version Awareness

Set version in [services.X]. Clients can send X-DevMesh-Expected-Version: ^1.0 (semver range). If target version doesn't match:

Major version mismatches are highlighted in status and dashboard.

Tip: Use RUST_LOG=devmesh=debug for verbose logs.