Skip to content

Latest commit

 

History

History
3674 lines (2466 loc) · 48.8 KB

File metadata and controls

3674 lines (2466 loc) · 48.8 KB

Academic Workflow Suite Justfile Cookbook

Table of Contents

1. Introduction

This cookbook provides comprehensive documentation for all available just recipes in the Academic Workflow Suite. The project uses Just, a modern command runner similar to Make but with better ergonomics.

1.1. Quick Start

# List all available recipes
just --list

# Run the interactive chooser
just

# Get help for a specific recipe
just help-recipe <recipe-name>

# Run a recipe
just <recipe-name>

1.2. Installation

To use these recipes, you need to have just installed:

# macOS
brew install just

# Linux (cargo)
cargo install just

# Arch Linux
pacman -S just

# Ubuntu/Debian
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin

1.3. Conventions

  • 🏗️ Build operations

  • 🐳 Docker operations

  • 🧪 Testing operations

  • 🎨 Linting and formatting

  • 🔒 Security operations

  • 📦 Installation and deployment

  • 💾 Database operations

  • 🔧 Development operations

  • 📚 Documentation operations

  • 🚀 Release operations

  • 📊 Monitoring and observability

  • 🧹 Cleanup operations

  • 📈 Statistics and reporting

  • 🔬 CI/CD operations

  • 🌐 Website operations

  • 🔧 Utility operations

  • 🎯 Aliases and shortcuts

2. Recipe Categories

2.1. 📚 Help & Documentation Recipes

2.1.1. help

Display a list of all available recipes.

just help

Output: List of all recipes with their descriptions.

2.1.2. help-recipe RECIPE

Show detailed help for a specific recipe.

just help-recipe build

Parameters:

  • RECIPE - Name of the recipe to show help for

2.1.3. help-full

Show comprehensive documentation with all available recipes.

just help-full

2.1.4. info

Display project information including version, git branch, and tool versions.

just info

Output:

=== Academic Workflow Suite ===
Version: 1.0.0
Git Branch: main
Git Commit: abc1234
Docker Compose: version 2.x.x
Rust: 1.75.0
Elixir: 1.15.0
Node: v20.x.x

2.2. 🏗️ Build Recipes

2.2.1. build

Build all components of the project.

just build

Dependencies: build-core, build-ai-jail, build-backend, build-office-addin, build-cli, build-shared, build-monitoring

Time: ~5-10 minutes

2.2.2. build-all

Clean and build all components from scratch.

just build-all

Dependencies: clean, build

2.2.3. build-release

Build all components in release mode with optimizations.

just build-release

Dependencies: build-core-release, build-ai-jail-release, build-backend-release, build-cli-release, build-shared-release

Note: This produces optimized binaries suitable for production.

2.2.4. build-debug

Build all components in debug mode with debug symbols.

just build-debug

Dependencies: build-core-debug, build-ai-jail-debug, build-backend-debug, build-cli-debug, build-shared-debug

2.2.5. build-core

Build the Rust core engine in release mode.

just build-core

Location: components/core

Output: components/core/target/release/core

2.2.6. build-core-debug

Build the core engine in debug mode.

just build-core-debug

Output: components/core/target/debug/core

2.2.7. build-core-release

Build the core engine in release mode with all optimizations and locked dependencies.

just build-core-release

Flags: --release --locked

2.2.8. build-ai-jail

Build the AI jail container (Rust + Docker).

just build-ai-jail

Steps: 1. Builds Rust binary with cargo build --release 2. Builds Docker image with tag aws-ai-jail:latest

2.2.9. build-backend

Build the Elixir/Phoenix backend.

just build-backend

Steps: 1. Fetches dependencies with mix deps.get 2. Compiles in production mode with MIX_ENV=prod mix compile

2.2.10. build-office-addin

Build the ReScript Office add-in.

just build-office-addin

Steps: 1. Installs npm dependencies 2. Runs npm run build

2.2.11. build-cli

Build the CLI tool in release mode.

just build-cli

Output: cli/target/release/aws

2.2.12. build-shared

Build shared Rust libraries.

just build-shared

Location: components/shared

2.2.13. build-monitoring

Build monitoring components using Docker Compose.

just build-monitoring

2.2.14. build-website

Build the static website.

just build-website

Output: website/dist/

2.2.15. build-cross-all

Cross-compile for all platforms (Linux, macOS, Windows).

just build-cross-all

Dependencies: build-cross-linux, build-cross-macos, build-cross-windows

Note: Requires cross-compilation toolchains to be installed.

2.2.16. build-cross-linux

Cross-compile for Linux x86_64.

just build-cross-linux

Target: x86_64-unknown-linux-gnu

2.2.17. build-cross-macos

Cross-compile for macOS x86_64.

just build-cross-macos

Target: x86_64-apple-darwin

2.2.18. build-cross-windows

Cross-compile for Windows x86_64.

just build-cross-windows

Target: x86_64-pc-windows-gnu

2.2.19. build-pgo

Build with profile-guided optimization.

just build-pgo

Note: Requires cargo-pgo to be installed.

2.3. 🐳 Docker Recipes

2.3.1. docker-build

Build all Docker images.

just docker-build

Images built: - aws-core - aws-backend - aws-ai-jail - aws-nginx

2.3.2. docker-build-no-cache

Build all Docker images without using cache.

just docker-build-no-cache

