# Development utility recipes for SecretumVault [doc("Show dev help")] help: @echo "DEVELOPMENT COMMANDS"; \ echo ""; \ echo "Code Quality:"; \ echo " just dev::fmt Format code"; \ echo " just dev::fmt-check Check formatting"; \ echo " just dev::lint Run clippy"; \ echo " just dev::check-all Format check + lint + test"; \ echo ""; \ echo "Utilities:"; \ echo " just dev::watch Watch and rebuild"; \ echo " just dev::run-debug Run with debug build"; \ echo " just dev::docs Generate and open docs"; \ echo " just dev::clean Clean artifacts"; \ echo "" # Format all code [doc("Format all Rust code")] fmt: cargo fmt --all # Check formatting without modifying [doc("Check formatting")] fmt-check: cargo fmt --all -- --check # Lint with clippy [doc("Run clippy linter (all targets, all features)")] lint: cargo clippy --all-targets --all-features -- -D warnings # Check code (no output if ok) [doc("Quick check: format + lint + compile")] check-all: @echo "Checking formatting..." && cargo fmt --all -- --check || (echo "❌ Format check failed"; exit 1) @echo "Checking clippy..." && cargo clippy --all-targets --all-features -- -D warnings || (echo "❌ Lint failed"; exit 1) @echo "Checking compilation..." && cargo check --all-features || (echo "❌ Check failed"; exit 1) @echo "✅ All checks passed" # Watch for changes and rebuild [doc("Watch mode: rebuild on changes")] watch: @command -v cargo-watch > /dev/null || (echo "Installing cargo-watch..." && cargo install cargo-watch) cargo watch -x "build --release" # Run debug build [doc("Build and run debug binary")] run-debug: cargo run --all-features -- server --config svault.toml # Generate documentation [doc("Generate docs and open in browser")] docs: cargo doc --all-features --open # Security audit [doc("Check for security vulnerabilities")] audit: cargo audit # Update dependencies [doc("Update dependencies to latest versions")] update: cargo update # Show dependency tree [doc("Show dependency tree")] tree: cargo tree --all-features # Find duplicate dependencies [doc("Find duplicate dependencies")] tree-dups: cargo tree --all-features --duplicates # Fix clippy warnings automatically [doc("Auto-fix clippy suggestions")] fix: cargo clippy --all-targets --all-features --fix # Format and lint in one go [doc("Format + lint (all-in-one)")] polish: cargo fmt --all cargo clippy --all-targets --all-features --fix cargo fmt --all # Show outdated dependencies [doc("Check for outdated dependencies")] outdated: @command -v cargo-outdated > /dev/null || (echo "Installing cargo-outdated..." && cargo install cargo-outdated) cargo outdated # Show all available recipes [doc("List all just recipes")] recipes: just --list # Clean all build artifacts [doc("Clean build artifacts and cache")] clean: cargo clean rm -rf target/ .cargo-ok echo "Cleaned." # Environment info [doc("Show Rust environment")] env: @echo "Rust version:" && rustc --version @echo "Cargo version:" && cargo --version @echo "Rust toolchain:" && rustup show active-toolchain @echo "" @echo "Available targets:" @rustup target list | grep installed