This guide provides detailed instructions for installing the QuDAG CLI tool on your system.
- Rust 1.70 or newer (install from rustup.rs)
- Git
- A UNIX-like operating system (Linux, macOS, BSD)
The easiest way to install QuDAG CLI is using the provided installation script:
./install.shThis will:
- Build the CLI in release mode
- Install it to
~/.local/bin/qudag - Update your PATH if needed
- Install shell completions (if supported)
The installation script provides the most flexibility and handles all setup automatically.
# Install to user directory (~/.local)
./install.sh
# Install system-wide (requires sudo)
sudo ./install.sh --system
# Install to custom directory
./install.sh --prefix /opt/qudag
# Install debug build (for development)
./install.sh --debug
# Force reinstall (overwrite existing)
./install.sh --force
# View all options
./install.sh --helpThe Makefile provides convenient targets for common installation scenarios:
# Install to ~/.local
make install
# Install system-wide
make install-system
# Install debug build
make install-debug
# Install to CARGO_HOME/bin
make install-cargoFor complete control over the installation process:
# Build in release mode
cargo build --release -p qudag-cli
# Copy binary to desired location
cp target/release/qudag-cli ~/.local/bin/qudag
# Make sure ~/.local/bin is in your PATH
export PATH="$HOME/.local/bin:$PATH"
# Add to your shell RC file for persistence
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrcOnce published to crates.io:
cargo install qudag-cliAfter installation, verify everything is working:
# Check version
qudag --version
# View help
qudag --help
# If PATH wasn't updated automatically, reload your shell
source ~/.bashrc # or ~/.zshrc for Zsh usersThe installation script automatically installs shell completions for:
- Bash
- Zsh
- Fish
If completions weren't installed automatically, you can generate them manually:
# For Bash
qudag completions bash > ~/.local/share/bash-completion/completions/qudag
# For Zsh
qudag completions zsh > ~/.zfunc/_qudag
# For Fish
qudag completions fish > ~/.config/fish/completions/qudag.fishTo update to the latest version:
# Pull latest changes
git pull
# Reinstall
./install.sh --forceTo remove QuDAG CLI from your system:
# Using the uninstall script
./uninstall.sh
# Or using Make
make uninstall
# Manual removal
rm ~/.local/bin/qudagYou may also want to remove the PATH entry from your shell configuration file.
If you get "command not found" after installation:
-
Check if the binary exists:
ls -la ~/.local/bin/qudag -
Check if the directory is in your PATH:
echo $PATH | grep -q "$HOME/.local/bin" && echo "IN PATH" || echo "NOT IN PATH"
-
If not in PATH, add it:
export PATH="$HOME/.local/bin:$PATH" source ~/.bashrc
If you get permission errors:
-
Make sure the binary is executable:
chmod +x ~/.local/bin/qudag -
For system-wide installation, use sudo:
sudo ./install.sh --system
If the build fails:
-
Update Rust:
rustup update
-
Clean and rebuild:
cargo clean ./install.sh
-
Check for missing dependencies:
cargo check -p qudag-cli
On macOS, you may need to install Xcode Command Line Tools:
xcode-select --installMost Linux distributions work out of the box. For minimal distributions, you may need:
# Debian/Ubuntu
sudo apt-get install build-essential pkg-config
# Fedora/RHEL
sudo dnf install gcc pkg-config
# Arch
sudo pacman -S base-devel pkg-configQuDAG CLI is designed for UNIX-like systems. On Windows, use WSL2:
- Install WSL2
- Install a Linux distribution (Ubuntu recommended)
- Follow the Linux installation instructions
If you encounter issues:
- Check the troubleshooting guide
- Run the test script:
./test_install.sh - File an issue on GitHub
After installation, see the Usage Guide to:
- Start your first QuDAG node
- Learn about CLI commands
- Explore advanced features