Use case: When you need a clean build or dependencies have changed.

2.3.3. docker-build-core

Build only the Core Engine Docker image.

just docker-build-core

2.3.4. docker-build-backend

Build only the Backend Service Docker image.

just docker-build-backend

2.3.5. docker-build-ai-jail

Build only the AI Jail Docker image.

just docker-build-ai-jail

2.3.6. docker-build-nginx

Build only the Nginx Docker image.

just docker-build-nginx

2.3.7. docker-dev

Start the development environment using Docker Compose.

just docker-dev
# or
just dev

Compose files: - docker-compose.yml - docker-compose.dev.yml

Services started: - PostgreSQL - Redis - Core Engine - Backend Service - AI Jail - Nginx

2.3.8. docker-prod

Start the production environment.

just docker-prod

Compose files: - docker-compose.yml - docker-compose.prod.yml

2.3.9. docker-up

Alias for docker-dev. Start development environment.

just docker-up

2.3.10. docker-down

Stop all development services.

just docker-down

2.3.11. docker-down-prod

Stop all production services.

just docker-down-prod

2.3.12. docker-restart

Restart the development environment.

just docker-restart

Steps: 1. Stops all services 2. Starts all services

2.3.13. docker-test

Run tests in Docker containers.

just docker-test

Compose files: - docker-compose.yml - docker-compose.test.yml

2.3.14. docker-test-core

Run Core Engine tests in Docker.

just docker-test-core

2.3.15. docker-test-backend

Run Backend Service tests in Docker.

just docker-test-backend

2.3.16. docker-test-integration

Run integration tests in Docker.

just docker-test-integration

2.3.17. docker-logs

View logs for all services.

just docker-logs

2.3.18. docker-logs-core

View Core Engine logs.

just docker-logs-core

2.3.19. docker-logs-backend

View Backend Service logs.

just docker-logs-backend

2.3.20. docker-logs-ai-jail

View AI Jail logs.

just docker-logs-ai-jail

2.3.21. docker-logs-follow

Follow logs in real-time.

just docker-logs-follow

2.3.22. docker-ps

Show status of all services.

just docker-ps

2.3.23. docker-ps-all

Show detailed status of all services.

just docker-ps-all

2.3.24. docker-exec SERVICE CMD

Execute a command in a running service container.

just docker-exec core "ls -la"
just docker-exec backend "mix ecto.migrate"

Parameters:

  • SERVICE - Name of the service (core, backend, postgres, redis, etc.)

  • CMD - Command to execute

2.3.25. docker-shell-core

Open an interactive shell in the Core Engine container.

just docker-shell-core

2.3.26. docker-shell-backend

Open an interactive shell in the Backend Service container.

just docker-shell-backend

2.3.27. docker-shell-postgres

Open a psql shell in the PostgreSQL container.

just docker-shell-postgres

2.3.28. docker-shell-redis

Open a redis-cli shell in the Redis container.

just docker-shell-redis

2.3.29. docker-db-migrate

Run database migrations in Docker.

just docker-db-migrate

2.3.30. docker-db-rollback

Rollback the last database migration in Docker.

just docker-db-rollback

2.3.31. docker-db-reset

Reset the database in Docker (WARNING: Deletes all data).

just docker-db-reset

2.3.32. docker-db-seed

Seed the database in Docker.

just docker-db-seed

2.3.33. docker-db-backup

Backup the PostgreSQL database.

just docker-db-backup

Output: backups/postgres/backup_YYYYMMDD_HHMMSS.sql.gz

2.3.34. docker-db-restore BACKUP_FILE

Restore PostgreSQL database from a backup file.

just docker-db-restore backups/postgres/backup_20231201_120000.sql.gz

Parameters:

  • BACKUP_FILE - Path to the backup file

2.3.35. docker-reset

Reset all Docker data (WARNING: Deletes all data).

just docker-reset

Confirmation required.

2.3.36. docker-clean

Clean up dangling Docker images and containers.

just docker-clean

2.3.37. docker-clean-volumes

Clean up all Docker volumes (WARNING: Deletes data).

just docker-clean-volumes

2.3.38. docker-clean-all

Clean up everything Docker-related (WARNING: Deletes all data).

just docker-clean-all

2.3.39. docker-stats

Show container resource usage (one-time snapshot).

just docker-stats

2.3.40. docker-stats-live

Show container resource usage (live updating).

just docker-stats-live

2.3.41. docker-prometheus

Open Prometheus dashboard at http://localhost:9090.

just docker-prometheus

2.3.42. docker-grafana

Open Grafana dashboard at http://localhost:3000.

just docker-grafana

2.3.43. docker-adminer

Open Adminer database UI at http://localhost:8081.

just docker-adminer

2.3.44. docker-version

Show Docker and Docker Compose versions.

just docker-version

2.3.45. docker-config

Show Docker Compose configuration.

just docker-config

2.3.46. docker-images

List all Academic Workflow Suite Docker images.

just docker-images

2.3.47. docker-volumes

List all Academic Workflow Suite Docker volumes.

just docker-volumes

2.3.48. docker-networks

List all Academic Workflow Suite Docker networks.

just docker-networks

2.3.49. docker-inspect CONTAINER

Inspect a Docker container’s configuration.

just docker-inspect core

Parameters:

  • CONTAINER - Name of the container to inspect

2.3.50. docker-disk-usage

