{
  "unknownCommand": "Unknown command: {{command}}\nRun `{{cli}} help`",
  "usagePrefix": "Usage:",
  "security": {
    "help": "Usage: ysk-server security status\n       ysk-server security sessions list|revoke|revoke-others [--user U]\n       ysk-server security api-keys list|create|delete …",
    "sessionsHelp": "Usage: ysk-server security sessions list [--user U]\n       ysk-server security sessions revoke --id PREFIX [--user U]\n       ysk-server security sessions revoke-others [--user U] [--keep-token T]",
    "apiKeysHelp": "Usage: ysk-server security api-keys list\n       ysk-server security api-keys create --name N [--user U] [--scope full|read]\n       ysk-server security api-keys delete --id KEY_ID",
    "noUser": "No user found. Create admin first or pass --user <name|id>",
    "tokenOnce": "token shown once — store securely",
    "sessionRevokeUsage": "Usage: ysk-server security sessions revoke --id <sessionIdPrefix> [--user U]",
    "apiKeyDeleteUsage": "Usage: ysk-server security api-keys delete --id KEY_ID"
  },
  "help": {
    "blurb": "Control plane CLI — prefer --json for AI agents.\nDocs: docs/agent/README.md · docs/cli/reference.md · docs/agent/commands.json",
    "main": "{{product}} ({{cli}}) v{{version}}\n\nControl plane CLI — prefer --json for AI agents.\nDocs: docs/agent/README.md · docs/cli/reference.md · docs/agent/commands.json\n\nUsage:\n  {{cli}} <command> [options]\n\nCommands:\n  setup                 Init dataDir + admin\n  update                Self-update check/apply\n  serve                 HTTP API + Web UI\n  system unit-install   Install ysk-server.service [--enable]\n  stack                 plans|bundles|status|install|uninstall\n  tools                 List tools; tools run --tool <name> [--dry-run]\n  ask                   NL → AI plan [--execute]\n  projects              list|get|create|deploy|stop|health|backup|template\n  users                 list|create|totp\n  packages              list\n  rbac                  list|show\n  audit                 list\n  backup                all|list|status|restore|delete|schedule|control-plane|settings|restic\n  templates             App templates\n  hosting               nginx|dns|db|firewall helpers\n  dns                   zone|zones|lookup|ddns\n  logs                  sources|query|journal|overview\n  host                  overview|metrics (read-only)\n  nginx                 status|list|test|sync\n  ssl                   list|get (certificates)\n  db-cluster            list|get|create|plan (HA plan-first)\n  ssh-key               list|create|import|public|export|install|delete (SSH identity vault)\n  ssh-2fa               list|enroll|confirm|install|pam|retire (SSH login TOTP ≠ panel 2FA)\n  services              Host service matrix (systemctl probe)\n  defense | protection  status|ban|unban|whitelist\n  security              status|sessions|api-keys (2FA flags · session revoke · API keys)\n  cdn                   nodes|sites|render|apply|purge|probe|dashboard|health-loop|from-project\n  agents                runtimes|fleet list|commands|register (panel + edge)\n  agent run             Outbound fleet poller (experimental)\n  store                 status|export|import|migrate (json|sqlite|postgres document backends)\n  files                 list|read|write|mkdir|rm|stat|rename|copy|move|chmod|trash|shares (sandbox)\n  cron                  list|create|update|delete|enable|disable|run|install|status|host\n  email                 domains|mailboxes|deliverability|bootstrap|dns (panel parity)\n  health                Local mode snapshot or --url http://host:port/health\n  notifications         list\n  readiness | doctor    Production readiness (honest)\n  migrate               inventory|host|post|status|resume|orphan-homes (full host migrate)\n  vpn                   WireGuard / OpenVPN\n  vnc                   accounts|clients|share\n  apache                sites|settings\n  network               ifaces|exposure|real-ip\n  real-ip               CDN Real IP\n  updates               inventory|apply\n  software              list|install|uninstall\n  db                    MySQL / MariaDB / PostgreSQL\n  redis                 status|keys|get|set\n  ftp                   accounts|status\n  runtimes              list|install\n  bt-tracker            status|settings\n  validators            list|chains|disk|get|checklist (Beta)\n  docker                status|ps|images|compose|prune (engine)\n  version | help\n\nGlobal:\n  --json                JSON stdout (AI)\n  --data-dir PATH       also --data-dir=PATH or YSK_DATA_DIR\n  --config PATH\n  --locale CODE         CLI language (default en). Also YSK_LOCALE.\n                        Codes: en zh-HK zh-CN ja ko hi es ar fr bn pt id ur\n  --limit N --offset N  Slice large JSON lists (software / updates / host metrics / rbac)\n  --help | --version\n\nExit: 0 ok · 1 error · 2 validation · 3 blocked · 4 not found · 5 host error\n\nSafety:\n  Dangerous ops default to dry-run (plan only).\n  Pass --execute (alias --apply) + env YSK_EXECUTE=1 to mutate host.\n  Command names and flags are always English. --locale only translates messages.\n\nExamples:\n  {{cli}} readiness --json\n  {{cli}} host --json\n  {{cli}} nginx status --json\n  {{cli}} ssl list --json\n  {{cli}} projects get --id UUID --json\n  {{cli}} defense ban --ip 1.2.3.4 --json          # dry-run plan\n  {{cli}} projects list --json\n  {{cli}} --locale=zh-HK help\n  {{cli}} logs query --source journal: --lines 100 --json\n  {{cli}} tools --json"
  },
  "usage": {
    "tools": {
      "run": {
        "--tool": {
          "name": {
            "--arg": {
              "cd327c": "Usage: ysk-server tools run --tool <name> [--arg key=val] [--dry-run]\n"
            }
          }
        }
      }
    },
    "email": {
      "domains": {
        "list": {
          "create": {
            "get": {
              "b94a62": "Usage: ysk-server email domains list|create|get …\n"
            }
          }
        },
        "create": {
          "--domain": {
            "example": {
              "bd4036": "Usage: ysk-server email domains create --domain example.com --ip A.B.C.D\n"
            }
          }
        }
      },
      "mailboxes": {
        "list": {
          "create": {
            "42b26c": "Usage: ysk-server email mailboxes list|create …\n"
          }
        },
        "create": {
          "--domain": {
            "example": {
              "7227f3": "Usage: ysk-server email mailboxes create --domain example.com --local user [--password P]\n"
            }
          }
        }
      },
      "dns": {
        "--domain": {
          "example": {
            "com": {
              "26b806": "Usage: ysk-server email dns --domain example.com\n"
            }
          }
        }
      },
      "sub": {
        "--data-dir": {
          "path": {
            "--json": {
              "73dad0": "Usage: ysk-server email <sub> [--data-dir PATH] [--json]\n  domains list|create|get [--q TEXT]\n    create --domain example.com --ip A.B.C.D\n    get --domain example.com | --id UUID\n  mailboxes list|create [--domain D | --id domainId]\n    create --domain D --local user [--password P]\n  deliverability --domain D | --id UUID\n  deliverability-overview\n  bootstrap --domain D --ip A.B.C.D [--install]\n  dns --domain D | --id UUID     # DNS bundle for panel\nAlso: hosting email-apply|email-mailbox|email-deliverability (aliases)\n"
            }
          }
        }
      },
      "deliverability": {
        "--domain": {
          "example": {
            "com": {
              "b0dff0": "Usage: ysk-server email deliverability --domain example.com\n"
            }
          }
        }
      },
      "bootstrap": {
        "--domain": {
          "example": {
            "com": {
              "affc8d": "Usage: ysk-server email bootstrap --domain example.com --ip 1.2.3.4 [--install]\n"
            }
          }
        }
      }
    },
    "cron": {
      "delete": {
        "--id": {
          "job": {
            "id": {
              "f6aafe": "Usage: ysk-server cron delete --id JOB_ID\n"
            }
          }
        }
      },
      "sub": {
        "--id": {
          "job": {
            "id": {
              "99cfdf": "Usage: ysk-server cron {{sub}} --id JOB_ID\n"
            }
          }
        },
        "--data-dir": {
          "path": {
            "--json": {
              "0349e6": "Usage: ysk-server cron <sub> [--data-dir PATH] [--json]\n  list [--project-id ID] [--q TEXT]\n  create --schedule \"0 3 * * *\" --command CMD [--project-id ID] [--user USER]\n  update --id JOB_ID [--schedule S] [--command CMD] [--user USER] [--project-id ID] [--enable|--disable]\n  delete --id JOB_ID\n  enable|disable --id JOB_ID\n  run --id JOB_ID              # run-now (needs YSK_EXECUTE=1)\n  install                     # load managed crontab (needs EXECUTE)\n  status                      # probe managed file vs host crontab\n  host [list] [--user USER] [--jobs-only]\n  host edit --user USER --old-schedule S --old-command C --schedule S --command C --execute\n  host disable|enable|delete|adopt --user USER --old-schedule S --old-command C --execute\n  host run --user USER --command C --execute\nHonesty: install / host write blocked without YSK_EXECUTE=1.\n"
            }
          }
        }
      },
      "run": {
        "--id": {
          "job": {
            "id": {
              "a0a97f": "Usage: ysk-server cron run --id JOB_ID\n"
            }
          }
        }
      },
      "create": {
        "--schedule": {
          "0": {
            "3": {
              "9a8328": "Usage: ysk-server cron create --schedule \"0 3 * * *\" --command CMD [--project-id ID] [--user USER]\n"
            }
          }
        }
      }
    },
    "files": {
      "stat": {
        "--path": {
          "rel": {
            "17c8f2": "Usage: ysk-server files stat --path REL\n"
          }
        }
      },
      "read": {
        "--path": {
          "rel": {
            "e35f8d": "Usage: ysk-server files read --path REL\n"
          }
        }
      },
      "mkdir": {
        "--path": {
          "rel": {
            "ae0438": "Usage: ysk-server files mkdir --path REL\n"
          }
        }
      },
      "rm": {
        "--path": {
          "rel": {
            "--permanent": {
              "fe2051": "Usage: ysk-server files rm --path REL [--permanent]\n"
            }
          }
        }
      },
      "rename": {
        "--from": {
          "rel": {
            "--to": {
              "35a260": "Usage: ysk-server files rename --from REL --to REL\n"
            }
          }
        }
      },
      "copy": {
        "--from": {
          "rel": {
            "--to": {
              "5337f4": "Usage: ysk-server files copy --from REL --to REL\n"
            }
          }
        }
      },
      "move": {
        "--from": {
          "rel": {
            "--to": {
              "75cf5d": "Usage: ysk-server files move --from REL --to REL\n"
            }
          }
        }
      },
      "chmod": {
        "--path": {
          "rel": {
            "--mode": {
              "39f983": "Usage: ysk-server files chmod --path REL --mode 644\n"
            }
          }
        }
      },
      "trash": {
        "restore": {
          "--id": {
            "trash": {
              "c89ce9": "Usage: ysk-server files trash restore --id TRASH_ID\n"
            }
          }
        },
        "list": {
          "restore": {
            "purge": {
              "ef063d": "Usage: ysk-server files trash list|restore|purge\n"
            }
          }
        }
      },
      "shares": {
        "list": {
          "ac342c": "Usage: ysk-server files shares list\n"
        }
      },
      "webdav": {
        "status": {
          "token": {
            "disable": {
              "f8e94b": "Usage: ysk-server files webdav status|token|disable\n"
            }
          }
        }
      },
      "sub": {
        "--root": {
          "public": {
            "project": {
              "42ebd4": "Usage: ysk-server files <sub> [--root public|project:ID] [--data-dir PATH] [--json]\n  list   [--path DIR] [--q TEXT] [--sort name|size|mtime] [--order asc|desc]\n  stat   --path REL\n  read   --path REL\n  write  --path REL --content TEXT | --file LOCAL\n  mkdir  --path REL\n  rm     --path REL [--permanent]\n  rename --from REL --to REL\n  copy   --from REL --to REL\n  move   --from REL --to REL\n  chmod  --path REL --mode 644\n  trash  list|restore|purge [--id TRASH_ID]\n  shares list\n  favorites list\n  upload --dir REL --file LOCAL [--file LOCAL2…]\n  webdav status|token|disable\nSandbox: only public files root or project home (path-constrained).\n"
            }
          }
        }
      },
      "write": {
        "--path": {
          "rel": {
            "--content": {
              "0addb1": "Usage: ysk-server files write --path REL --content TEXT | --file LOCAL\n"
            }
          }
        }
      },
      "upload": {
        "--dir": {
          "rel": {
            "--file": {
              "f8c3bf": "Usage: ysk-server files upload --dir REL --file LOCAL [--file LOCAL2…]\n"
            }
          }
        }
      }
    },
    "store": {
      "import": {
        "--in": {
          "file": {
            "json": {
              "5b6fdd": "Usage: ysk-server store import --in FILE.json\n"
            }
          }
        }
      },
      "sub": {
        "--data-dir": {
          "path": {
            "--json": {
              "d580e4": "Usage: ysk-server store <sub> [--data-dir PATH] [--json]\n  status                         Show backend kind + counts\n  export --out FILE.json         Dump document snapshot\n  import --in FILE.json          Overwrite snapshot from file\n  migrate --to sqlite|json [--out PATH]\n    Copy current store into another backend file\nEnv: YSK_STORE=json|sqlite|postgres  YSK_DATABASE_URL=postgres://…\nHonesty: document-blob backends (not full relational schema yet).\n"
            }
          }
        }
      },
      "migrate": {
        "--to": {
          "json": {
            "sqlite": {
              "1c52a3": "Usage: ysk-server store migrate --to json|sqlite [--out PATH]\n  (postgres: export JSON then import under YSK_DATABASE_URL)\n"
            }
          }
        }
      }
    },
    "cdn": {
      "nodes": {
        "delete": {
          "--id": {
            "node": {
              "0c6a1e": "Usage: ysk-server cdn nodes delete --id NODE_ID\n"
            }
          }
        },
        "drain": {
          "--id": {
            "node": {
              "a8aa81": "Usage: ysk-server cdn nodes drain --id NODE_ID [--off]\n"
            }
          }
        },
        "list": {
          "upsert": {
            "delete": {
              "52549e": "Usage: ysk-server cdn nodes list|upsert|delete|probe|drain …\n"
            }
          }
        },
        "upsert": {
          "--name": {
            "name": {
              "8f6f39": "Usage: ysk-server cdn nodes upsert --name NAME [--id ID] [--base-url U] [--fleet-agent-id S] [--ssh-host H] [--region R]\n"
            }
          }
        }
      },
      "sites": {
        "get": {
          "--id": {
            "site": {
              "3c3c35": "Usage: ysk-server cdn sites get --id SITE_ID\n"
            }
          }
        },
        "delete": {
          "--id": {
            "site": {
              "51ef8f": "Usage: ysk-server cdn sites delete --id SITE_ID\n"
            }
          }
        },
        "list": {
          "get": {
            "upsert": {
              "609da6": "Usage: ysk-server cdn sites list|get|upsert|delete …\n"
            }
          }
        },
        "upsert": {
          "--name": {
            "n": {
              "6ebb75": "Usage: ysk-server cdn sites upsert --name N --domains a.com,b.com [--edge-id ID]… [--origin-url U] [--origin-project ID]\n"
            }
          }
        }
      },
      "render": {
        "--site-id": {
          "id": {
            "--dry-run": {
              "2149eb": "Usage: ysk-server cdn render --site-id ID [--dry-run]\n"
            }
          }
        }
      },
      "apply": {
        "--site-id": {
          "id": {
            "--edge-id": {
              "a527b3": "Usage: ysk-server cdn apply --site-id ID [--edge-id EDGE]\n"
            }
          }
        }
      },
      "purge": {
        "--site-id": {
          "id": {
            "--edge-id": {
              "bc08ec": "Usage: ysk-server cdn purge --site-id ID [--edge-id EDGE]\n"
            }
          }
        }
      },
      "dns-sync": {
        "--site-id": {
          "id": {
            "--apply-zone": {
              "343068": "Usage: ysk-server cdn dns-sync --site-id ID [--apply-zone]\n"
            }
          }
        }
      },
      "sub": {
        "--data-dir": {
          "path": {
            "--json": {
              "092842": "Usage: ysk-server cdn <sub> [--data-dir PATH] [--json]\n  nodes list|upsert|delete|probe|drain\n  sites list|upsert|delete|get\n  render --site-id ID [--dry-run]\n  apply  --site-id ID [--edge-id ID]   # fan-out (fleet queue ok without EXECUTE)\n  purge  --site-id ID [--edge-id ID]\n  dns-sync --site-id ID [--apply-zone]\n  probe | dashboard | health-loop [--apply-zone]\n  from-project --project-id ID [--edge-id ID…]\nHonesty: apply_status written/queued ≠ edge nginx applied until agent ack / EXECUTE reload.\n"
            }
          }
        }
      },
      "from-project": {
        "--project-id": {
          "id": {
            "--edge-id": {
              "a96f42": "Usage: ysk-server cdn from-project --project-id ID [--edge-id ID]…\n"
            }
          }
        }
      }
    },
    "agents": {
      "fleet": {
        "remove": {
          "--session": {
            "session": {
              "1827fe": "Usage: ysk-server agents fleet remove --session SESSION_ID\n"
            }
          }
        },
        "register": {
          "--id": {
            "agent": {
              "209b2d": "Usage: ysk-server agents fleet register --id AGENT_ID [--group g] [--edge]\n"
            }
          }
        },
        "commands": {
          "--session": {
            "session": {
              "f8067c": "Usage: ysk-server agents fleet commands --session SESSION_ID\n"
            }
          }
        }
      },
      "register": {
        "--id": {
          "agent": {
            "id": {
              "3c4477": "Usage: ysk-server agents register --id AGENT_ID [--group g]\n"
            }
          }
        }
      },
      "commands": {
        "--session": {
          "session": {
            "id": {
              "e620d2": "Usage: ysk-server agents commands --session SESSION_ID\n"
            }
          }
        }
      },
      "runtimes": {
        "probe": {
          "fleet": {
            "list": {
              "261fa4": "Usage: ysk-server agents [runtimes|probe|fleet list|fleet register|fleet commands|register|commands]\n"
            }
          }
        }
      }
    },
    "agent": {
      "run": {
        "--control-plane": {
          "url": {
            "--id": {
              "cfefbe": "Usage: ysk-server agent run --control-plane URL --id AGENT_ID [--group g]\n"
            }
          }
        }
      }
    },
    "ask": {
      "check": {
        "system": {
          "info": {
            "b0c781": "Usage: ysk-server ask \"check system info\"\n"
          }
        }
      }
    },
    "backup": {
      "delete": {
        "--project-id": {
          "id": {
            "--name": {
              "d66c29": "Usage: ysk-server backup delete --project-id ID --name ARCHIVE\n"
            }
          }
        }
      },
      "restic": {
        "list": {
          "run": {
            "restore": {
              "10402b": "Usage: ysk-server backup restic list|run|restore …\n"
            }
          }
        },
        "restore": {
          "--project-id": {
            "id": {
              "a8f133": "Usage: ysk-server backup restic restore --project-id ID --snapshot SNAP [--dry-run] [--overwrite-home --confirm PHRASE]\n"
            }
          }
        }
      },
      "sub": {
        "--data-dir": {
          "path": {
            "--json": {
              "777243": "Usage: ysk-server backup <sub> [--data-dir PATH] [--json]\n  all                         Backup all project homes (+ remote/restic side when configured)\n  list [--project-id ID] [--q TEXT]\n  status                      Last run + schedule probe\n  restore --project-id ID --name ARCHIVE [--mode full|web|dry-run]\n  delete  --project-id ID --name ARCHIVE\n  schedule [--cron \"0 3 * * *\"] [--install]\n  control-plane               Snapshot ysk.json + config.json\n  control-plane-restore --name ARCHIVE [--mode dry-run|full] [--confirm RESTORE-CONTROL-PLANE]\n  settings [get|set]          Remote / exclusions / restic\n    set --remote-kind local|sftp|s3 --remote-path P [--remote-host H] …\n    set --exclude a,b,c | --exclusions-file FILE\n    set --restic-enable --restic-password P [--restic-repo PATH]\n    set --from-json FILE      # full patch {remote?,exclusions?,restic?}\n  restic list|run|restore     Incremental restic helpers\n"
            }
          }
        }
      },
      "control-plane-restore": {
        "--name": {
          "archive": {
            "--mode": {
              "316a76": "Usage: ysk-server backup control-plane-restore --name ARCHIVE [--mode dry-run|full] [--confirm RESTORE-CONTROL-PLANE]\n"
            }
          }
        }
      },
      "restore": {
        "--project-id": {
          "id": {
            "--name": {
              "bc7041": "Usage: ysk-server backup restore --project-id ID --name ARCHIVE [--mode full|web|dry-run]\n"
            }
          }
        }
      }
    },
    "packages": {
      "list": {
        "--q": {
          "text": {
            "b8e16b": "Usage: ysk-server packages list [--q text]\n"
          }
        }
      }
    },
    "projects": {
      "stop": {
        "--id": {
          "projectid": {
            "b15409": "Usage: ysk-server projects stop --id <projectId>\n"
          }
        }
      },
      "backup": {
        "--id": {
          "projectid": {
            "e62846": "Usage: ysk-server projects backup --id <projectId>\n"
          }
        }
      },
      "health": {
        "--id": {
          "projectid": {
            "e816ec": "Usage: ysk-server projects health --id <projectId>\n"
          }
        }
      },
      "isolation": {
        "provision": {
          "--id": {
            "projectid": {
              "5aff44": "Usage: ysk-server projects isolation provision --id <projectId>\n       ysk-server projects isolation provision-all [--limit 20]\n"
            }
          }
        },
        "backfill-owners": {
          "--owner-user-id": {
            "id": {
              "8691da": "Usage: ysk-server projects isolation backfill-owners --owner-user-id <id>\n"
            }
          }
        },
        "list": {
          "provision": {
            "provision-all": {
              "8e9da3": "Usage: ysk-server projects isolation list|provision|provision-all|backfill-owners\n"
            }
          }
        }
      },
      "get": {
        "--id": {
          "projectid": {
            "name": {
              "b0d532": "Usage: ysk-server projects get --id <projectId|name> [--json]\n"
            }
          }
        }
      },
      "create": {
        "--name": {
          "name": {
            "--domain": {
              "66e857": "Usage: ysk-server projects create --name <name> [--domain d] [--runtime node|php|static|python|go|rust] [--template id] [--git-url URL] [--branch B] [--create-dns] [--create-mail] [--server-ip A.B.C.D] [--server-ipv6 ADDR]\n"
            }
          }
        }
      },
      "deploy": {
        "--id": {
          "projectid": {
            "--entry": {
              "339111": "Usage: ysk-server projects deploy --id <projectId> [--entry f] [--port N] [--fpm|--builtin] [--reload]\n"
            }
          }
        }
      },
      "git-deploy": {
        "--id": {
          "id": {
            "--git-url": {
              "a513f5": "Usage: ysk-server projects git-deploy --id ID [--git-url URL] [--branch|--ref main] [--no-redeploy] [--depth 1] [--entry f]\n"
            }
          }
        }
      },
      "template": {
        "--id": {
          "projectid": {
            "--template": {
              "591ce4": "Usage: ysk-server projects template --id <projectId> --template <id> [--force]\n"
            }
          }
        }
      },
      "list": {
        "get": {
          "create": {
            "deploy": {
              "253b48": "Usage: ysk-server projects list|get|create|deploy|git-deploy|git|stop|backup|template|ftp|health [options]\n  deploy --id UUID [--entry f] [--port N] [--fpm|--builtin] [--reload]\n  git-deploy --id UUID [--git-url URL] [--branch|--ref B] [--no-redeploy]\n  git status|log|fetch|checkout|reset|auth|hook|deploy --id UUID [--ref R] [--unshallow] [--yes]\n  git auth --id UUID --token T|--deploy-key|--pin-host\n  git hook --id UUID --enable|--rotate|--disable\n  ftp --id UUID --password P [--user NAME] [--home app|root]\n"
            }
          }
        }
      }
    },
    "cli": {
      "name": {
        "db-cluster": {
          "get": {
            "--id": {
              "00f803": "Usage: {{CLI_NAME}} db-cluster get --id UUID [--json]\n"
            }
          },
          "plan": {
            "--id": {
              "483f52": "Usage: {{CLI_NAME}} db-cluster plan --id UUID [--json]\n"
            }
          },
          "artifacts": {
            "--id": {
              "6b33c4": "Usage: {{CLI_NAME}} db-cluster artifacts --id UUID [--json]\n"
            }
          },
          "bundle": {
            "--id": {
              "94ed27": "Usage: {{CLI_NAME}} db-cluster bundle --id UUID [--json]\n"
            }
          },
          "delete": {
            "--id": {
              "3de0e4": "Usage: {{CLI_NAME}} db-cluster delete --id UUID [--json]\n"
            }
          },
          "create": {
            "--name": {
              "e3b733": "Usage: {{CLI_NAME}} db-cluster create --name N --engine mariadb --kind mariadb-galera --member HOST=role[:access] ...\n"
            }
          },
          "apply": {
            "--id": {
              "4cddb8": "Usage: {{CLI_NAME}} db-cluster apply --id UUID [--execute] [--bootstrap] [--json]\n"
            }
          },
          "probe": {
            "--id": {
              "22870c": "Usage: {{CLI_NAME}} db-cluster probe --id UUID [--peers] [--json]\n"
            }
          },
          "install-peers": {
            "--id": {
              "600b02": "Usage: {{CLI_NAME}} db-cluster install-peers --id UUID [--execute] [--no-restart] [--identity ID] [--json]\n"
            }
          },
          "push": {
            "--id": {
              "697080": "Usage: {{CLI_NAME}} db-cluster push --id UUID [--member ID] [--identity ID] [--execute] [--json]\n"
            }
          },
          "fleet": {
            "--id": {
              "239462": "Usage: {{CLI_NAME}} db-cluster fleet --id UUID [--op apply|probe|plan] [--execute] [--edge-execute] [--json]\n"
            }
          },
          "list": {
            "get": {
              "3b9cfa": "Usage: {{CLI_NAME}} db-cluster list|get|create|plan|apply|probe|install-peers|artifacts|bundle|push|fleet|overview|delete [--peers] [--execute] [--json]\n"
            }
          }
        },
        "ssh-key": {
          "get": {
            "--id": {
              "292716": "Usage: {{CLI_NAME}} ssh-key get --id UUID [--json]\n"
            }
          },
          "public": {
            "--id": {
              "525d7d": "Usage: {{CLI_NAME}} ssh-key public --id UUID\n"
            }
          },
          "export": {
            "--id": {
              "0a6d81": "Usage: {{CLI_NAME}} ssh-key export --id UUID [--out PATH] [--json]\n"
            }
          },
          "delete": {
            "--id": {
              "a6e2f2": "Usage: {{CLI_NAME}} ssh-key delete --id UUID [--json]\n"
            }
          },
          "create": {
            "--name": {
              "8b1d79": "Usage: {{CLI_NAME}} ssh-key create --name N [--algo ed25519|rsa-4096] [--purpose user|panel|unbound] [--project ID] [--user U] [--home PATH] [--reveal] [--json]\n"
            }
          },
          "import": {
            "--name": {
              "6eb800": "Usage: {{CLI_NAME}} ssh-key import --name N --file PATH [--purpose panel|user] [--json]\n"
            }
          },
          "install": {
            "--id": {
              "b99c56": "Usage: {{CLI_NAME}} ssh-key install --id UUID [--execute] [--json]\n"
            }
          },
          "test": {
            "--id": {
              "e1aed3": "Usage: {{CLI_NAME}} ssh-key test --id UUID --target user@host[:port] [--execute] [--json]\n"
            }
          },
          "rotate": {
            "--id": {
              "9c3224": "Usage: {{CLI_NAME}} ssh-key rotate --id UUID [--reveal] [--json]\n"
            }
          },
          "authorize-self": {
            "--id": {
              "b7ea2e": "Usage: {{CLI_NAME}} ssh-key authorize-self --id UUID [--json]\n"
            }
          },
          "uninstall": {
            "--id": {
              "afcba0": "Usage: {{CLI_NAME}} ssh-key uninstall --id UUID [--execute] [--json]\n"
            }
          },
          "list": {
            "get": {
              "2c92c6": "Usage: {{CLI_NAME}} ssh-key list|get|create|import|public|export|install|test|rotate|authorize-self|uninstall|delete [--json]\n"
            }
          }
        },
        "ssh-2fa": {
          "reveal": {
            "--id": {
              "a6c27f": "Usage: {{CLI_NAME}} ssh-2fa reveal --id UUID [--json]\n"
            }
          },
          "retire": {
            "--id": {
              "6e1fa3": "Usage: {{CLI_NAME}} ssh-2fa retire --id UUID [--json]\n"
            }
          },
          "enroll": {
            "--user": {
              "081432": "Usage: {{CLI_NAME}} ssh-2fa enroll --user LINUX|--project ID [--home PATH] [--from-panel] [--json]\n"
            }
          },
          "confirm": {
            "--id": {
              "9ee8a2": "Usage: {{CLI_NAME}} ssh-2fa confirm --id UUID --code 123456 [--json]\n"
            }
          },
          "install": {
            "--id": {
              "dace06": "Usage: {{CLI_NAME}} ssh-2fa install --id UUID [--execute] [--json]\n"
            }
          },
          "uninstall": {
            "--id": {
              "0bb464": "Usage: {{CLI_NAME}} ssh-2fa uninstall --id UUID [--execute] [--json]\n"
            }
          },
          "list": {
            "enroll": {
              "802ed0": "Usage: {{CLI_NAME}} ssh-2fa list|enroll|confirm|install|uninstall|pam|reveal|retire [--json]\n"
            }
          }
        },
        "ssl": {
          "list": {
            "get": {
              "79c232": "Usage: {{CLI_NAME}} ssl list|get --domain X [--json]\n"
            }
          },
          "get": {
            "--domain": {
              "91c444": "Usage: {{CLI_NAME}} ssl get --domain example.com [--json]\n"
            }
          }
        },
        "dns": {
          "zone": {
            "--zone": {
              "ad30fa": "Usage: {{CLI_NAME}} dns zone --zone example.com --ip A.B.C.D [--ipv6 X:X::X] [--validate] [--reload]\n"
            }
          },
          "zones": {
            "zone": {
              "5b8bda": "Usage: {{CLI_NAME}} dns zones|zone --zone X --ip A.B.C.D [--ipv6 …] [--json]\n"
            }
          }
        },
        "nginx": {
          "status": {
            "list": {
              "d67a16": "Usage: {{CLI_NAME}} nginx status|list|test|sync [--execute] [--json]\n"
            }
          }
        },
        "host": {
          "overview": {
            "metrics": {
              "93c828": "Usage: {{CLI_NAME}} host overview|metrics|network [--path /] [--json]\n"
            }
          }
        },
        "logs": {
          "sources": {
            "overview": {
              "79058c": "Usage: {{CLI_NAME}} logs sources|overview|units|journal|query [--source id] [--json]\n"
            }
          }
        },
        "services": {
          "sub": {
            "--unit": {
              "4fe3fa": "Usage: {{CLI_NAME}} services {{sub}} --unit <systemd-unit> [--execute] [--json]\n"
            }
          },
          "matrix": {
            "start": {
              "4f3a35": "Usage: {{CLI_NAME}} services matrix|start|stop|restart|reload --unit NAME [--execute] [--json]\n"
            }
          }
        },
        "defense": {
          "ban": {
            "--ip": {
              "cc22de": "Usage: {{CLI_NAME}} defense ban --ip <ip> [--method fail2ban|ufw|both] [--reason t] [--execute]\n"
            }
          },
          "unban": {
            "--ip": {
              "46aa23": "Usage: {{CLI_NAME}} defense unban --ip <ip> [--method fail2ban|ufw|both] [--execute]\n"
            }
          },
          "whitelist": {
            "--action": {
              "c1cbdf": "Usage: {{CLI_NAME}} defense whitelist --action list|add|remove [--ip IP]\n"
            }
          },
          "status": {
            "bans": {
              "a8d96b": "Usage: {{CLI_NAME}} defense status|bans|suspects|ban|unban|whitelist|stack-apply|fail2ban|firewall|timeline|presets [--json]\n  bans [--q text] [--source fail2ban|panel|ufw|auto]\n  suspects [--q text]\n  stack-apply [--execute]   # UFW + fail2ban + current preset\n  fail2ban | firewall       # deep probes (honest)\n  timeline [--limit N] [--q text]\n  presets                   # list + activePreset\n"
            }
          }
        }
      }
    },
    "system": {
      "unit-install": {
        "--enable": {
          "--data-dir": {
            "path": {
              "33daa1": "Usage: ysk-server system unit-install [--enable] [--data-dir PATH]\n"
            }
          }
        }
      }
    },
    "users": {
      "create": {
        "--username": {
          "u": {
            "--password": {
              "7145c7": "Usage: ysk-server users create --username <u> --password <p> [--role operator|viewer|admin] [--package-id id] [--locale zh-HK]\n"
            }
          }
        }
      },
      "list": {
        "--q": {
          "text": {
            "--role": {
              "544685": "Usage: ysk-server users list [--q text] [--role admin|operator|viewer]\n       ysk-server users create --username u --password p [--role operator]\n"
            }
          }
        }
      }
    },
    "rbac": {
      "list": {
        "policies": {
          "330ade": "Usage: ysk-server rbac list|policies\n       ysk-server rbac show --role operator\n       ysk-server rbac audit   # route→cap sample matrix\n"
        }
      }
    },
    "hosting": {
      "postgres-provision": {
        "--db": {
          "name": {
            "--user": {
              "2c8889": "Usage: ysk-server hosting postgres-provision --db NAME --user U --password P(min8) [--execute]\n  Default dry-run (no host change). Pass --execute + YSK_EXECUTE=1 to apply.\n"
            }
          }
        }
      },
      "mysql-provision": {
        "--db": {
          "name": {
            "--user": {
              "fc25aa": "Usage: ysk-server hosting mysql-provision --db NAME --user U --password P(min8) [--execute]\n  Default dry-run (no host change). Pass --execute + YSK_EXECUTE=1 to apply.\n"
            }
          }
        }
      },
      "dns-zone": {
        "--zone": {
          "example": {
            "com": {
              "bdaa0d": "Usage: ysk-server hosting dns-zone --zone example.com --ip A.B.C.D [--ipv6 X:X::X] [--validate] [--reload]\n"
            }
          }
        }
      },
      "powerdns-load": {
        "--zone": {
          "example": {
            "com": {
              "dba49c": "Usage: ysk-server hosting powerdns-load --zone example.com --ip A.B.C.D [--ipv6 X:X::X] [--load|--execute]\n"
            }
          }
        }
      },
      "email-apply": {
        "--domain": {
          "example": {
            "com": {
              "37d350": "Usage: ysk-server hosting email-apply --domain example.com [--install|--execute]\n"
            }
          }
        }
      },
      "email-mailbox": {
        "--domain": {
          "x": {
            "--local": {
              "3d9be3": "Usage: ysk-server hosting email-mailbox --domain X --local user [--password P] [--ip A.B.C.D]\n"
            }
          }
        }
      },
      "ftps-apply": {
        "--domain": {
          "files": {
            "example": {
              "284a7c": "Usage: ysk-server hosting ftps-apply --domain files.example.com [--install|--execute]\n"
            }
          }
        }
      },
      "webmail-apply": {
        "--domain": {
          "webmail": {
            "example": {
              "2ad5b5": "Usage: ysk-server hosting webmail-apply --domain webmail.example.com [--download]\n"
            }
          }
        }
      },
      "public-files": {
        "--domain": {
          "files": {
            "example": {
              "0e9013": "Usage: ysk-server hosting public-files --domain files.example.com [--reload]\n"
            }
          }
        }
      },
      "email-deliverability": {
        "--domain": {
          "example": {
            "com": {
              "8774a4": "Usage: ysk-server hosting email-deliverability --domain example.com\n       ysk-server hosting email-deliverability --id <domainId>\n"
            }
          }
        }
      },
      "email-bootstrap": {
        "--domain": {
          "example": {
            "com": {
              "796da5": "Usage: ysk-server hosting email-bootstrap --domain example.com --ip 1.2.3.4 [--admin postmaster] [--password P] [--install]\n"
            }
          }
        }
      }
    },
    "migrate": {
      "post": {
        "--job": {
          "id": {
            "--data-dir": {
              "6a73cd": "Usage: ysk-server migrate post --job <id> --data-dir PATH --execute\n"
            }
          }
        }
      },
      "host": {
        "--target": {
          "root": {
            "new": {
              "3e94a2": "Usage: ysk-server migrate host --target root@NEW_IP [--identity-file PATH|--identity-id ID] [--password] --execute --data-dir PATH\n"
            }
          }
        }
      }
    },
    "x": {
      "972912": "Usage:\n  ysk-server migrate inventory [--data-dir PATH] --json\n  ysk-server migrate host --target root@IP [--identity-file PATH|--identity-id ID|--password PW] --execute [--maintenance] [--force-wipe-target]\n  ysk-server migrate post --job ID --data-dir PATH --execute   # on target\n  ysk-server migrate status [--job ID]\n  ysk-server migrate resume --job ID --execute\n  ysk-server migrate orphan-homes [--data-dir PATH] --json\n  ysk-server migrate orphan-homes --path /home/ysk-server-UUID --confirm PATH --execute\n"
    },
    "hostingHelp": "Usage: ysk-server hosting <sub>\n  Dangerous ops default dry-run; add --execute (+ YSK_EXECUTE=1) to apply\n  nginx | nginx-sync [--execute]\n  redis-provision | postgres-provision | mysql-provision [--execute]\n  dns-zone --zone X --ip A.B.C.D [--ipv6 X:X::X] [--validate] [--reload]\n  dns-zones | powerdns-status | powerdns-install [--install|--execute]\n  powerdns-load --zone X --ip A.B.C.D [--load|--execute]\n  email-apply --domain X [--install|--execute]\n  email-mailbox --domain X --local user [--password P] [--ip A.B.C.D] [--system]\n  ftps-apply --domain X [--install|--execute]\n  runtimes | runtime-install --kind node|php|python|go|rust --version V [--install|--execute]\n  dovecot-passdb --domain X | --all\n  webmail-apply --domain webmail.example.com [--download]\n  public-files --domain files.example.com [--reload]\n  email-bootstrap --domain example.com --ip A.B.C.D [--install|--execute]\n  email-deliverability --domain example.com   # PTR/DNSBL/warmup pack (honest)\n  firewall-apply [--smtp] [--execute]\n",
    "logsQuery": "Usage: {{CLI_NAME}} logs query --source <id> [--lines N] [--grep G] [--since 1h] [--priority err]\n  source examples: journal:  journal:nginx.service  file:syslog  project:<uuid>\n  {{CLI_NAME}} logs sources --json\n  {{CLI_NAME}} logs journal [--unit nginx.service] --json\n"
  },
  "msg": {
    "domain": {
      "missing": {
        "pass": {
          "5be09b": "Domain missing — pass --ip to create domain first\n"
        }
      }
    },
    "--root": {
      "must": {
        "be": {
          "a84834": "--root must be public or project:<id>\n"
        }
      }
    },
    "need": {
      "--content": {
        "or": {
          "4d7001": "Need --content or --file\n"
        }
      },
      "at": {
        "least": {
          "7d311a": "Need at least one --member HOST[=role][:access]\n"
        }
      }
    },
    "action": {
      "must": {
        "be": {
          "ba14c1": "action must be list|add|remove\n"
        }
      }
    },
    "use": {
      "ysk-server": {
        "backup": {
          "ca67f4": "Use: ysk-server backup control-plane-restore --name ARCHIVE (not restore --project-id control-plane)\n"
        }
      }
    },
    "new": {
      "domain": {
        "requires": {
          "986b78": "New domain requires --ip A.B.C.D (no placeholder defaults)\n"
        }
      }
    },
    "import-sync": {
      "prefers": {
        "fleet": {
          "4d7590": "import-sync prefers fleet clusterSync payload; or --file snapshot.json\n"
        }
      }
    },
    "security": {
      "control": {
        "plane": {
          "f59a63": "SECURITY: control plane bound publicly (0.0.0.0/::). Prefer 127.0.0.1 + reverse proxy / UFW.\n"
        }
      }
    }
  },
  "err": {
    "unknown": {
      "email": {
        "sub": {
          "sub": {
            "e37257": "Unknown email sub: {{sub}}\nRun: ysk-server email help\n"
          }
        }
      },
      "cron": {
        "sub": {
          "sub": {
            "e1a9ed": "Unknown cron sub: {{sub}}\nRun: ysk-server cron help\n"
          }
        }
      },
      "files": {
        "sub": {
          "sub": {
            "07ad7e": "Unknown files sub: {{sub}}\nRun: ysk-server files help\n"
          }
        }
      },
      "store": {
        "sub": {
          "sub": {
            "b7a083": "Unknown store sub: {{sub}}\nRun: ysk-server store help\n"
          }
        }
      },
      "cdn": {
        "subcommand": {
          "sub": {
            "76664f": "Unknown cdn subcommand: {{sub}}\nRun: ysk-server cdn help\n"
          }
        }
      },
      "backup": {
        "subcommand": {
          "sub": {
            "4092ad": "Unknown backup subcommand: {{sub}}\nRun: ysk-server backup help\n"
          }
        }
      }
    }
  },
  "setup": {
    "dryRunOk": "{{product}} setup dry-run OK",
    "dryRunNext": "Re-run without --dry-run to write config and initialize database",
    "weakPassword": "Admin password is weak or default. Pass a strong --admin-password (min 8, not \"admin\"/common defaults), or set YSK_ALLOW_INSECURE_DEFAULTS=1 for local dev only.",
    "weakPasswordShort": "Weak or default admin password rejected",
    "nextStart": "Start (API + Web UI): {{cli}} serve --config {{configPath}}",
    "nextOpen": "Open http://{{host}}:{{port}}/ and login as {{user}}",
    "nextUnit": "Systemd unit template: {{unitPath}}",
    "nextInstall": "Install unit (root + YSK_EXECUTE): {{cli}} system unit-install --enable --data-dir {{dataDir}}",
    "nextExecute": "Production host mutations require YSK_EXECUTE=1 and root",
    "nextGolive": "Go-live: docs/deploy/go-live.md + ysk-server readiness --json",
    "secPassword": "SECURITY: change admin password immediately (bootstrap used a weak/default password)",
    "sec2fa": "SECURITY: enable admin 2FA under Security → Account",
    "secListen": "SECURITY: listening on all interfaces — put behind firewall / reverse proxy; prefer 127.0.0.1 + SSH tunnel for admin",
    "ok": "{{product}} setup completed (database initialized)",
    "okInsecure": "{{product}} setup completed (database initialized) [INSECURE BOOTSTRAP — change password]"
  }
}
