QuDAG CLI
Command-line interface for the QuDAG quantum-resistant anonymous communication protocol.
Installation
Build from source:
Usage
Node Management
Start a QuDAG node:
Stop the running node:
Check node status:
Peer Management
List connected peers:
Add a new peer:
Remove a peer:
Network Management
Display network statistics:
Test network connectivity:
DAG Visualization
Generate DAG visualization:
Command Reference
qudag start
Starts a QuDAG node with the specified configuration.
Options:
--port <PORT>: Port to listen on (default: 8000)--data-dir <DIR>: Data directory path (default: ./data)--peers <ADDR>...: Initial peer addresses to connect to
qudag stop
Gracefully stops the running QuDAG node.
qudag status
Displays the current status of the running node including:
- Connection status
- Number of connected peers
- DAG statistics
- Network uptime
qudag peer
Peer management commands:
qudag peer list
Lists all currently connected peers with their addresses and connection status.
qudag peer add <ADDRESS>
Connects to a new peer at the specified address.
qudag peer remove <ADDRESS>
Disconnects from the specified peer.
qudag network
Network diagnostic commands:
qudag network stats
Displays comprehensive network statistics including:
- Total peers
- Active connections
- Message throughput
- Bandwidth usage
- Average latency
qudag network test
Performs connectivity tests to all connected peers and reports results.
qudag dag
DAG visualization and analysis:
Options:
--output <FILE>: Output file path (default: dag_visualization.dot)--format <FORMAT>: Output format (default: dot)
Generates a visual representation of the current DAG state.
Configuration
The CLI can be configured using a configuration file specified with the --config flag:
Example configuration file (config.toml):
[]
= 8000
= "./node-data"
= ["peer1.example.com:8000", "peer2.example.com:8000"]
[]
= 50
= 30
[]
= "info"
Examples
Basic Node Operation
-
Start a node:
-
In another terminal, check status:
-
Add some peers:
-
Monitor network:
DAG Analysis
Generate and view DAG visualization:
Troubleshooting
Common Issues
- Port already in use: Use a different port with
--port - Permission denied: Ensure proper permissions for data directory
- Connection refused: Check peer addresses and network connectivity
Debug Mode
Enable verbose logging:
RUST_LOG=debug
Log Files
Logs are written to:
- stdout/stderr (console output)
<data-dir>/logs/qudag.log(file output)
Security Considerations
- Keep your private keys secure
- Use encrypted connections between peers
- Regularly update to the latest version
- Monitor for suspicious network activity
Contributing
See the main project repository for contribution guidelines.