Show Docker disk usage.

just docker-disk-usage

2.4. 🧪 Test Recipes

2.4.1. test

Run all tests (unit, integration, security).

just test

Dependencies: test-unit, test-integration, test-security

Time: ~5-15 minutes

2.4.2. test-all

Run all tests with coverage reports.

just test-all

Dependencies: test-coverage, test-integration, test-security

2.4.3. test-unit

Run all unit tests (Rust, Elixir, ReScript).

just test-unit

Dependencies: test-rust, test-elixir, test-rescript

2.4.4. test-rust

Run Rust tests for all Rust components.

just test-rust

Components tested: - Core Engine - AI Jail - Shared Libraries - CLI

2.4.5. test-rust-release

Run Rust tests in release mode.

just test-rust-release

Use case: Testing release-optimized code

2.4.6. test-rust-verbose

Run Rust tests with verbose output (prints println! statements).

just test-rust-verbose

2.4.7. test-rust-single

Run Rust tests single-threaded (useful for debugging).

just test-rust-single

2.4.8. test-rust-specific TEST

Run a specific Rust test.

just test-rust-specific test_authentication

Parameters:

  • TEST - Name of the test function or module

2.4.9. test-elixir

Run Elixir tests for the backend.

just test-elixir

2.4.10. test-elixir-verbose

Run Elixir tests with verbose output.

just test-elixir-verbose

2.4.11. test-elixir-specific TEST

Run a specific Elixir test file.

just test-elixir-specific test/auth/user_test.exs

Parameters:

  • TEST - Path to the test file

2.4.12. test-rescript

Run ReScript tests for the Office add-in.

just test-rescript

2.4.13. test-rescript-watch

Run ReScript tests in watch mode.

just test-rescript-watch

Use case: Development with auto-rerunning tests

2.4.14. test-integration

Run integration tests.

just test-integration

Location: tests/benchmarks/integration_bench.sh

2.4.15. test-integration-verbose

Run integration tests with verbose output.

just test-integration-verbose

2.4.16. test-security

Run security tests.

just test-security

Tests: - Dependency audits - Container escape tests - Network isolation verification

2.4.17. test-pentest

Run penetration tests.

just test-pentest

Tests: - SQL injection tests - XSS tests

Warning
Only run on authorized systems.

2.4.18. test-fuzz COMPONENT DURATION

Run fuzzing tests on a component.

just test-fuzz core 5m

Parameters:

  • COMPONENT - Name of the component (core, ai-jail, etc.)

  • DURATION - Duration to run fuzzing (default: "1m")

Note: Requires cargo-fuzz to be installed.

2.4.19. test-coverage

Run tests with coverage reports.

just test-coverage

Output: - components/core/target/coverage/index.html (Rust coverage) - components/backend/cover/ (Elixir coverage)

2.4.20. test-coverage-view

Open coverage reports in browser.

just test-coverage-view

2.4.21. test-bench

Run benchmarks.

just test-bench

Components benchmarked: - Core Engine - AI Jail

2.4.22. test-bench-criterion

Run criterion benchmarks (detailed performance testing).

just test-bench-criterion

2.4.23. test-mutate

Run mutation testing.

just test-mutate

Note: Requires cargo-mutants to be installed.

2.4.24. test-property

Run property-based tests.

just test-property

Note: Runs tests with proptest feature enabled.

2.4.25. test-e2e

Run end-to-end tests.

just test-e2e

Location: tests/e2e/

2.4.26. test-smoke

Run smoke tests (quick sanity checks).

just test-smoke

2.4.27. test-load

Run load tests.

just test-load

Location: tests/load/

2.4.28. test-stress

Run stress tests.

just test-stress

Location: tests/stress/

2.5. 🎨 Linting & Formatting Recipes

2.5.1. lint

Run all linters.

just lint

Dependencies: lint-rust, lint-elixir, lint-rescript, lint-shell, lint-yaml, lint-docker, lint-markdown

2.5.2. lint-rust

Lint Rust code with clippy.

just lint-rust

Flags: -D warnings (deny all warnings)

2.5.3. lint-rust-all

Lint Rust code (all targets including tests, benches, examples).

just lint-rust-all

2.5.4. lint-rust-pedantic

Lint Rust code with pedantic clippy lints.

just lint-rust-pedantic

Flags: -W clippy::pedantic

2.5.5. lint-elixir

Lint Elixir code.

just lint-elixir

Tools: - mix format --check-formatted - mix credo --strict

2.5.6. lint-elixir-all

Lint Elixir code with all checks including dialyzer.

just lint-elixir-all

Note: Dialyzer takes longer to run.

2.5.7. lint-rescript

Lint ReScript code.

just lint-rescript

2.5.8. lint-rescript-fix

Lint and auto-fix ReScript code.

just lint-rescript-fix

2.5.9. lint-shell

Lint shell scripts with shellcheck.

just lint-shell

2.5.10. lint-shell-strict

Lint shell scripts with strict mode.

just lint-shell-strict

Flags: -x (follow sources)

2.5.11. lint-yaml

Lint YAML files with yamllint.

just lint-yaml

2.5.12. lint-yaml-strict

Lint YAML files in strict mode.

just lint-yaml-strict

2.5.13. lint-docker

Lint Dockerfiles with hadolint.

just lint-docker

2.5.14. lint-markdown

Lint Markdown files with markdownlint.

