{
  "about": {
    "about": "A CLI toolkit for scaffolding, building, packaging, and distributing Android modules and templates (ksu/APU/Magisk/AnyTemplate). It supports module initialization, packaging, template management, and repository metadata exports. Use `kam help <COMMAND>` for more details about a specific command.",
    "long_about": "A CLI toolkit for scaffolding, building, packaging, and distributing Android modules and templates (ksu/APU/Magisk/AnyTemplate). It supports module initialization, packaging, template management, and repository metadata exports. Use `kam help <COMMAND>` for more details about a specific command."
  },
  "commands": {
    "about": {
      "summary": "Display about information for Kam and credits"
    },
    "build": {
      "description": "Builds a module or workspace member and creates artifacts in the output directory.",
      "flags": {
        "all": "Build all workspace members",
        "bump": "Enable version bump process (KAM_BUMP_ENABLED)",
        "interactive": "Run build interactively; confirm potentially destructive actions",
        "jobs": "Number of parallel jobs (default: number of CPU cores)",
        "output": "Output directory (default: dist)",
        "path": "Path to the project (default: current directory)",
        "pre_release": "Enable pre-release mode (KAM_PRE_RELEASE)",
        "quiet": "Suppress non-essential output; show warnings and errors only",
        "release": "Enable release build mode (KAM_RELEASE_ENABLED)",
        "sign": "Enable signing after build (KAM_SIGN_ENABLE)"
      },
      "summary": "Build and package a module into a deployable ZIP artifact"
    },
    "cache": {
      "description": "List, add, remove, or clean cached templates and show cache directory.",
      "subcommands": {
        "add": {
          "flags": {
            "name": "Name of the template to register",
            "path": "Path to the template source (directory or archive)"
          },
          "summary": "Add a template to cache from a local directory or archive"
        },
        "clean": {
          "summary": "Clean all cached templates"
        },
        "list": {
          "summary": "List cached templates"
        },
        "path": {
          "summary": "Show cache directory path"
        },
        "remove": {
          "flags": {
            "name": "Name of the template to remove"
          },
          "summary": "Remove a template from cache"
        }
      },
      "summary": "Manage local template and artifact cache"
    },
    "check": {
      "description": "Static checking utilities for files in the project, useful for CI and local development.",
      "flags": {
        "fix": "Try to automatically fix/format files when possible",
        "json": "Output results as JSON",
        "path": "Path to the project directory (default: current directory)"
      },
      "summary": "Check project JSON/YAML/Markdown files (lint/format/parse)"
    },
    "completions": {
      "description": "Generate completion scripts for supported shells (bash, zsh, fish, powershell, elvish).",
      "flags": {
        "install": "Install completion script into system/user completion directories (may require root).",
        "out": "Output file. If omitted, prints to STDOUT.",
        "shell": "Shell type for completion (bash,zsh,fish,powershell,elvish)"
      },
      "summary": "Generate shell completion scripts for common shells"
    },
    "config": {
      "summary": "Manage per-project or global kam configuration (similar to git config)"
    },
    "export": {
      "flags": {
        "format": "Export format: prop, json, update, repo, track, config",
        "output": "Output file path (default: a format-specific filename in the current directory)"
      },
      "summary": "Export `kam.toml` to common formats (module.prop, module.json, repo.json, track.json, config.json, update.json)"
    },
    "help": {
      "summary": "Print this message or the help of the given subcommand(s)"
    },
    "init": {
      "description": "Interactive and non-interactive initialization from templates; supports local archives or built-in templates, with options to prefill common metadata.",
      "flags": {
        "author": "Author name",
        "description": "Project description",
        "force": "Force overwrite existing files",
        "id": "Project ID (default: folder basename)",
        "interactive": "Run in interactive mode and prompt for required values",
        "name": "Project path (optional in interactive mode)",
        "project_name": "Project name (default: Example Module Name)",
        "template": "Template to use (builtin ID or local path)",
        "tmpl": "Create a template project",
        "update_json": "Update JSON URL (default: generated from git)",
        "var": "Template variable in key=value format (can be repeated)",
        "version": "Project version (default: 1.0.0)"
      },
      "summary": "Initialize a new Kam project from templates (supports meta and kernel templates)"
    },
    "install": {
      "description": "Act as a compatibility layer that delegates module installation to the configured root manager (Magisk/KernelSU/APatchSU). Configure the preferred manager with `kam config set root.manager <Manager>`",
      "flags": {
        "dry_run": "Print the derived install command instead of executing it",
        "manager": "Preferred root manager (Magisk, KernelSU, APatchSU)",
        "path": "Path to module package (.zip). If omitted, Kam will try to find an artifact in the project's dist/ output dir",
        "quiet": "Suppress non-essential output"
      },
      "summary": "Act as a compatibility layer for Magisk, KernelSU, and APatchSU to install modules"
    },
    "secret": {
      "description": "Manage stored secrets: add, get, list, remove, export, import and trust CA management.",
      "subcommands": {
        "add": {
          "flags": {
            "file": "Path to file to read the secret from",
            "file_path": "Positional path to read secret from (alternative to --file)",
            "force_file": "Store as a local file instead of using the system keyring",
            "name": "Name for the secret",
            "password": "Pass the password on the CLI (not recommended)",
            "value": "Provide secret value directly",
            "with_backup": "Also create a local fallback file under ~/.kam/secrets"
          },
          "summary": "Add a secret from a value or file"
        },
        "export": {
          "flags": {
            "encrypted": "Export encrypted blob if set"
          },
          "summary": "Export secret to a file (default: decrypted; use --encrypted to export encrypted blob)"
        },
        "exportpub": {
          "flags": {
            "name": "Name of the secret (default: main)",
            "out": "Output file path (if omitted, prints to stdout)"
          },
          "summary": "Export public key from a stored private key secret"
        },
        "get": {
          "flags": {
            "out": "Write to file instead of stdout",
            "password": "Pass password on the CLI (not recommended)"
          },
          "summary": "Get a secret and print it to stdout (or write to file)"
        },
        "import": {
          "summary": "Import secret from a file"
        },
        "importcert": {
          "flags": {
            "cert_chain": "Path to certificate chain PEM file",
            "issue": "GitHub issue number containing the certificate (optional)",
            "name": "Name to store certificate under",
            "repo": "GitHub repo (owner/repo) containing the certificate (optional)"
          },
          "summary": "Import developer certificate chain from GitHub issue or file"
        },
        "list": {
          "summary": "List saved secrets"
        },
        "remove": {
          "summary": "Remove a secret"
        },
        "trust": {
          "flags": {
            "add_root": "Add a Root CA from file or URL",
            "ca_name": "Name for the Root CA",
            "list": "List trusted Root CAs",
            "remove": "Remove Root CA by name"
          },
          "summary": "Manage trusted Root CAs"
        }
      },
      "summary": "Secret keyring management (used by sign/verify tasks)"
    },
    "sign": {
      "flags": {
        "all": "Sign all artifacts inside dist (alias of --dist with default dist)",
        "cert": "Certificate PEM chain path to include in signature metadata",
        "dist": "Sign all artifacts in given directory (alternative to src)",
        "key_path": "Optional path to private key PEM file to use instead of keyring secret",
        "out": "Output directory (default: dist)",
        "secret": "Name of the keyring secret holding the private key (default: main)",
        "src": "Artifact to sign (zip). If omitted, use --dist or --all to sign multiple files"
      },
      "summary": "Sign an artifact using a key from the keyring or a PEM file"
    },
    "tmpl": {
      "description": "Manage templates including import/export, listing and path queries.",
      "subcommands": {
        "export": {
          "flags": {
            "force": "Force overwrite if output exists",
            "output": "Output file path (.tar.gz for single, .zip for multiple)",
            "templates": "Template name(s) to export (can specify multiple)"
          },
          "summary": "Export template(s) to file"
        },
        "import": {
          "flags": {
            "force": "Force overwrite if template already exists",
            "name": "Template name (optional; defaults to filename)",
            "path": "Path to template archive (.tar.gz for single, .zip for multiple)"
          },
          "summary": "Import template(s) from file"
        },
        "list": {
          "summary": "List all available templates"
        },
        "path": {
          "summary": "Show template cache directory path"
        },
        "pull": {
          "flags": {
            "global": "Flag accepted for consistency but has no effect (uses config)",
            "url": "Download URL (defaults to GitHub latest release templates ZIP)"
          },
          "summary": "Download templates from a URL and import them"
        },
        "remove": {
          "summary": "Remove a template from cache"
        },
        "update": {
          "flags": {
            "global": "Flag accepted for consistency but has no effect (uses config)"
          },
          "summary": "Re-download based on recorded URL in config and import"
        }
      },
      "summary": "Manage templates: import, export, package, and list"
    },
    "toml": {
      "flags": {
        "file": "Operate on this file instead of project's kam.toml"
      },
      "summary": "Inspect and edit `kam.toml` using dot-path keys (get/set/unset/list)"
    },
    "validate": {
      "description": "Validate kam.toml, templates, and project structure for errors and warnings.",
      "flags": {
        "path": "Path to the project directory (default: current directory)"
      },
      "summary": "Validate `kam.toml` configuration and templates"
    },
    "verify": {
      "description": "Verify digital signatures or sigstore bundles; supports a variety of verification options.",
      "summary": "Verify an artifact signature (.sig) or a sigstore bundle (DSSE)"
    },
    "version": {
      "description": "Manage and query module versions, bump policies, and automated versioning helpers.",
      "summary": "Manage module versions and bump policies"
    }
  },
  "flags": {
    "help": "Print help (see a summary with '-h')",
    "version": "Print version"
  }
}