An unofficial Rust port of the Boot.dev CLI, providing interactive command-line learning experiences for Boot.dev courses.
- Purpose
- Installation
- Usage
- Configuration File
- Development
- Architecture
- Differences from Go Version
- Migration from Go Version
- Inspiration
- Contributing
- License
- Disclaimer
This project is a complete rewrite of the Boot.dev CLI in Rust, maintaining feature parity with the original Go implementation while leveraging Rust's performance and safety guarantees. It allows users to:
- Run and test Boot.dev lessons locally
- Execute CLI commands and HTTP requests as part of interactive learning
- Submit lesson results to the Boot.dev platform
- Validate lesson completion with real-time feedback
- Configure custom settings for enhanced learning experience
Note: This is an unauthorized port created as a learning exercise and is not officially affiliated with or endorsed by Boot.dev. For the official CLI, please visit the original repository.
- Rust 1.70 or later (install from rustup.rs)
- Supported platforms: Linux, macOS, or Windows via WSL
git clone https://github.com/hughdbrown/bootdev-rs
cd bootdev-rs
cargo install --path .cargo install bootdev-rsThe CLI provides several commands for interacting with Boot.dev lessons:
# Login to Boot.dev
bootdev-rs login
# Logout and clear stored credentials
bootdev-rs logout# Test a lesson without submitting results
bootdev-rs run <LESSON_UUID>
# Run and submit a lesson
bootdev-rs submit <LESSON_UUID>
# Alternative: use the -s flag with run
bootdev-rs run -s <LESSON_UUID># Override the base URL for HTTP tests (useful for local development)
bootdev-rs config base_url <URL>
# Customize terminal colors
bootdev-rs config colors --red #FF0000 --green #00FF00 --gray #808080
# Reset configuration
bootdev-rs config reset# Check current version
bootdev-rs --version
# Check for updates
bootdev-rs upgradeThe CLI reads configuration from ~/.bootdev.yaml or ~/.config/bootdev/config.yaml, maintaining compatibility with the Go version's config format.
Configuration options:
access_token/refresh_token: Authentication JWT tokensoverride_base_url: Override lesson default base URL for HTTP testscolor.green,color.red,color.gray: Customizable terminal colorsapi_url: Boot.dev API endpoint (default:https://api.boot.dev)frontend_url: Boot.dev frontend URL (default:https://boot.dev)
Build the project in development mode:
cargo buildBuild optimized release binary:
cargo build --releaseThe release build is configured for minimal binary size with aggressive optimizations enabled in Cargo.toml.
Run the test suite:
cargo testRun tests with output:
cargo test -- --nocapture# Run directly with cargo
cargo run -- <command> <args>
# Example: test login flow
cargo run -- login
# Example: run a lesson
cargo run -- run <UUID># Run linter
cargo clippy
# Format code
cargo fmt
# Check formatting without modifying files
cargo fmt -- --checkFor local installation from source:
cargo install --path .For publishing to crates.io:
# Ensure version is updated in Cargo.toml
cargo publishThe project follows a modular architecture inspired by the original Go implementation:
src/main.rs: Entry point and CLI initializationsrc/cmd/: Command handlers (login, logout, run, submit, config, upgrade)src/client/: API client and authentication logicsrc/checks/: Lesson execution engine (CLI commands and HTTP requests)src/render/: Terminal UI rendering with Ratatuisrc/config/: Configuration file managementsrc/models/: Data structures and API modelssrc/version/: Version checking and update logicsrc/messages/: UI message types for TUI updates
- clap: Command-line argument parsing (replaces Cobra)
- tokio: Async runtime for concurrent operations
- reqwest: HTTP client with async support
- serde: JSON serialization and deserialization
- ratatui: Terminal UI framework (replaces Bubble Tea)
- crossterm: Cross-platform terminal manipulation
- semver: Semantic version comparison
While maintaining feature parity, there are a few notable differences:
- Binary name:
bootdev-rsinstead ofbootdev - Version checking: Uses crates.io or GitHub releases instead of Go proxy
- Installation method:
cargo installinstead ofgo install - Async architecture: Tokio-based async runtime for better performance
- Binary size: Smaller optimized binaries with LTO and stripping enabled
The Rust version is designed to be compatible with existing configurations. Both versions can coexist and share the same config file at ~/.bootdev.yaml.
This project is inspired by and aims to replicate the functionality of the official Boot.dev CLI written in Go. All credit for the original design and implementation goes to the Boot.dev team.
Contributions are welcome! Please feel free to submit issues or pull requests.
Before contributing:
- Ensure code passes
cargo clippywithout warnings - Run
cargo fmtto format code - Add tests for new functionality
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
This is an unofficial, unauthorized port of the Boot.dev CLI created for educational purposes. It is not affiliated with, endorsed by, or supported by Boot.dev. For the official CLI and Boot.dev platform, please visit boot.dev.