just lint-markdown

2.5.15. lint-markdown-fix

Lint and auto-fix Markdown files.

just lint-markdown-fix

2.5.16. lint-json

Lint JSON files.

just lint-json

2.5.17. lint-toml

Lint TOML files with taplo.

just lint-toml

2.5.18. format

Format all code.

just format

Dependencies: format-rust, format-elixir, format-rescript, format-toml

2.5.19. format-rust

Format Rust code with rustfmt.

just format-rust

2.5.20. format-rust-check

Check Rust formatting without modifying files.

just format-rust-check

2.5.21. format-elixir

Format Elixir code.

just format-elixir

2.5.22. format-elixir-check

Check Elixir formatting without modifying files.

just format-elixir-check

2.5.23. format-rescript

Format ReScript code.

just format-rescript

2.5.24. format-toml

Format TOML files with taplo.

just format-toml

2.5.25. format-all

Format all code and auto-fix linting issues.

just format-all

Dependencies: format, lint-markdown-fix, lint-rescript-fix

2.5.26. format-check

Check all formatting without modifying files.

just format-check

Dependencies: format-rust-check, format-elixir-check

2.6. 🔒 Security Recipes

2.6.1. security

Run all security checks.

just security

Dependencies: security-audit, security-secrets, security-pentest, security-deps-check

2.6.2. security-audit

Run security audits for all dependency managers.

just security-audit

Tools: - cargo audit (Rust) - mix hex.audit (Elixir) - npm audit (Node.js)

2.6.3. security-audit-fix

Fix security vulnerabilities automatically where possible.

just security-audit-fix

2.6.4. security-secrets

Scan for secrets in the codebase.

just security-secrets

Location: security/audit-scripts/secret-scan.sh

2.6.5. security-secrets-deep

Deep scan for secrets using trufflehog.

just security-secrets-deep

Note: Requires trufflehog to be installed.

2.6.6. security-pentest

Run penetration tests.

just security-pentest

Tests: - SQL injection - XSS attacks

Warning
Only run on authorized systems.

2.6.7. security-deps-check

Check for outdated dependencies with known vulnerabilities.

just security-deps-check

Tools: - cargo outdated - mix hex.outdated - npm outdated

2.6.8. security-sast

Run Static Application Security Testing.

just security-sast

Tools: - cargo geiger (unsafe Rust usage) - Custom SAST scripts

2.6.9. security-dast

Run Dynamic Application Security Testing.

just security-dast

2.6.10. security-sbom

Generate Software Bill of Materials.

just security-sbom

Output: sbom.json

Note: Requires cargo-sbom to be installed.

2.6.11. security-verify-signatures

Verify release signatures.

just security-verify-signatures

2.6.12. security-container-scan

Scan containers for vulnerabilities.

just security-container-scan

Tool: docker scan

2.6.13. security-container-bench

Run container security benchmark with Trivy.

just security-container-bench

Note: Requires Trivy to be available.

2.6.14. security-cve-check

Check for CVEs in dependencies.

just security-cve-check

Flags: --deny warnings

2.7. 📦 Installation & Deployment Recipes

2.7.1. install

Install all components.

just install

Dependencies: install-core, install-cli, install-office-addin

2.7.2. install-core

Install the core engine.

just install-core

Installation location: ~/.cargo/bin/

2.7.3. install-cli

Install the CLI tool to user’s cargo bin.

just install-cli

Installation location: ~/.cargo/bin/aws

2.7.4. install-cli-system

Install the CLI tool system-wide (requires sudo).

just install-cli-system

Installation location: /usr/local/bin/aws

2.7.5. uninstall-cli-system

Uninstall the CLI tool from system (requires sudo).

just uninstall-cli-system

2.7.6. install-office-addin

Install the Office add-in (sideload).

just install-office-addin

2.7.7. install-completions

Generate shell completions for the CLI.

just install-completions

Output: cli/completions/

2.7.8. install-completions-bash

Install bash completions system-wide (requires sudo).

just install-completions-bash

Installation location: /etc/bash_completion.d/

2.7.9. install-completions-zsh

Install zsh completions to user directory.

just install-completions-zsh

Installation location: ~/.zsh/completion/

2.7.10. install-completions-fish

Install fish completions to user directory.

just install-completions-fish

Installation location: ~/.config/fish/completions/

2.7.11. deploy-prod

Deploy to production environment.

just deploy-prod

Steps: 1. Build in release mode 2. Run tests 3. Build Docker images without cache 4. Deploy using deployment script

Note: Requires production credentials.

2.7.12. deploy-staging

Deploy to staging environment.

just deploy-staging

2.7.13. deploy-website-gh

Deploy website to GitHub Pages.

just deploy-website-gh

2.7.14. deploy-website-netlify

Deploy website to Netlify.

just deploy-website-netlify

Note: Requires Netlify CLI and authentication.

2.8. 💾 Database Recipes

2.8.1. db-init

Initialize databases.

just db-init

Script: scripts/management/init-database.sh

2.8.2. db-reset

Reset databases (WARNING: Deletes all data).

just db-reset

2.8.3. db-backup

Backup all databases.

just db-backup

Script: scripts/management/backup.sh

2.8.4. db-restore BACKUP_FILE

Restore databases from a backup file.

just db-restore backups/backup_20231201.tar.gz

Parameters:

  • BACKUP_FILE - Path to the backup file

