Network Commands
The rotifer network commands run an experimental peer-to-peer gene network. As of v0.9.0 the published CLI ships a real libp2p node that runs as a background daemon: nodes on the same LAN connect via a manually supplied --bootstrap address and propagate gene announcements over GossipSub.
rotifer network status
Section titled “rotifer network status”Show the P2P daemon status.
rotifer network statusExample (daemon running):
$ rotifer network status
── P2P Network Status ──
Status: ● Running PeerId: 12D3KooWA1b2c3d4e5f6... Listening: /ip4/192.168.0.103/tcp/9878/p2p/12D3KooWA1b2c3d4e5f6... Discovered peers: 2When the daemon is not running, the command shows the configured listen port and bootstrap-peer count, and hints to start it.
rotifer network start
Section titled “rotifer network start”Start the P2P node as a background daemon. Requires the native libp2p addon.
rotifer network start [--port <port>] [--host <addr>] [--bootstrap <addr...>]Flags:
| Flag | Default | Description |
|---|---|---|
-p, --port <port> | 9878 | Listen port |
-H, --host <addr> | 127.0.0.1 | Listen interface — 127.0.0.1 (loopback only) or 0.0.0.0 (reachable from other machines) |
-b, --bootstrap <addr...> | from config | Bootstrap peer multiaddr(s) to dial on start; overrides the config file |
Example:
$ rotifer network start --host 0.0.0.0 --port 9878
── Starting P2P Daemon ──
PeerId: 12D3KooWA1b2c3d4e5f6... Listen host: 0.0.0.0 PID: 48213 Bootstrap peers: 0
✓ P2P daemon running in the background. ℹ 'rotifer network status' shows the reachable multiaddr — give it to other nodes as --bootstrapThe daemon runs in the background; use rotifer network status to inspect it and rotifer network stop to shut it down. Configuration is saved to ~/.rotifer/network.json.
rotifer network stop
Section titled “rotifer network stop”Stop the running P2P daemon.
rotifer network stoprotifer network peers
Section titled “rotifer network peers”List the peers the running daemon has discovered. Requires the daemon to be running.
rotifer network peersExample:
$ rotifer network peers
── Discovered Peers ──
#1 /ip4/192.168.0.107/tcp/9878/p2p/12D3KooWB7c8d9...
1 peer(s) discoveredIf no peers have connected yet, the command reports No peers discovered yet. In v0.9.0 peers join via manual --bootstrap; automatic discovery is a v0.9.1 milestone.
rotifer network received
Section titled “rotifer network received”Show gene announcements this node has received from connected peers. Requires the daemon to be running.
rotifer network receivedExample:
$ rotifer network received
── Received Gene Announcements ──
grammar-checker@1.0.0 writing.grammar · Native · from 12D3KooWB7c8d9…
1 announcement(s) receivedA peer must announce a gene while this node is connected and subscribed for it to appear here.
rotifer network announce <gene-name>
Section titled “rotifer network announce <gene-name>”Announce a local gene’s metadata through the running daemon. Reads genes/<gene-name>/phenotype.json from the current project. Requires the daemon to be running.
rotifer network announce <gene-name>Example:
$ rotifer network announce grammar-checker
── Gene Announcement ──
✓ Announced 'grammar-checker' to the networkConnected peers that are subscribed will list the announcement under rotifer network received.
rotifer network search <query>
Section titled “rotifer network search <query>”rotifer network search <query>P2P metadata search over the DHT is not yet available — it is part of the v0.9.1 milestone. The command points you to Cloud-based discovery:
$ rotifer network search "code formatter"
── P2P Gene Search ──
ℹ Preparing P2P search for: "code formatter" ℹ P2P metadata search (DHT) is not yet available. ℹ Use 'rotifer search' for Cloud-based gene discovery.LAN walkthrough
Section titled “LAN walkthrough”To watch a gene propagate across machines on the same network:
- On the seed machine, bind a reachable interface:
rotifer network start --host 0.0.0.0. Note the multiaddr fromrotifer network status. - On each other machine, join the seed:
rotifer network start --bootstrap /ip4/<seed-ip>/tcp/9878/p2p/<seed-PeerId>. - Announce a gene on any machine:
rotifer network announce <gene-name>. - On the other machines,
rotifer network receivedlists it.
LAN reachability relies on manual --bootstrap. Automatic discovery (mDNS) and reaching nodes across the public internet (NAT traversal, relays) are later milestones.
Configuration
Section titled “Configuration”Network configuration is stored in ~/.rotifer/network.json:
{ "node_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "listen_port": 9878, "bootstrap_peers": [ "/dns4/bootstrap.rotifer.dev/tcp/9878" ], "enabled": false}node_id is a local config identifier; the libp2p PeerId shown by status / start is derived at runtime and is what other nodes use in a --bootstrap multiaddr.
Not yet — v0.9.1 milestone
Section titled “Not yet — v0.9.1 milestone”| Capability | Status |
|---|---|
| Automatic peer discovery (mDNS, LAN) | v0.9.1 |
| Wide-area discovery + search via Kademlia DHT | v0.9.1 |
| Reaching nodes across the public internet (NAT traversal, relays) | v0.9.1 |
Until then, gene discovery and sharing run through the Cloud Registry (rotifer search, rotifer publish).