CLI Commands
v1.0.0Command-line interface for YAKMESH nodes
Manage your YAKMESH node from the terminal. Initialize, start, monitor, and connect to the mesh network.
Quick Reference
All commands are available via npx yakmesh or
yakmesh if installed globally.
# Install globally for easier access
npm install -g yakmesh
Command Categories
$ Core Commands
yakmesh init
Initialize a new node
Creates a new YAKMESH node with post-quantum identity, configuration file, and data directory.
Options
| Option | Description | Default |
|---|---|---|
--name |
Human-readable node name | Auto-generated |
--region |
Geographic region identifier | Auto-detected |
--port |
HTTP API port | 3000 |
--ws-port |
WebSocket port for P2P | 9001 |
--bootstrap |
Bootstrap peer address | None |
Examples
# Basic initialization
yakmesh init
# Named node with custom ports
yakmesh init --name "himalaya-node-1" --port 8080 --ws-port 9002
# Initialize with bootstrap peer
yakmesh init --bootstrap wss://seed.yakmesh.dev:9001
# Full configuration
yakmesh init \
--name "everest-gateway" \
--region "asia-south" \
--port 3000 \
--ws-port 9001 \
--bootstrap wss://peer.example.com:9001
yakmesh start
Start the node
Starts the YAKMESH node with all services: HTTP API, WebSocket P2P, and mesh networking.
Options
| Option | Description | Default |
|---|---|---|
--config |
Path to configuration file | ./yakmesh.config.js |
--daemon |
Run as background daemon | false |
Examples
# Start with default config
yakmesh start
# Start with custom config
yakmesh start --config /etc/yakmesh/node.config.js
# Start as daemon (background process)
yakmesh start --daemon
Expected Output
Starting Yakmesh Node...
Securing codebase...
Codebase locked: 65 files protected
Initializing Oracle System...
Annex channel initialized
Yakmesh Node is running!
Network: factor-primitive-bose
Network ID: pq-EqU8
Dashboard: http://localhost:3000/dashboard
yakmesh status
Show node status
Displays the current status of your running YAKMESH node including health, peers, and network info.
Example
yakmesh status
╔══════════════════════════════════════════════════╗
║ YAKMESH NODE STATUS ║
╠══════════════════════════════════════════════════╣
║ Status: 🟢 ONLINE ║
║ Network: factor-primitive-bose ║
║ Network ID: pq-EqU8 ║
║ Uptime: 2h 34m 12s ║
║ Peers: 7 connected ║
║ Algorithm: ML-DSA-65 ║
╚══════════════════════════════════════════════════╝
yakmesh peers
List connected peers
Lists all currently connected peers with their node IDs, endpoints, and connection status.
Example Output
Connected Peers (7):
┌──────────────────────────────────────────────────────────────┐
│ ID │ Endpoint │ Latency │ Trust │
├──────────────────────────────────────────────────────────────┤
│ node-a7f3...2b1e │ wss://peer1:9001 │ 12ms │ 0.95 │
│ node-c4d8...9f2a │ wss://peer2:9001 │ 45ms │ 0.87 │
│ node-b2e6...1c4f │ 192.168.1.5:9001 │ 2ms │ 0.99 │
└──────────────────────────────────────────────────────────────┘
yakmesh info
Show detailed node info
Displays comprehensive information about your node including identity, capabilities, and configuration.
Example Output
{
"nodeId": "pq-7f3a2b1e-c4d8-4a2f-9b1c-e5f6a7b8c9d0",
"name": "himalaya-node-1",
"network": "factor-primitive-bose",
"networkId": "pq-EqU8",
"version": "2.5.0",
"algorithm": "ML-DSA-65",
"endpoints": {
"http": "http://localhost:3000",
"ws": "ws://localhost:9001"
},
"capabilities": ["SHERPA", "NAKPAK", "GEO_PROOF"],
"region": "asia-south",
"uptime": 9252
}
yakmesh join <endpoint>
Connect to a peer
Initiates a connection to a known peer endpoint. The handshake includes NAMCHE verification.
Examples
# Join via WebSocket
yakmesh join wss://peer.yakmesh.dev:9001
# Join local network peer
yakmesh join ws://192.168.1.100:9001
# Join with explicit protocol
yakmesh join wss://gateway.example.com:9001
Success Output
🔗 Connecting to wss://peer.yakmesh.dev:9001...
🧭 NAMCHE handshake initiated...
✓ Connected to node-a7f3...2b1e
Trust score: 0.92
Latency: 45ms
$ Protocol Commands
Manage the yak:// protocol handler for system-wide mesh URL support.
yakmesh protocol register
Register yak:// protocol
Registers the yak:// protocol with your operating system.
Enables clicking yak:// links in browsers and applications.
Example
yakmesh protocol register
✓ Protocol yak:// registered successfully
Handler: /usr/local/bin/yakmesh
Test with: yakmesh protocol test yak://hello
Note: On Windows, this modifies the registry. On macOS/Linux, it updates protocol handlers. May require elevated permissions.
yakmesh protocol unregister
Unregister protocol
Removes the yak:// protocol handler from your system.
yakmesh protocol unregister
✓ Protocol yak:// unregistered
yakmesh protocol test <url>
Test yak:// URL
Parses and validates a yak:// URL without executing it. Useful for debugging.
Examples
# Test a simple URL
yakmesh protocol test yak://node-a7f3/resource
# Test with query parameters
yakmesh protocol test "yak://gateway.local/api/status?format=json"
{
"valid": true,
"parsed": {
"protocol": "yak:",
"host": "node-a7f3",
"path": "/resource",
"query": {}
}
}
yakmesh protocol open <url>
Open yak:// URL
Opens a yak:// URL, routing through the mesh network to the target resource.
Examples
# Open a mesh resource
yakmesh protocol open yak://peer-node/dashboard
# Open with path
yakmesh protocol open yak://gateway/api/health
$ Bookmark Commands
Save and manage yak:// bookmarks for quick access to frequently used mesh resources.
yakmesh protocol bookmark add <name> <target>
Add a bookmark
Creates a named shortcut to a yak:// URL or mesh resource.
Examples
# Bookmark a dashboard
yakmesh protocol bookmark add dashboard yak://local/dashboard
# Bookmark an API endpoint
yakmesh protocol bookmark add health-check yak://gateway/api/health
# Bookmark external node
yakmesh protocol bookmark add main-peer yak://node-a7f3.yakmesh.dev/
✓ Bookmark 'dashboard' added → yak://local/dashboard
yakmesh protocol bookmark remove <name>
Remove a bookmark
yakmesh protocol bookmark remove dashboard
✓ Bookmark 'dashboard' removed
yakmesh protocol bookmark list
List all bookmarks
yakmesh protocol bookmark list
Bookmarks:
┌────────────────┬─────────────────────────────────────┐
│ Name │ Target │
├────────────────┼─────────────────────────────────────┤
│ dashboard │ yak://local/dashboard │
│ health-check │ yak://gateway/api/health │
│ main-peer │ yak://node-a7f3.yakmesh.dev/ │
└────────────────┴─────────────────────────────────────┘
yakmesh protocol bookmark get <name>
Get bookmark target
yakmesh protocol bookmark get dashboard
yak://local/dashboard
$ Geographic Commands
Manage geographic proof of location using speed-of-light verification. See Geographic Proof documentation for details.
yakmesh geo status
Geographic proof status
Shows the current geographic verification status and location proof.
yakmesh geo status
Geographic Proof Status:
Verified: ✓ Yes
Region: asia-south
Confidence: 94.2%
Last Proof: 2024-01-15T10:30:00Z
Landmarks Used: 4
Triangulation:
• Singapore (12ms) ✓
• Tokyo (45ms) ✓
• Sydney (89ms) ✓
• Mumbai (8ms) ✓
yakmesh geo landmarks
List landmarks
Lists all known geographic landmarks used for triangulation.
Known Landmarks (12):
┌──────────────────┬──────────────────┬─────────┬──────────┐
│ Name │ Location │ Status │ Latency │
├──────────────────┼──────────────────┼─────────┼──────────┤
│ landmark-sgp │ Singapore │ 🟢 Up │ 12ms │
│ landmark-tyo │ Tokyo │ 🟢 Up │ 45ms │
│ landmark-syd │ Sydney │ 🟢 Up │ 89ms │
│ landmark-mum │ Mumbai │ 🟢 Up │ 8ms │
│ landmark-fra │ Frankfurt │ 🟢 Up │ 156ms │
│ landmark-nyc │ New York │ 🟡 Slow │ 234ms │
└──────────────────┴──────────────────┴─────────┴──────────┘
yakmesh geo zones
List exclusion zones
Lists configured geographic exclusion zones where connections are restricted.
yakmesh geo zones
yakmesh geo prove
Generate geographic proof
Initiates a new geographic proof generation by triangulating against known landmarks.
yakmesh geo prove
🌍 Generating geographic proof...
Pinging landmark-sgp... 12ms ✓
Pinging landmark-tyo... 45ms ✓
Pinging landmark-syd... 89ms ✓
Pinging landmark-mum... 8ms ✓
✓ Proof generated successfully
Region: asia-south
Confidence: 94.2%
Proof ID: geo-proof-7f3a2b1e
yakmesh geo verify <nodeId>
Verify another node
Requests and verifies the geographic proof from another node.
yakmesh geo verify node-a7f3
🔍 Verifying geographic proof for node-a7f3...
Claimed region: europe-west
Verification landmarks: 3
✓ Location verified
Confidence: 91.7%
Distance to claimed: ~50km
Proof valid: Yes
yakmesh geo add-landmark
Add a landmark
Adds a new landmark server for geographic triangulation.
yakmesh geo add-landmark --name "my-landmark" --endpoint "wss://landmark.example.com:9001" --location "40.7128,-74.0060"
yakmesh geo physics
Show speed-of-light constants
Displays the physical constants used for geographic proof calculations.
yakmesh geo physics
{
"speedOfLight": 299792458,
"fiberRefractionIndex": 1.47,
"effectiveSpeed": 203940108,
"minTriangulationPoints": 3,
"maxAcceptableDeviation": 0.15,
"units": {
"speed": "m/s",
"distance": "km",
"time": "ms"
}
}
How it works: Geographic proof uses the speed of light through fiber optic cables to verify that a node's claimed location is physically consistent with its measured latencies.
Continue Exploring
- REST API Reference — HTTP endpoints for programmatic access
- YAK:// Protocol — Custom URL scheme details
- Geographic Proof — Speed-of-light verification
- Configuration — Full config file reference