2.8.5. db-migration-create NAME

Create a new database migration.

just db-migration-create add_user_preferences

Parameters:

  • NAME - Name of the migration

Output: New migration file in components/backend/priv/repo/migrations/

2.8.6. db-migrate

Run database migrations.

just db-migrate

2.8.7. db-rollback

Rollback the last database migration.

just db-rollback

2.8.8. db-rollback-to VERSION

Rollback database to a specific version.

just db-rollback-to 20231201120000

Parameters:

  • VERSION - Migration version timestamp

2.8.9. db-migration-status

Show database migration status.

just db-migration-status

Output: List of migrations with their status (up/down)

2.8.10. db-seed

Seed the database with sample data.

just db-seed

Script: components/backend/priv/repo/seeds.exs

2.8.11. db-drop

Drop the database (WARNING: Deletes all data).

just db-drop

2.8.12. db-create

Create the database.

just db-create

2.8.13. db-setup

Setup database (create + migrate + seed).

just db-setup

2.9. 🔧 Development Recipes

2.9.1. dev

Start development environment (alias for docker-dev).

just dev

2.9.2. dev-detached

Start development environment in detached mode.

just dev-detached

2.9.3. dev-down

Stop development environment (alias for docker-down).

just dev-down

2.9.4. dev-restart

Restart development environment (alias for docker-restart).

just dev-restart

2.9.5. dev-watch-rust

Watch Rust files and rebuild/test on changes.

just dev-watch-rust

Note: Requires cargo-watch to be installed.

2.9.6. dev-watch-rescript

Watch ReScript files and rebuild on changes.

just dev-watch-rescript

2.9.7. dev-watch

Watch all files and rebuild on changes.

just dev-watch

Dependencies: dev-watch-rust, dev-watch-rescript

Note: Run in separate terminals as they both watch in foreground.

2.9.8. dev-hot-reload

Start hot reload development for Rust.

just dev-hot-reload

2.9.9. dev-shell

Start a development shell with Nix.

just dev-shell

Note: Requires Nix with flakes enabled.

2.9.10. dev-format

Format code in all components (alias for format).

just dev-format

2.9.11. dev-lint

Lint code in all components (alias for lint).

just dev-lint

2.9.12. dev-deps-update

Update dependencies for all components.

just dev-deps-update

Updates: - Cargo dependencies (Rust) - Mix dependencies (Elixir) - NPM dependencies (Node.js)

2.9.13. dev-deps-check

Check that all required development tools are installed.

just dev-deps-check

Checks: - Rust (rustc) - Elixir - Node.js - Docker - Just

2.9.14. dev-setup

Setup development environment.

just dev-setup

Steps: 1. Install Rust components (clippy, rustfmt) 2. Install Cargo tools (audit, watch, tarpaulin, outdated) 3. Install NPM dependencies

2.9.15. dev-rebuild

Clean and rebuild development environment.

just dev-rebuild

Dependencies: clean, build, dev-restart

2.10. 📚 Documentation Recipes

2.10.1. docs

Generate all documentation.

just docs

Dependencies: docs-rust, docs-elixir, docs-website

2.10.2. docs-rust

Generate Rust documentation.

just docs-rust

Output: target/doc/

2.10.3. docs-rust-open

Generate and open Rust documentation in browser.

just docs-rust-open

2.10.4. docs-elixir

Generate Elixir documentation.

just docs-elixir

Output: components/backend/doc/

2.10.5. docs-elixir-open

Generate and open Elixir documentation in browser.

just docs-elixir-open

2.10.6. docs-website

Build website documentation (alias for build-website).

just docs-website

2.10.7. docs-serve

Serve documentation locally on http://localhost:8000.

just docs-serve

2.10.8. docs-serve-built

Serve built website on http://localhost:8000.

just docs-serve-built

2.10.9. docs-api

Generate API documentation.

just docs-api

Tool: Phoenix Swagger

2.10.10. docs-changelog

Generate changelog from git history.

just docs-changelog

Output: CHANGELOG.md

Note: Requires git-cliff to be installed.

2.11. 🚀 Release Recipes

2.11.1. release VERSION

Create a new release.

just release 1.2.3

Parameters:

  • VERSION - Semantic version number (e.g., 1.2.3)

Script: release/scripts/release.sh

2.11.2. release-patch

Create a new patch release (0.0.x).

just release-patch

2.11.3. release-minor

Create a new minor release (0.x.0).

just release-minor

2.11.4. release-major

Create a new major release (x.0.0).

just release-major

2.11.5. release-package

Package for all platforms.

just release-package

Script: release/scripts/package.sh --all

2.11.6. release-package-linux

Package for Linux only.

just release-package-linux

2.11.7. release-package-macos

Package for macOS only.

just release-package-macos

2.11.8. release-package-windows

Package for Windows only.

just release-package-windows

2.11.9. release-verify VERSION

Verify release artifacts.

just release-verify 1.2.3

Parameters:

  • VERSION - Version to verify

Script: release/verify/verify_release.sh

2.11.10. release-sign VERSION

Sign release artifacts.

just release-sign 1.2.3

Parameters:

  • VERSION - Version to sign

Note: Requires GPG key configuration.

2.11.11. release-upload VERSION

Upload release artifacts to GitHub.

just release-upload 1.2.3

Parameters:

  • VERSION - Version to upload

