# Justfile Recipes - Quick Reference\n\n## Authentication (auth.just)\n\n```\n# Login & Logout\njust auth-login <user>              # Login to platform\njust auth-logout                    # Logout current session\njust whoami                         # Show current user status\n\n# MFA Setup\njust mfa-enroll-totp                # Enroll in TOTP MFA\njust mfa-enroll-webauthn            # Enroll in WebAuthn MFA\njust mfa-verify <code>              # Verify MFA code\n\n# Sessions\njust auth-sessions                  # List active sessions\njust auth-revoke-session <id>       # Revoke specific session\njust auth-revoke-all                # Revoke all other sessions\n\n# Workflows\njust auth-login-prod <user>         # Production login (MFA required)\njust auth-quick                     # Quick re-authentication\n\n# Help\njust auth-help                      # Complete authentication guide\n```\n\n## KMS (kms.just)\n\n```\n# Encryption\njust kms-encrypt <file>             # Encrypt file with RustyVault\njust kms-decrypt <file>             # Decrypt file\njust encrypt-config <file>          # Encrypt configuration file\n\n# Backends\njust kms-backends                   # List available backends\njust kms-test-all                   # Test all backends\njust kms-switch-backend <backend>   # Change default backend\n\n# Key Management\njust kms-generate-key               # Generate AES256 key\njust kms-list-keys                  # List encryption keys\njust kms-rotate-key <id>            # Rotate key\n\n# Bulk Operations\njust encrypt-env-files [dir]        # Encrypt all .env files\njust encrypt-configs [dir]          # Encrypt all configs\njust decrypt-all-files <dir>        # Decrypt all .enc files\n\n# Workflows\njust kms-setup                      # Setup KMS for project\njust quick-encrypt <file>           # Fast encrypt\njust quick-decrypt <file>           # Fast decrypt\n\n# Help\njust kms-help                       # Complete KMS guide\n```\n\n## Orchestrator (orchestrator.just)\n\n```\n# Status\njust orch-status                    # Show orchestrator status\njust orch-health                    # Health check\njust orch-info                      # Detailed information\n\n# Tasks\njust orch-tasks                     # List all tasks\njust orch-tasks-running             # Show running tasks\njust orch-tasks-failed              # Show failed tasks\njust orch-task-cancel <id>          # Cancel task\njust orch-task-retry <id>           # Retry failed task\n\n# Workflows\njust workflow-list                  # List all workflows\njust workflow-status <id>           # Show workflow status\njust workflow-monitor <id>          # Monitor real-time\njust workflow-logs <id>             # Show logs\n\n# Batch Operations\njust batch-submit <file>            # Submit batch workflow\njust batch-monitor <id>             # Monitor batch progress\njust batch-rollback <id>            # Rollback batch\njust batch-cancel <id>              # Cancel batch\n\n# Validation\njust orch-validate <file>           # Validate KCL workflow\njust workflow-dry-run <file>        # Simulate execution\n\n# Cleanup\njust workflow-cleanup               # Clean completed workflows\njust workflow-cleanup-old <days>    # Clean old workflows\njust workflow-cleanup-failed        # Clean failed workflows\n\n# Quick Workflows\njust quick-server-create <infra>    # Quick server creation\njust quick-taskserv-install <t> <i> # Quick taskserv install\njust quick-cluster-deploy <c> <i>   # Quick cluster deploy\n\n# Help\njust orch-help                      # Complete orchestrator guide\n```\n\n## Plugin Testing\n\n```\njust test-plugins                   # Test all plugins\njust test-plugin-auth               # Test auth plugin\njust test-plugin-kms                # Test KMS plugin\njust test-plugin-orch               # Test orchestrator plugin\njust list-plugins                   # List installed plugins\n```\n\n## Common Workflows\n\n### Complete Authentication Setup\n\n```\njust auth-login alice\njust mfa-enroll-totp\njust auth-status\n```\n\n### Production Deployment Workflow\n\n```\n# Login with MFA\njust auth-login-prod alice\n\n# Encrypt sensitive configs\njust encrypt-config prod/secrets.yaml\njust encrypt-env-files ./config\n\n# Submit batch workflow\njust batch-submit workflows/deploy-prod.ncl\njust batch-monitor <workflow-id>\n```\n\n### KMS Setup and Testing\n\n```\n# Setup KMS\njust kms-setup\n\n# Test all backends\njust kms-test-all\n\n# Encrypt project configs\njust encrypt-configs config/\n```\n\n### Monitoring Operations\n\n```\n# Check orchestrator health\njust orch-health\n\n# Monitor running tasks\njust orch-tasks-running\n\n# View workflow logs\njust workflow-logs <workflow-id>\n\n# Check metrics\njust orch-metrics\n```\n\n### Cleanup Operations\n\n```\n# Cleanup old workflows\njust workflow-cleanup-old 30\n\n# Cleanup failed workflows\njust workflow-cleanup-failed\n\n# Decrypt all files for migration\njust decrypt-all-files ./encrypted\n```\n\n## Tips\n\n1. **Help is Built-in**: Every module has a help recipe\n   - `just auth-help`\n   - `just kms-help`\n   - `just orch-help`\n\n2. **Tab Completion**: Use `just --list` to see all available recipes\n\n3. **Dry-Run**: Use `just -n <recipe>` to see what would be executed\n\n4. **Shortcuts**: Many recipes have short aliases\n   - `just whoami` = `just auth-status`\n\n5. **Error Handling**: Destructive operations require confirmation\n\n6. **Composition**: Combine recipes for complex workflows\n\n   ```bash\n   just auth-login alice && just orch-health && just workflow-list\n   ```\n\n## Recipe Count\n\n- **Auth**: 29 recipes\n- **KMS**: 38 recipes\n- **Orchestrator**: 56 recipes\n- **Total**: 123 recipes\n\n## Documentation\n\n- Full authentication guide: `just auth-help`\n- Full KMS guide: `just kms-help`\n- Full orchestrator guide: `just orch-help`\n- Security system: `docs/architecture/adr-009-security-system-complete.md`\n\n---\n\n**Quick Start**: `just help` → `just auth-help` → `just auth-login <user>` → `just mfa-enroll-totp`
