DevMesh
=======
Peer-to-peer dev mesh for sharing local services across machines. Run services locally, discover peers on your network, and route traffic transparently by service name.
Features
--------
- Register local services (from devmesh.toml)
- HTTP reverse proxy routes by Host header (e.g. http://mono:8080/)
- Peer discovery via UDP broadcast (same LAN or VPN)
- Version awareness with optional strict mode
- Branch-based namespaces (git branch → isolated mesh)
- Web dashboard and ASCII/JSON graph
- Graceful shutdown (Ctrl+C)
Install
-------
macOS (Homebrew):
brew install mdadul/homebrew-devmesh/devmesh
Rust (crates.io):
cargo install devmesh
GitHub Release:
Download devmesh-vX.Y.Z-<target>.tar.gz from
https://github.com/mdadul/devmesh/releases
Extract and move the binary to your PATH.
From repo:
cargo install --path .
Quick Start
-----------
1. Create devmesh.toml in your project root:
[services.mono]
port = 3000
version = "1.0.0"
2. Add host resolution (one-time):
devmesh install
Add the printed line to /etc/hosts (or C:\Windows\System32\drivers\etc\hosts).
3. Start the proxy (keeps running):
devmesh proxy
4. In another terminal, register and run your service:
devmesh run mono
# then start your app on port 3000
5. Access via http://mono:8080/
6. On another machine, run devmesh proxy and devmesh run mono. They discover each other; requests route to the nearest peer.
Commands
--------
run <service> Register and start agent for a service
stop <service> Unregister service
status List local and peer services (--routes for routing view)
install Show /etc/hosts line for service names
proxy Start HTTP proxy + discovery (Ctrl+C to stop)
graph Show mesh (--json for JSON, -o file to write)
dashboard Web UI at http://127.0.0.1:3005
db status Show registry and peers paths/stats
--config PATH Use specific config file (global)
Configuration (devmesh.toml)
----------------------------
[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/subnet
[namespace]
override = "my-ns" # optional, overrides git branch
auto = true # default: use git branch
[services.mono]
port = 3000
version = "1.0.0"
Environment
-----------
DEVMESH_CONFIG Path to config (overrides devmesh.toml)
RUST_LOG Log level (e.g. devmesh=debug)
Namespaces
----------
By default, namespace = git branch (sanitized: feature/foo → feature-foo). Services and peers are isolated by namespace. Override via [namespace] override or X-DevMesh-Namespace header.
Dashboard
---------
devmesh dashboard
Opens http://127.0.0.1:3005. Use ?namespace= to view other namespaces.
Docs
----
devmesh docs
Serves documentation at http://127.0.0.1:3006.
License
-------
See LICENSE file.