{
  "report_info": {
    "version": "9.0.1",
    "generated_at": "2026-06-28T11:16:28Z",
    "binary_name": "global-launcher"
  },
  "binary": {
    "name": "global-launcher",
    "path": "/opt/kodachi/dashboard/hooks/global-launcher",
    "timestamp": "2026-06-28T11:16:28Z",
    "file_info": {
      "size": 2028320,
      "sha256": "3425017691638e22d84a49a8b89a10666764ef789a33bd3680dc0d5eaa36996a"
    },
    "flag_n": {
      "command": "info",
      "data": {
        "author": "Warith Al Maawali",
        "copyright": "© 2026 Linux Kodachi",
        "description": "Global launcher for Kodachi dashboard binaries with execution folder containment",
        "features": [
          "Dynamic binary discovery and deployment",
          "Execution folder containment for security",
          "Symlink-based global access",
          "Comprehensive error handling and logging",
          "Support for both Rust and Gambas binaries",
          "Deployment verification and rollback",
          "JSON and text output formats",
          "Zero hardcoded paths - fully dynamic"
        ],
        "license": "Proprietary",
        "name": "global-launcher",
        "securityFeatures": {
          "authentication": "Uses OS filesystem permissions; symlink ownership verified by comparing symlink target to current executable path",
          "encryption": "No encryption; configuration is statically embedded in the binary to prevent tampering via external config files",
          "inputValidation": "All binary names and paths are validated against security rules",
          "rateLimiting": "Configurable timeouts prevent resource exhaustion"
        },
        "systemRequirements": {
          "dependencies": [
            "cli-core library",
            "logs-hook service",
            "symlink support in filesystem"
          ],
          "os": "Linux (Debian-based, specifically Kodachi OS)",
          "privileges": "root/sudo for global deployment"
        },
        "version": "9.8.4 (build 319)",
        "website": "https://digi77.com"
      },
      "errors": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-06-28T11:16:28.419102864Z",
      "version": "9.8.4 (build 319)",
      "warnings": []
    },
    "flag_v": {
      "command": "version",
      "data": {
        "buildDate": "REDACTED-BUILD-TIME",
        "gitCommit": "d739424",
        "name": "global-launcher",
        "rustVersion": "rustc 1.96.0 (ac68faa20 2026-05-25)",
        "version": "9.8.4 (build 319)"
      },
      "errors": [],
      "metadata": {
        "executionTime": 1,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-06-28T11:16:28.516892895Z",
      "version": "9.8.4 (build 319)",
      "warnings": []
    },
    "flag_h": {
      "command": "help",
      "data": {
        "commandCategories": [
          {
            "category": "Management Commands",
            "commands": [
              {
                "description": "Deploy global symlinks for all dashboard binaries",
                "examples": [
                  "sudo ./global-launcher deploy",
                  "sudo ./global-launcher deploy --json",
                  "sudo ./global-launcher deploy --force"
                ],
                "name": "deploy",
                "options": [
                  {
                    "default": "false",
                    "description": "Force deployment even if binaries exist",
                    "flag": "--force"
                  },
                  {
                    "default": "false",
                    "description": "Skip verification after deployment",
                    "flag": "--no-verify"
                  },
                  {
                    "default": "false",
                    "description": "Save SHA256 hash report to results directory",
                    "flag": "--save-hashes"
                  }
                ],
                "requires_sudo": false,
                "usage": "global-launcher deploy [OPTIONS]"
              },
              {
                "description": "Verify deployed symlinks are working",
                "examples": [
                  "./global-launcher verify",
                  "./global-launcher verify --json",
                  "./global-launcher verify --detailed"
                ],
                "name": "verify",
                "options": [
                  {
                    "default": "false",
                    "description": "Show detailed verification info",
                    "flag": "--detailed"
                  },
                  {
                    "default": "false",
                    "description": "Save SHA256 hash report to results directory",
                    "flag": "--save-hashes"
                  }
                ],
                "requires_sudo": false,
                "usage": "global-launcher verify [OPTIONS]"
              },
              {
                "description": "Remove all deployed symlinks",
                "examples": [
                  "sudo ./global-launcher cleanup",
                  "sudo ./global-launcher cleanup --yes",
                  "sudo ./global-launcher cleanup --json"
                ],
                "name": "cleanup",
                "options": [
                  {
                    "default": "false",
                    "description": "Accepted for scripting compatibility; cleanup runs non-interactively by default and does not prompt for confirmation (only removes launcher-owned symlinks)",
                    "flag": "--yes"
                  }
                ],
                "requires_sudo": false,
                "usage": "global-launcher cleanup [OPTIONS]"
              }
            ]
          }
        ],
        "description": "Global launcher for Kodachi dashboard binaries",
        "environmentVariables": [
          {
            "default": "info",
            "description": "Set logging level",
            "name": "RUST_LOG",
            "values": "error|warn|info|debug|trace"
          },
          {
            "default": "unset",
            "description": "Disable colored output when set",
            "name": "NO_COLOR",
            "values": "1|true|yes (any value disables color)"
          },
          {
            "default": "auto-detected",
            "description": "Override hooks directory location",
            "name": "KODACHI_BASE_DIR",
            "values": "/path/to/hooks"
          }
        ],
        "exitCodes": {
          "0": "Success",
          "1": "General error",
          "10": "Security violation",
          "2": "Invalid arguments",
          "3": "Permission denied",
          "4": "Binary not found",
          "5": "Directory not found",
          "6": "Timeout",
          "7": "Deployment error",
          "8": "Execution error",
          "9": "Validation error"
        },
        "globalOptions": [
          {
            "description": "Print help information",
            "flag": "-h, --help"
          },
          {
            "description": "Print version information",
            "flag": "-v, --version"
          },
          {
            "description": "Display detailed information",
            "flag": "-n, --info"
          },
          {
            "description": "Show usage examples",
            "flag": "-e, --examples"
          },
          {
            "description": "Output in JSON format",
            "flag": "--json"
          },
          {
            "description": "Pretty-print JSON output with indentation",
            "flag": "--json-pretty"
          },
          {
            "description": "Enhanced JSON output with improved human-readable formatting (like jq)",
            "flag": "--json-human"
          },
          {
            "description": "Enable verbose output",
            "flag": "--verbose"
          },
          {
            "description": "Suppress non-essential output",
            "flag": "--quiet"
          },
          {
            "description": "Disable colored output",
            "flag": "--no-color"
          },
          {
            "description": "Set timeout (default: 900)",
            "flag": "--timeout <SECS>"
          },
          {
            "description": "Reserved for future use; accepted but not currently applied to path/user resolution",
            "flag": "--user-override <USERNAME>"
          }
        ],
        "name": "global-launcher",
        "usage": "global-launcher [OPTIONS] [COMMAND]"
      },
      "errors": [],
      "metadata": {
        "executionTime": 1,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-06-28T11:16:28.594801054Z",
      "version": "9.8.4 (build 319)",
      "warnings": []
    },
    "flag_e": {
      "command": "examples",
      "data": {
        "categories": [
          {
            "description": "Deploying and managing global binary access",
            "examples": [
              {
                "command": "sudo ./global-launcher deploy",
                "description": "Deploy global access for all dashboard binaries",
                "expectedOutput": "Creates symlinks in /usr/local/bin for all discovered binaries",
                "notes": "Requires sudo for writing to /usr/local/bin"
              },
              {
                "command": "sudo ./global-launcher deploy --json",
                "description": "Deploy with JSON terminal output",
                "expectedOutput": "JSON response with deployment results and statistics on terminal"
              },
              {
                "command": "sudo ./global-launcher deploy --save-hashes",
                "description": "Deploy and save SHA256 hash report to results directory",
                "expectedOutput": "Creates deployment-hashes.json with SHA256 hashes in hooks/results/",
                "notes": "Includes source binary and launcher hashes for integrity verification"
              },
              {
                "command": "sudo ./global-launcher deploy --force",
                "description": "Force deployment, replacing existing symlinks",
                "expectedOutput": "Overwrites existing symlinks and creates backups"
              }
            ],
            "id": "1_deployment",
            "title": "Deployment Operations"
          },
          {
            "description": "Verifying deployed symlinks work correctly",
            "examples": [
              {
                "command": "./global-launcher verify",
                "description": "Verify all deployed symlinks",
                "expectedOutput": "Reports on symlink status and any issues found"
              },
              {
                "command": "./global-launcher verify --save-hashes",
                "description": "Verify and save hash report to results directory",
                "expectedOutput": "Creates verification-hashes.json with SHA256 hashes in hooks/results/",
                "notes": "Includes source binary hashes and launcher hash for integrity checks"
              },
              {
                "command": "./global-launcher verify --detailed --json",
                "description": "Detailed verification with JSON terminal output",
                "expectedOutput": "Comprehensive JSON with symlink status and SHA256 hashes",
                "notes": "Each binary includes source_binary_hash and launcher_hash fields"
              }
            ],
            "id": "2_verification",
            "title": "Verification Operations"
          },
          {
            "description": "SHA256 hash verification for binary integrity and update detection",
            "examples": [
              {
                "command": "./global-launcher verify --save-hashes",
                "description": "Save SHA256 hash report for all deployed binaries",
                "expectedOutput": "Creates verification-hashes.json in hooks/results/",
                "notes": "Includes source binary hashes and launcher hash for integrity verification"
              },
              {
                "command": "sudo ./global-launcher deploy --save-hashes",
                "description": "Deploy binaries and save hash report",
                "expectedOutput": "Creates deployment-hashes.json in hooks/results/",
                "notes": "Hash report useful for tracking binary versions and detecting tampering"
              },
              {
                "command": "cat hooks/results/verification-hashes.json",
                "description": "View saved hash report",
                "expectedOutput": "JSON report with SHA256 hashes for all binaries",
                "notes": "Compare hashes between deployments to detect binary changes"
              },
              {
                "command": "./global-launcher verify --save-hashes --json | jq '.data.verified_symlinks[0] | {name, source_binary_hash, launcher_hash}'",
                "description": "Save hash report and extract specific hashes from JSON output",
                "expectedOutput": "Both creates hash file and displays hashes on terminal",
                "notes": "Combine --save-hashes with --json for both file storage and terminal output"
              }
            ],
            "id": "3_hash_integrity",
            "title": "Hash Integrity Verification"
          },
          {
            "description": "Once deployed, binaries work from anywhere",
            "examples": [
              {
                "command": "health-control status",
                "description": "Run health-control from any directory",
                "expectedOutput": "Executes health-control in hooks directory context",
                "notes": "Works from any location after deployment"
              },
              {
                "command": "ip-fetch --json",
                "description": "Run ip-fetch with JSON output globally",
                "expectedOutput": "IP information in JSON format"
              },
              {
                "command": "dns-switch list",
                "description": "List DNS servers from anywhere",
                "expectedOutput": "DNS server list with current configuration"
              }
            ],
            "id": "4_usage",
            "title": "Using Global Binaries"
          },
          {
            "description": "Removing global binary access",
            "examples": [
              {
                "command": "sudo ./global-launcher cleanup",
                "description": "Remove all deployed symlinks",
                "expectedOutput": "Removes all symlinks and reports count",
                "notes": "Requires sudo for removing from /usr/local/bin"
              },
              {
                "command": "sudo ./global-launcher cleanup --yes --json",
                "description": "Auto-confirm cleanup with JSON terminal output",
                "expectedOutput": "JSON response with cleanup results on terminal"
              }
            ],
            "id": "5_cleanup",
            "title": "Cleanup Operations"
          }
        ],
        "description": "Usage examples for global-launcher",
        "name": "global-launcher",
        "quickReference": [
          "sudo ./global-launcher deploy",
          "./global-launcher verify",
          "health-control status",
          "ip-fetch --json",
          "sudo ./global-launcher cleanup"
        ]
      },
      "errors": [],
      "metadata": {
        "executionTime": 1,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-06-28T11:16:28.746917299Z",
      "version": "9.8.4 (build 319)",
      "warnings": []
    }
  }
}
