
muti-metroo init
Create a unique identity for an agent. This generates the AgentID that other agents use to identify and route traffic to this agent.
Note: You usually don't need to run this manually - muti-metroo run creates the identity automatically if it doesn't exist. Use this command when you need to generate the identity ahead of time (e.g., to configure peers before the agent runs).
Usage
muti-metroo init -d <data-dir>
Flags
-d, --data-dir <dir>: Data directory path (default:./data)
Examples
# Initialize in current directory
muti-metroo init -d ./data
# Initialize in /var/lib
muti-metroo init -d /var/lib/muti-metroo
What It Does
- Creates data directory if it doesn't exist
- Generates a unique 128-bit AgentID
- Generates an X25519 keypair for end-to-end encryption
- Saves identity files to data directory:
agent_id- The 128-bit AgentIDagent_key- X25519 private key (for E2E encryption)agent_key.pub- X25519 public key (advertised to peers)
- Outputs the AgentID to stdout
Output
When creating a new identity:
Agent initialized in ./data
Agent ID: abc123def456789012345678901234ab
When the identity already exists:
Agent ID: abc123def456789012345678901234ab