Note: Requires GitHub CLI (gh) and authentication.

2.11.12. release-github VERSION

Create a GitHub release.

just release-github 1.2.3

Parameters:

  • VERSION - Version for the release

Note: Uses CHANGELOG.md for release notes.

2.12. 📊 Monitoring & Observability Recipes

2.12.1. monitoring-up

Start monitoring stack.

just monitoring-up

Components: - Prometheus - Grafana - Jaeger

2.12.2. monitoring-down

Stop monitoring stack.

just monitoring-down

2.12.3. logs

View logs for all services (follow mode).

just logs

2.12.4. logs-service SERVICE

View logs for a specific service.

just logs-service backend

Parameters:

  • SERVICE - Name of the service

2.12.5. logs-tail N

View last N lines of logs.

just logs-tail 500

Parameters:

  • N - Number of lines (default: 100)

2.12.6. health

Run health check on all services.

just health

Script: scripts/management/health-check.sh

2.12.7. health-verbose

Run health check with verbose output.

just health-verbose

2.12.8. status

Check service status and system resources.

just status

Output: - Service status from docker-compose ps - Resource usage from docker stats

2.12.9. monitor

Monitor system resources continuously.

just monitor

Tool: docker stats (live)

2.12.10. metrics

Open metrics dashboard (Prometheus).

just metrics

2.12.11. traces

Open traces dashboard (Jaeger).

just traces

2.13. 🧹 Cleanup Recipes

2.13.1. clean

Clean all build artifacts.

just clean

Dependencies: clean-rust, clean-elixir, clean-rescript, clean-docker, clean-temp

2.13.2. clean-all

Clean everything including caches and dependencies.

just clean-all

Dependencies: clean, clean-cache, clean-deps

2.13.3. clean-rust

Clean Rust build artifacts.

just clean-rust

Removes: - target/ directories in all Rust components

2.13.4. clean-elixir

Clean Elixir build artifacts.

just clean-elixir

Removes: - _build/ directory - deps/ directory

2.13.5. clean-rescript

Clean ReScript build artifacts.

just clean-rescript

Removes: - node_modules/ directory - dist/ directory

2.13.6. clean-docker

Clean Docker images and containers.

just clean-docker

2.13.7. clean-temp

Clean temporary files.

just clean-temp

Removes: - .log files - .tmp files - Backup files (*~) - .DS_Store files

2.13.8. clean-cache

Clean build caches.

just clean-cache

Removes: - Cargo registry cache - Cargo git checkouts

2.13.9. clean-deps

Clean dependencies.

just clean-deps

Removes: - Elixir deps/ - Node.js node_modules/

2.13.10. clean-website

Clean website build artifacts.

just clean-website

2.13.11. clean-logs

Clean all log files.

just clean-logs

2.13.12. clean-backups

Clean old backup files (older than 30 days).

just clean-backups

2.14. 📈 Statistics & Reporting Recipes

2.14.1. stats

Show project statistics.

just stats

Output: - Lines of code (tokei) - Git statistics - File counts

2.14.2. stats-code

Show code statistics sorted by lines.

just stats-code

Tool: tokei

2.14.3. stats-git

Show Git statistics.

just stats-git

Output: - Total commits - Total contributors - Repository size - Top contributors

2.14.4. stats-deps

Show dependency statistics.

just stats-deps

Output: - Rust crate count - Elixir package count - NPM package count

2.14.5. stats-test

Show test statistics.

just stats-test

Output: - Number of Rust tests - Number of Elixir tests - Number of ReScript tests

2.14.6. stats-docker

Show Docker statistics.

just stats-docker

Output: - Disk usage - Container counts - Image counts - Volume counts

2.14.7. stats-performance

Generate performance report.

just stats-performance

2.14.8. stats-security

Generate security report.

just stats-security

Tool: cargo audit

2.15. 🔬 CI/CD Recipes

2.15.1. ci

Run full CI pipeline locally.

just ci

Dependencies: ci-lint, ci-test, ci-build, ci-security

Time: ~15-30 minutes

2.15.2. ci-lint

Run CI linting (alias for lint).

just ci-lint

2.15.3. ci-test

Run CI tests (alias for test).

just ci-test

2.15.4. ci-build

Run CI build (alias for build-release).

just ci-build

2.15.5. ci-security

Run CI security checks (alias for security).

just ci-security

2.15.6. ci-coverage

Run CI with coverage (alias for test-coverage).

just ci-coverage

2.15.7. ci-validate

Validate CI configuration files.

just ci-validate

Validates: .gitlab-ci.yml

2.15.8. ci-pre-commit

Run pre-commit hooks.

just ci-pre-commit

Note: Requires pre-commit to be installed.

2.15.9. ci-pre-push

Run pre-push checks.

just ci-pre-push

Steps: 1. Lint all code 2. Run all tests

2.16. 🌐 Website Recipes

2.16.1. website-install

Install website build dependencies.

just website-install

Installs: - html-minifier - clean-css-cli - uglify-js - imagemin-cli

2.16.2. website-build

Build the website (alias for build-website).

just website-build

2.16.3. website-serve

Serve website in development mode.

just website-serve

2.16.4. website-serve-built

Serve built website (alias for docs-serve-built).

just website-serve-built

2.16.5. website-clean

Clean website build (alias for clean-website).

just website-clean

2.16.6. website-optimize

Optimize website assets.

