.PHONY: help build install clean test run qm quartermaster
help:
@echo "Quartermaster CLI - Navigate the constellations of your codebase"
@echo ""
@echo "Available commands:"
@echo " make build - Build the CLI in release mode"
@echo " make install - Install the CLI globally"
@echo " make clean - Clean build artifacts"
@echo " make test - Run tests"
@echo " make run - Run the CLI (quartermaster)"
@echo " make qm - Run the CLI (qm alias)"
@echo " make quartermaster - Run the CLI (full name)"
@echo " make dev - Build and run in development mode"
@echo " make docs - Generate a local .quartermaster workspace for this repo"
@echo ""
@echo "Usage examples:"
@echo " quartermaster chart ./my-project"
@echo " qm analyze github.com/rust-lang/rust"
@echo " quartermaster chart . --no-open --non-interactive"
build:
@echo "๐จ Building Quartermaster CLI..."
cargo build --release
@echo "โ
Build complete! Binary available at target/release/quartermaster"
install: build
@echo "๐ฆ Installing Quartermaster CLI..."
cargo install --path .
@echo "โ
Installation complete! Run 'quartermaster' or 'qm' to use."
clean:
@echo "๐งน Cleaning build artifacts..."
cargo clean
@echo "โ
Clean complete!"
test:
@echo "๐งช Running tests..."
cargo test
@echo "โ
Tests complete!"
run: quartermaster
qm:
@echo "๐ Running Quartermaster CLI (qm)..."
cargo run --bin qm
quartermaster:
@echo "๐ Running Quartermaster CLI..."
cargo run --bin quartermaster
dev:
@echo "๐ง Development mode - Building and running..."
cargo run --bin quartermaster
docs:
@echo "๐ Generating Quartermaster workspace for this repository..."
cargo run --bin quartermaster -- chart .. --no-open --non-interactive
@echo "โ
Workspace generated in ../.quartermaster/"
build-all:
@echo "๐จ Building both quartermaster and qm binaries..."
cargo build --release --bins
@echo "โ
Build complete! Binaries available at:"
@echo " - target/release/quartermaster"
@echo " - target/release/qm"
dev-qm:
@echo "๐ Quick development run (qm)..."
cargo run --bin qm
dev-full:
@echo "๐ Quick development run (quartermaster)..."
cargo run --bin quartermaster
fmt:
@echo "๐จ Checking code formatting..."
cargo fmt --check
fmt-fix:
@echo "๐จ Formatting code..."
cargo fmt
clippy:
@echo "๐ Running clippy linter..."
cargo clippy -- -D warnings
ci: fmt clippy test
@echo "โ
All CI checks passed!"
version:
@echo "๐ Quartermaster CLI version:"
cargo run --bin quartermaster -- --version
show-help:
@echo "๐ Quartermaster CLI help:"
cargo run --bin quartermaster -- --help