I've built a professional-grade Rust CLI application called Zackstrap that follows all Rust best practices:
Cargo.toml- Professional dependency management with all necessary cratessrc/main.rs- CLI entry point usingclapfor argument parsingsrc/lib.rs- Library exports for testing and potential reusesrc/config.rs- Data structures for all configuration typessrc/error.rs- Comprehensive error handling usingthiserrorsrc/generators.rs- File generation logic with async supporttests/integration_tests.rs- Full test coverageREADME.md- Comprehensive documentation.gitignore- Professional gitignore for Rust projectsLICENSE- MIT license
- Smart CLI: Uses
clapwith beautiful help text and subcommands - Error Handling: Proper error types with
anyhowandthiserror - Async Support: Built with
tokiofor future extensibility - Colored Output: Beautiful terminal output with emojis and colors
- Force Overwrite: Safe file handling with
--forceflag - Target Directory: Specify custom target directories
- Comprehensive Testing: Full integration test suite
- Auto-Detection: Automatically detects Ruby projects and generates appropriate configs
- Interactive Mode: Guided setup with user prompts
- Template System: Multiple configuration templates for different coding styles
- Dry Run Mode: Preview what would be created without actually creating files
.editorconfig- Multi-language editor configuration.prettierrc- Prettier formatting rulesjustfile- Project automation and development tasks
.ruby-version- Ruby 3.3.0.node-version- Node.js 24.rubocop.yml- Comprehensive Ruby lintingpackage.json- Withprettier-plugin-rubyjustfile- Ruby-specific automation tasks
You have a few options here. The preferred method is the official rust installer. Works on Mac and Linux systems.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/envOr, a Debian/Ubuntu system
sudo apt install rustupMac via Brew
brew install rustupYou're on your own with Window's, but the Rust docs are real good.
# Build the project
cargo build --release
# Run basic configuration
cargo run -- basic
# Run Ruby configuration
cargo run -- ruby
# List available configs
cargo run -- list
# Force overwrite existing files
cargo run -- basic --force
# Target specific directory
cargo run -- ruby --target /path/to/projectcargo install --path .
zackstrap basic
zackstrap rubyzackstrap --help # Show help
zackstrap basic # Generate basic configs
zackstrap basic --force # Force overwrite
zackstrap basic --template google # Use Google style template
zackstrap ruby # Generate Ruby configs
zackstrap ruby --force # Force overwrite
zackstrap ruby --template rails # Use Rails template
zackstrap auto # Auto-detect project type
zackstrap interactive # Guided setup
zackstrap list # List available configs
zackstrap --target /path/to/dir # Specify target directory
zackstrap --dry-run # Preview without creating files (use BEFORE subcommand)- Async Architecture: Built with
tokiofor future extensibility - Error Handling: Comprehensive error types with proper context
- Configuration: Structured data with
serdefor JSON handling - Testing: Full integration test suite with
assert_fs - CLI Framework:
clapfor professional command-line interface - Safety: File existence checks and force overwrite options
- Install Rust using the command above
- Build the project:
cargo build --release - Test it:
cargo test - Run it:
cargo run -- basicorcargo run -- ruby - Customize: The
.rubocop.ymlcontent can be updated when you paste your preferred configuration
The application is production-ready and follows all Rust best practices. It will generate exactly the configuration files you specified, with the Ruby project getting all the extras like package.json with github:prettier/plugin-ruby, .ruby-version set to 3.3.x, and .node-version set to 24.
min