just website-optimize

Optimizes: - CSS (minification) - JavaScript (minification) - Images (optimization)

2.16.7. website-validate

Validate HTML and CSS.

just website-validate

Tool: html5validator

2.16.8. website-test

Test website links.

just website-test

Tool: linkchecker

2.16.9. website-lighthouse

Run Lighthouse performance audit.

just website-lighthouse

Output: lighthouse-report.html

2.16.10. website-stats

Show website statistics.

just website-stats

Output: - HTML file count - CSS file count - JS file count - Total size - Build size

2.16.11. website-deploy-gh

Deploy website to GitHub Pages (alias for deploy-website-gh).

just website-deploy-gh

2.16.12. website-deploy-netlify

Deploy website to Netlify (alias for deploy-website-netlify).

just website-deploy-netlify

2.17. 🔧 Utility Recipes

2.17.1. rsr-validate

Validate RSR (Rust Safety Rules) compliance.

just rsr-validate

Checks: - Type safety - Memory safety - Documentation completeness - .well-known files - Build system - TPCF compliance - Test coverage

2.17.2. env-check

Check environment setup (alias for dev-deps-check).

just env-check

2.17.3. env-show

Show environment variables.

just env-show

Filters: RUST*, CARGO*, MIX*, NODE*, DOCKER*

2.17.4. tools-update

Update all development tools.

just tools-update

Updates: - Rustup toolchain - Cargo-installed tools

2.17.5. tools-install

Install all development tools.

just tools-install

Installs: - cargo-watch - cargo-audit - cargo-tarpaulin - cargo-outdated - cargo-edit - cargo-deny - cargo-geiger - cargo-sbom

2.17.6. bench-all

Run all benchmarks (alias for test-bench).

just bench-all

2.17.7. profile COMPONENT

Profile an application component.

just profile core

Parameters:

  • COMPONENT - Name of the component to profile

Tool: cargo flamegraph

Note: Requires cargo-flamegraph to be installed.

2.17.8. quick

Run quick checks (fast CI).

just quick

Dependencies: format-check, lint, test-unit

Time: ~3-5 minutes

2.17.9. full

Run full checks (complete CI).

just full

Dependencies: lint, test, build

Time: ~15-30 minutes

2.17.10. backup

Create a backup of the system.

just backup

Script: scripts/management/backup.sh

2.17.11. restore BACKUP_FILE

Restore from a backup file.

just restore backups/backup_20231201.tar.gz

Parameters:

  • BACKUP_FILE - Path to the backup file

2.17.12. init

Initialize project for a new contributor.

just init

Steps: 1. Run dev-setup 2. Build all components 3. Run all tests 4. Display next steps

Time: ~10-20 minutes

2.17.13. version

Show version information for all tools.

just version

Shows versions of: - Project - Rust - Cargo - Elixir - Node.js - Docker - Docker Compose - Just

2.17.14. open-browser

Open project in browser.

just open-browser

2.17.15. report

Generate a project report.

just report

Output: PROJECT_REPORT.md

Contents: - Project statistics - Code metrics - Git statistics

2.17.16. verify

Verify project integrity.

just verify

Checks: 1. Code formatting 2. Linting 3. Tests 4. Security audits

Time: ~15-30 minutes

2.18. 🎯 Aliases & Shortcuts

These are convenient single-letter aliases for common commands:

Alias Recipe Description

b

build

Build all components

t

test

Run all tests

l

lint

Run all linters

f

format

Format all code

c

clean

Clean all build artifacts

d

docker-up

Start Docker development environment

dd

docker-down

Stop Docker development environment

dr

docker-restart

Restart Docker development environment

dl

docker-logs

View Docker logs

ds

docker-ps

Show Docker service status

i

install

Install all components

u

uninstall-cli-system

Uninstall CLI from system

v

version

Show version information

h

help

Show help message

s

stats

Show project statistics

q

quick

Run quick checks

ci-local

ci

Run CI pipeline locally

up

dev

Start development environment

down

dev-down

Stop development environment

restart

dev-restart

Restart development environment

3. Common Workflows

3.1. New Contributor Setup

# Clone the repository
git clone https://github.com/Hyperpolymath/academic-workflow-suite.git
cd academic-workflow-suite

# Initialize the project
just init

# Start development environment
just dev

# In another terminal, run tests
just test

3.2. Daily Development Workflow

# Start development environment
just up

# Watch for changes and auto-rebuild
just dev-watch-rust  # In one terminal
just dev-watch-rescript  # In another terminal

# Make changes to code...

# Run quick checks before committing
just quick

# Or run full checks
just full

3.3. Pre-commit Workflow

# Format all code
just format

# Run linters
just lint

# Run tests
just test

# If everything passes, commit
git add .
git commit -m "Your commit message"

3.4. Release Workflow

# Run full CI locally
just ci

# Create release
just release 1.2.3

# Package for all platforms
just release-package

# Verify release artifacts
just release-verify 1.2.3

# Sign release
just release-sign 1.2.3

# Create GitHub release
just release-github 1.2.3

# Upload artifacts
just release-upload 1.2.3

3.5. Debugging Workflow

# Start development environment
just dev

# View logs
just logs

# Or view logs for specific service
just logs-service backend

# Open shell in container
just docker-shell-core

# Run health check
just health-verbose

# Check service status
just status

3.6. Security Audit Workflow

