A professional Docker service management and upgrade tool providing complete containerized service lifecycle management.
Nuwax CLI is a modern Docker service management tool developed in Rust, specifically designed to simplify the deployment, upgrade, backup, and maintenance of containerized applications. Through intelligent upgrade strategies and robust security mechanisms, it provides reliable operational support for enterprise-level applications.
- π Intelligent Docker Management: Complete Docker container lifecycle management with start, stop, restart, and health check capabilities
- π Multi-Strategy Upgrades: Support for both full and incremental upgrades with automatic optimal strategy selection
- πΎ Complete Backup System: Automatic backup before upgrades with full rollback support for data and application configurations
- ποΈ Cross-Platform Architecture: Native support for x86_64 and aarch64 architectures with automatic system type detection
- π Real-time Monitoring: Service status monitoring, health checks, and performance metrics collection
- π‘οΈ Secure & Reliable: Transactional upgrade operations with automatic rollback on failure to ensure service stability
- β‘ High Performance: Built on Rust async runtime providing exceptional concurrent performance
- π¨ Modern CLI: Intuitive command-line interface with rich progress displays and status indicators
nuwax-cli/
βββ π¦ nuwax-cli/ # CLI Main Program
β βββ src/
β β βββ main.rs # Program Entry Point
β β βββ cli.rs # Command Line Definitions
β β βββ app.rs # Application Main Logic
β β βββ commands/ # Command Processors
β β βββ docker_service/ # Docker Service Management
β βββ Cargo.toml
βββ π§ client-core/ # Core Business Library
β βββ src/
β β βββ upgrade.rs # Upgrade Management
β β βββ backup.rs # Backup System
β β βββ database.rs # Database Management
β β βββ api.rs # API Client
β β βββ container/ # Docker Operations
β β βββ sql_diff/ # SQL Diff Comparison
β βββ Cargo.toml
βββ π₯οΈ cli-ui/ # Tauri GUI Application (In Development)
β βββ src-tauri/ # Tauri Backend
β βββ src/ # Frontend Interface
βββ π docs/ # Technical Documentation
βββ π spec/ # Design Specifications
βββ ποΈ data/ # Data Directory
βββ π README.md
- Rust: 1.75+
- Docker: 20.10+ and Docker Compose v2+
- Operating System: Windows 10+, macOS 10.15+, Linux (mainstream distributions)
- Memory: Minimum 512MB available memory
# Clone repository
git clone https://github.com/soddygo/nuwax-cli.git
cd nuwax-cli
# Build project
cargo build --release
# Install to system
cargo install --path .# Development mode
cargo run -- --help
# Production mode
./target/release/nuwax-cli --help# 1. Initialize working environment
nuwax-cli init
# 2. Check service status
nuwax-cli status
# 3. Download and deploy services
nuwax-cli upgrade
# 4. Start Docker services
nuwax-cli docker-service start
# 5. Create backup
nuwax-cli backup
# 6. Check available updates
nuwax-cli check-update check# Service Control
nuwax-cli docker-service start # Start services
nuwax-cli docker-service stop # Stop services
nuwax-cli docker-service restart # Restart services
nuwax-cli docker-service status # Check status
# Image Management
nuwax-cli docker-service load-images # Load images
nuwax-cli docker-service arch-info # Architecture info
# Utilities
nuwax-cli ducker # Launch Docker TUI# Upgrade Management
nuwax-cli upgrade # Execute upgrade
nuwax-cli upgrade --check # Check updates
nuwax-cli upgrade --force # Force reinstall
# Backup and Recovery
nuwax-cli backup # Create backup
nuwax-cli list-backups # List backups
nuwax-cli rollback # Rollback recovery
nuwax-cli rollback --force # Force rollback# Auto Backup
nuwax-cli auto-backup run # Immediate backup
nuwax-cli auto-backup status # Backup status
# Auto Upgrade Deployment
nuwax-cli auto-upgrade-deploy run # Auto upgrade deployment
nuwax-cli auto-upgrade-deploy status # View configuration# SQL Diff Comparison
nuwax-cli diff-sql old.sql new.sql --old-version 1.0 --new-version 2.0
# Cache Management
nuwax-cli cache clear # Clear cache
nuwax-cli cache status # Cache status# 1. Install Rust toolchain
rustup update stable
rustup component add rustfmt clippy
# 2. Verify dependencies
cargo check --workspace
# 3. Run tests
cargo test --workspace
# 4. Code formatting
cargo fmt --all
# 5. Static analysis
cargo clippy --workspace -- -D warnings# Run performance benchmarks
cargo bench
# Generate performance reports
cargo bench -- --output-format htmlThe project uses Cargo workspace to manage multiple sub-modules:
- nuwax-cli: CLI interface layer, depends on client-core
- client-core: Core business logic, independently testable
- cli-ui: Tauri GUI application, independent frontend project
All dependency versions are uniformly managed in the root Cargo.toml to ensure consistency.
The project uses config.toml configuration files with intelligent configuration discovery:
[versions]
docker_service = "1.0.0"
patch_version = "1.0.1"
full_version_with_patches = "1.0.1+1"
[docker]
compose_file = "docker/docker-compose.yml"
env_file = "docker/.env"
[backup]
storage_dir = "./backups"
max_backups = 10
[cache]
download_dir = "./cache"
max_cache_size = "1GB"
[updates]
auto_check = true
auto_backup = trueConfiguration file search order:
- Command line specified path (
--config) - Current directory
./config.toml - Recursive search to parent directories
- User home directory
~/.nuwax/config.toml
- CLI Interface Layer: Command parsing, user interaction, progress display
- Business Logic Layer: Upgrade strategies, backup management, Docker operations
- Data Access Layer: DuckDB storage, configuration management, state persistence
- API Client: Version checking, file downloading, service communication
- Layered Architecture: Clear separation of responsibilities and dependency management
- Dependency Injection: Unified component lifecycle management through
CliApp - Strategy Pattern: Flexible switching between multiple upgrade strategies
- Actor Pattern: Concurrent safe processing of database operations
We welcome community contributions! Please follow these steps:
- Fork the project to your GitHub account
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
- Use
cargo fmtfor code formatting - Use
cargo clippyfor static checking - Add unit tests for new features
- Update relevant documentation
This project is dual-licensed:
You may choose either license to use this project.
- Project Homepage: https://docx.xspaceagi.com/
- GitHub Repository: https://github.com/soddygo/nuwax-cli
- Issue Reporting: https://github.com/soddygo/nuwax-cli/issues
- Changelog: CHANGELOG.md
If you encounter issues or have improvement suggestions:
- Check documentation for detailed information
- Search known issues
- Create a new Issue
- Join discussions
Made with β€οΈ by the Nuwax Team