QuDAG NPM Package
🌐 Quantum-Resistant Distributed Communication Platform

QuDAG is a revolutionary quantum-resistant distributed communication platform built on a Directed Acyclic Graph (DAG) architecture. This NPM package provides easy access to the QuDAG CLI through Node.js and NPX.
🚀 Quick Start
Using NPX (Recommended)
No installation required! Just run:
npx qudag@latest --help
Global Installation
Install globally for direct CLI access:
npm install -g qudag
qudag --help
Project Installation
Add to your project as a dependency:
npm install qudag
📋 Prerequisites
- Node.js >= 16.0.0
- Supported platforms:
- Linux (x64, arm64)
- macOS (x64, arm64)
- Windows (x64)
🛠️ CLI Usage
Start a QuDAG Node
npx qudag@latest start --port 8000
qudag start --port 8000
Dark Address Management
npx qudag@latest address register mynode.dark
npx qudag@latest address resolve mynode.dark
npx qudag@latest address shadow --ttl 3600
npx qudag@latest address fingerprint --data "Hello QuDAG!"
Peer Management
npx qudag@latest peer list
npx qudag@latest peer add /ip4/192.168.1.100/tcp/8000
npx qudag@latest peer remove 12D3KooWExample...
Node Operations
npx qudag@latest status
npx qudag@latest network stats
npx qudag@latest stop
💻 Programmatic Usage
JavaScript/TypeScript API
const { QuDAG } = require('qudag');
import { QuDAG } from 'qudag';
const startResult = await QuDAG.start(8000);
console.log('Node started:', startResult.stdout);
const status = await QuDAG.status();
console.log('Status:', status.stdout);
const register = await QuDAG.registerAddress('myapp.dark');
console.log('Registered:', register.stdout);
const peers = await QuDAG.listPeers();
console.log('Peers:', peers.stdout);
const result = await QuDAG.raw(['--version']);
console.log('Version:', result.stdout);
Advanced Usage
const { execute, getPlatformInfo, isInstalled } = require('qudag');
if (!isInstalled()) {
console.log('QuDAG binary not installed');
}
const info = getPlatformInfo();
console.log('Platform:', info.platform);
console.log('Architecture:', info.arch);
console.log('Binary path:', info.binaryPath);
const result = await execute(['peer', 'list', '--format', 'json'], {
env: { ...process.env, RUST_LOG: 'debug' }
});
const peers = JSON.parse(result.stdout);
console.log(`Connected to ${peers.length} peers`);
🏗️ Architecture
This NPM package acts as a wrapper around the native QuDAG binary, providing:
- Automatic Binary Management: Downloads the correct binary for your platform
- Cross-Platform Support: Works on Linux, macOS, and Windows
- TypeScript Support: Full type definitions included
- Programmatic API: Use QuDAG from your Node.js applications
- NPX Support: Run without installation using
npx qudag@latest
🔧 Troubleshooting
Binary Download Issues
If the binary fails to download during installation:
- Check your internet connection
- Verify your platform is supported
- Check if a proxy is blocking GitHub access
- Try manual installation:
npx qudag@latest --help
Permission Issues on Linux/macOS
If you get permission errors:
chmod +x $(npm root -g)/qudag/bin/platform/qudag
Platform Not Supported
If your platform is not supported, you can build from source:
git clone https://github.com/ruvnet/QuDAG
cd QuDAG
cargo build --release
cp target/release/qudag node_modules/qudag/bin/platform/
🤝 Contributing
Contributions are welcome! Please see the main QuDAG repository for contribution guidelines.
📄 License
Licensed under either of:
- Apache License, Version 2.0
- MIT License
at your option.
🔗 Links
Created by rUv