# Run all security checks
just security

# Or run individual checks
just security-audit
just security-secrets
just security-deps-check
just security-container-scan

# Generate SBOM
just security-sbom

# Check for CVEs
just security-cve-check

4. Configuration

4.1. Environment Variables

The Justfile uses the following environment variables (loaded from .env if present):

  • DOCKER_COMPOSE - Docker Compose command (default: "docker-compose")

  • CLI_BINARY_NAME - CLI binary name (default: "aws")

  • CLI_INSTALL_PATH - CLI installation path (default: "/usr/local/bin")

  • WEBSITE_BUILD_DIR - Website build directory (default: "website/dist")

4.2. Shell Settings

set shell := ["bash", "-uc"]
set dotenv-load := true
set export := true
set positional-arguments := true
  • Uses bash as the shell

  • Automatically loads .env file

  • Exports all variables to recipes

  • Enables positional arguments

5. Tips & Tricks

5.1. Interactive Recipe Chooser

Run just without arguments to get an interactive chooser (if fzf is installed):

just

5.2. Tab Completion

Install shell completions for better tab completion:

# For bash
just install-completions-bash

# For zsh
just install-completions-zsh

# For fish
just install-completions-fish

5.3. Listing Recipes

# List all recipes
just --list

# List recipes with descriptions
just --list --list-heading $'Available recipes:\n'

# Search for specific recipes
just --list | grep docker

5.4. Recipe Documentation

# Show recipe source
just --show build

# Show all recipes in a category
just --list | grep "^docker-"

5.5. Running Multiple Recipes

# Run multiple recipes sequentially
just clean build test

# Run recipes with dependencies
just full  # Runs lint, test, and build

5.6. Dry Run

# See what commands would be executed without running them
just --dry-run build

5.7. Verbose Mode

# Show commands being executed
just --verbose build

6. Troubleshooting

6.1. Common Issues

6.1.1. Recipe Not Found

$ just biuld
error: Justfile does not contain recipe `biuld`.
Did you mean `build`?

Solution: Check recipe spelling with just --list

6.1.2. Docker Permission Denied

$ just docker-up
ERROR: Couldn't connect to Docker daemon

Solutions: - Add user to docker group: sudo usermod -aG docker $USER - Restart shell or log out/in - Start Docker daemon: sudo systemctl start docker

6.1.3. Cargo Command Not Found

$ just build
cargo: command not found

Solution: Install Rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

6.1.4. Mix Command Not Found

$ just build-backend
mix: command not found

Solution: Install Elixir: https://elixir-lang.org/install.html

6.1.5. NPM Command Not Found

$ just build-office-addin
npm: command not found

Solution: Install Node.js: https://nodejs.org/

6.2. Debug Mode

For debugging Justfile issues:

# Show detailed execution
just --verbose --dry-run <recipe>

# Show Justfile evaluation
just --evaluate

6.3. Getting Help

If you encounter issues:

  1. Check the cookbook: This document

  2. Check recipe documentation: just help-recipe <recipe>

  3. Check logs: just logs

  4. Check service status: just status

  5. Run health check: just health-verbose

  6. Check project documentation: README.md, CONTRIBUTING.md

  7. Ask for help: Create an issue on GitHub

7. Appendix

7.1. Complete Recipe Reference

Recipe Count Description

50+

Build recipes

60+

Docker recipes

40+

Test recipes

30+

Linting & formatting recipes

20+

Security recipes

20+

Installation & deployment recipes

15+

Database recipes

15+

Development recipes

15+

Documentation recipes

15+

Release recipes

10+

Monitoring recipes

15+

Cleanup recipes

10+

Statistics recipes

10+

CI/CD recipes

10+

Website recipes

20+

Utility recipes

20+

Aliases

300+

Total recipes

7.2. Tool Requirements

Required tools:

  • Rust (rustc, cargo)

  • Elixir (elixir, mix)

  • Node.js (node, npm)

  • Docker (docker, docker-compose)

  • Just (just)

  • Git

Optional tools for enhanced functionality:

  • cargo-watch - File watching for Rust

  • cargo-audit - Security auditing

  • cargo-tarpaulin - Code coverage

  • cargo-outdated - Dependency updates

  • cargo-edit - Dependency management

  • cargo-deny - Dependency graph analysis

  • cargo-geiger - Unsafe code detection

  • cargo-sbom - SBOM generation

  • cargo-flamegraph - Performance profiling

  • shellcheck - Shell script linting

  • yamllint - YAML linting

  • hadolint - Dockerfile linting

  • markdownlint - Markdown linting

  • pre-commit - Git hooks

  • tokei - Code statistics

  • git-cliff - Changelog generation

  • gh - GitHub CLI

  • netlify - Netlify CLI

  • trufflehog - Secret scanning

  • trivy - Container scanning

7.3. External Resources

7.4. License

This cookbook is part of the Academic Workflow Suite project and is licensed under the same terms as the project (GNU Affero General Public License v3.0).

7.5. Contributing

To contribute to this cookbook:

  1. Fork the repository

  2. Make your changes

  3. Submit a pull request

See CONTRIBUTING.md for detailed guidelines.

7.6. Changelog

Version Date Changes

1.0.0

2025-12-01

Initial release of comprehensive Justfile cookbook with 300+ recipes

8. Index

A comprehensive index of all recipes is available by running:

just --list

End of Cookbook