Skip to content

Network Commands

Network commands manage the peer-to-peer gene discovery layer. In v0.5, these commands are foundation-stage stubs — they manage local configuration and display placeholder output, but no real libp2p networking occurs. Gene discovery currently goes through the Cloud Registry.

Show the current P2P node configuration and status.

Terminal window
rotifer network status

Example:

Terminal window
$ rotifer network status
── P2P Network Status ──
Node ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Status: Inactive
Listen Port: 9878
Bootstrap Peers: 1
Start the node: rotifer network start

Initialize the P2P node configuration and mark it as active.

Terminal window
rotifer network start [--port <port>]

Flags:

FlagDefaultDescription
-p, --port <port>9878Listen port for P2P connections

Example:

Terminal window
$ rotifer network start --port 9900
── Starting P2P Node ──
Node ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Listen: /ip4/0.0.0.0/tcp/9900
Protocol: rotifer/gene-discovery/1.0.0
Connecting to bootstrap peers...
/dns4/bootstrap.rotifer.dev/tcp/9878
P2P networking is in foundation stage (v0.5).
Gene metadata discovery is available; binary transfer uses Cloud CDN.
P2P node initialized

Configuration is saved to ~/.rotifer/network.json.


Deactivate the P2P node.

Terminal window
rotifer network stop

List known peers. Requires the node to be active.

Terminal window
rotifer network peers

Example:

Terminal window
$ rotifer network peers
── Known Peers ──
# Address Status
────────────────────────────────────────────────────────────
1 /dns4/bootstrap.rotifer.dev/tcp/9878 bootstrap
1 peer(s) known

Search for genes via the P2P network. Currently falls back to Cloud search.

Terminal window
rotifer network search <query>

Example:

Terminal window
$ rotifer network search "code formatter"
── P2P Gene Search ──
Searching P2P network for: "code formatter"
Querying DHT for gene metadata...
P2P gene search is in foundation stage (stub).
Currently, all gene discovery goes through the Cloud Registry.
Use 'rotifer search' for Cloud-based gene discovery.

Announce a gene’s metadata to the P2P network. Requires the node to be active.

Terminal window
rotifer network announce <name>

Example:

Terminal window
$ rotifer network announce grammar-checker
── Gene Announcement ──
Announcing gene 'grammar-checker' to P2P network...
Broadcasting gene metadata via GossipSub...
P2P gene announcement is in foundation stage (stub).
Gene metadata propagation to connected peers is planned for a future release.
For now, use 'rotifer publish' to share via Cloud Registry.

All 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
}

FeatureDescription
libp2p integrationReal peer-to-peer networking via rust-libp2p
Kademlia DHTDistributed peer discovery
GossipSub propagationGene metadata broadcast to connected peers
QUIC + TCP transportNAT traversal and fallback
IPFS CID storageContent-addressable gene packages