@@ -901,3 +901,116 @@ build-riscv:
901901# Run panic-attacker pre-commit scan
902902assail :
903903 @ command -v panic-attack >/ dev/ null 2 >&1 && panic-attack assail . || echo " panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
904+
905+ # ═══════════════════════════════════════════════════════════════════════════════
906+ # ONBOARDING & DIAGNOSTICS
907+ # ═══════════════════════════════════════════════════════════════════════════════
908+
909+ # Check all required toolchain dependencies and report health
910+ doctor :
911+ #!/usr/bin/env bash
912+ echo " ═══════════════════════════════════════════════════"
913+ echo " Cloudguard Cli Doctor — Toolchain Health Check"
914+ echo " ═══════════════════════════════════════════════════"
915+ echo " "
916+ PASS=0; FAIL=0; WARN=0
917+ check() {
918+ local name=" $1" cmd=" $2" min=" $3"
919+ if command -v " $cmd" >/ dev/ null 2 >&1 ; then
920+ VER=$(" $cmd" --version 2 >&1 | head -1)
921+ echo " [OK] $name — $VER"
922+ PASS=$((PASS + 1 ))
923+ else
924+ echo " [FAIL] $name — not found (need $min+)"
925+ FAIL=$((FAIL + 1 ))
926+ fi
927+ }
928+ check " just" just " 1.25"
929+ check " git" git " 2.40"
930+ check " Rust (cargo)" cargo " 1.80"
931+ check " Zig" zig " 0.13"
932+ # Optional tools
933+ if command -v panic-attack >/ dev/ null 2 >&1 ; then
934+ echo " [OK] panic-attack — available"
935+ PASS=$((PASS + 1 ))
936+ else
937+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
938+ WARN=$((WARN + 1 ))
939+ fi
940+ echo " "
941+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
942+ if [ " $FAIL" -gt 0 ]; then
943+ echo " Run 'just heal' to attempt automatic repair."
944+ exit 1
945+ fi
946+ echo " All required tools present."
947+
948+ # Attempt to automatically install missing tools
949+ heal :
950+ #!/usr/bin/env bash
951+ echo " ═══════════════════════════════════════════════════"
952+ echo " Cloudguard Cli Heal — Automatic Tool Installation"
953+ echo " ═══════════════════════════════════════════════════"
954+ echo " "
955+ if ! command -v cargo >/ dev/ null 2 >&1 ; then
956+ echo " Installing Rust via rustup..."
957+ curl --proto ' =https' --tlsv1.2 -sSf https:// sh.rustup.rs | sh -s -- -y
958+ source " $HOME/.cargo/env"
959+ fi
960+ if ! command -v just >/ dev/ null 2 >&1 ; then
961+ echo " Installing just..."
962+ cargo install just 2 >/ dev/ null || echo " Install just from https://just.systems"
963+ fi
964+ echo " "
965+ echo " Heal complete. Run 'just doctor' to verify."
966+
967+ # Guided tour of the project structure and key concepts
968+ tour :
969+ #!/usr/bin/env bash
970+ echo " ═══════════════════════════════════════════════════"
971+ echo " Cloudguard Cli — Guided Tour"
972+ echo " ═══════════════════════════════════════════════════"
973+ echo " "
974+ echo ' // SPDX-License-Identifier: PMPL-1.0-or-later'
975+ echo " "
976+ echo " Key directories:"
977+ echo " src/ Source code"
978+ echo " ffi/ Foreign function interface (Zig)"
979+ echo " src/abi/ Idris2 ABI definitions"
980+ echo " docs/ Documentation"
981+ echo " tests/ Test suite"
982+ echo " .github/workflows/ CI/CD workflows"
983+ echo " contractiles/ Must/Trust/Dust contracts"
984+ echo " .machine_readable/ Machine-readable metadata"
985+ echo " container/ Container configuration"
986+ echo " examples/ Usage examples"
987+ echo " "
988+ echo " Quick commands:"
989+ echo " just doctor Check toolchain health"
990+ echo " just heal Fix missing tools"
991+ echo " just help-me Common workflows"
992+ echo " just default List all recipes"
993+ echo " "
994+ echo " Read more: README.adoc, EXPLAINME.adoc"
995+
996+ # Show help for common workflows
997+ help-me :
998+ #!/usr/bin/env bash
999+ echo " ═══════════════════════════════════════════════════"
1000+ echo " Cloudguard Cli — Common Workflows"
1001+ echo " ═══════════════════════════════════════════════════"
1002+ echo " "
1003+ echo "FIRST TIME SETUP : "
1004+ echo " just doctor Check toolchain"
1005+ echo " just heal Fix missing tools"
1006+ echo " "
1007+ echo " DEVELOPMENT:"
1008+ echo " cargo build Build the project"
1009+ echo " cargo test Run tests"
1010+ echo " "
1011+ echo "PRE -COMMIT : "
1012+ echo " just assail Run panic-attacker scan"
1013+ echo " "
1014+ echo "LEARN : "
1015+ echo " just tour Guided project tour"
1016+ echo " just default List all recipes"
0 commit comments