{"id":50275911,"url":"https://github.com/syself/caphcli","last_synced_at":"2026-05-27T20:30:37.690Z","repository":{"id":350205162,"uuid":"1189739721","full_name":"syself/caphcli","owner":"syself","description":"Command Line Tool for Cluster API Provider Hetzner (Syself)","archived":false,"fork":false,"pushed_at":"2026-05-26T11:53:25.000Z","size":163,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T13:35:30.019Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syself.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-23T16:09:52.000Z","updated_at":"2026-04-16T08:27:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/syself/caphcli","commit_stats":null,"previous_names":["syself/caphcli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/syself/caphcli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syself%2Fcaphcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syself%2Fcaphcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syself%2Fcaphcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syself%2Fcaphcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syself","download_url":"https://codeload.github.com/syself/caphcli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syself%2Fcaphcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33583394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-27T20:30:36.931Z","updated_at":"2026-05-27T20:30:37.680Z","avatar_url":"https://github.com/syself.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# caphcli\n\n`caphcli` is a standalone CLI for [Cluster API Provider\nHetzner](https://github.com/syself/cluster-api-provider-hetzner/)\n\n## Required Environment Variables\n\nDepending on the command, these environment variables are needed.\n\n- `HETZNER_ROBOT_USER` and `HETZNER_ROBOT_PASSWORD` for Hetzner Robot API access.\n- `SSH_KEY_NAME` for the Robot SSH key name to use or create.\n- One of `HETZNER_SSH_PUB_PATH` or `HETZNER_SSH_PUB` for the SSH public key.\n- One of `HETZNER_SSH_PRIV_PATH` or `HETZNER_SSH_PRIV` for the SSH private key.\n\n## Common Usage\n\nIf you have Go installed, the easiest way is to run the code like this:\n\n```console\ngo run github.com/syself/caphcli@latest -h\n```\n\nIf you have new Hetzner Baremetal (Robot) Server, then create a HetznerBareMetalHost YAML file:\n\n```console\ngo run github.com/syself/caphcli@latest create-host-yaml 1234567 1234567.yaml\n```\n\nThis will create a HetznerBareMetalHost YAML file: `1234567.yaml`\n\nThe generated host starts with `spec.maintenanceMode: true`, and the command prints a hint to run `check-bm-server` next.\n\nAfter that you can check if the rescue system is reachable reliably:\n\n```console\ngo run github.com/syself/caphcli@latest check-bm-server 1234567.yaml\n```\n\n`check-bm-server` refuses to run unless `spec.maintenanceMode` is `true`. After a successful check it prints a hint to disable maintenance mode again.\n\n\u003c!-- readmegen:cli-help:start --\u003e\n\n## CLI Help\n\n### `caphcli --help`\n\n```text\nCAPH developer and operations CLI\n\nUsage:\n  caphcli [command]\n\nAvailable Commands:\n  check-bm-server  Validate rescue and provisioning reliability for one bare-metal server\n  completion       Generate the autocompletion script for the specified shell\n  create-host-yaml Generate a HetznerBareMetalHost YAML file for one Robot server\n  help             Help about any command\n\nFlags:\n  -h, --help   help for caphcli\n\nUse \"caphcli [command] --help\" for more information about a command.\n```\n\n### `caphcli check-bm-server --help`\n\n```text\nValidate rescue and provisioning reliability for one HetznerBareMetalHost from a local YAML file.\n\nThe command does not talk to Kubernetes. It reads one local YAML file containing\nHetznerBareMetalHost objects and then talks directly to Hetzner Robot plus the\ntarget server.\n\nUsage:\n  caphcli check-bm-server FILE [flags]\n\nExamples:\n  caphcli check-bm-server \\\n    test/e2e/data/infrastructure-hetzner/v1beta1/bases/hetznerbaremetalhosts.yaml \\\n    --name bm-e2e-1731561\n\nFlags:\n      --force                                Skip the destructive-action confirmation prompt\n  -h, --help                                 help for check-bm-server\n      --image-path string                    Installimage IMAGE path for operating system inside the Hetzner rescue system (default \"/root/.oldroot/nfs/images/Ubuntu-2404-noble-amd64-base.tar.gz\")\n      --name string                          HetznerBareMetalHost metadata.name. Optional if YAML contains exactly one host\n      --poll-interval duration               Polling interval for wait steps (default 10s)\n      --timeout-activate-rescue duration     Timeout for activating rescue boot (default 45s)\n      --timeout-check-disk-rescue duration   Timeout for checking target disks in rescue (default 1m0s)\n      --timeout-ensure-ssh-key duration      Timeout for ensuring SSH key in Robot (default 1m0s)\n      --timeout-fetch-server duration        Timeout for fetching server details from Robot (default 30s)\n      --timeout-install duration             Timeout for one Ubuntu install step (default 9m0s)\n      --timeout-load-input duration          Timeout for input parsing + env loading (default 30s)\n      --timeout-reboot-os duration           Timeout for rebooting into installed OS (default 45s)\n      --timeout-reboot-rescue duration       Timeout for requesting reboot to rescue (default 45s)\n      --timeout-wait-os duration             Timeout for waiting until installed OS is reachable (default 6m0s)\n      --timeout-wait-rescue duration         Timeout for waiting until rescue SSH is reachable (default 8m0s)\n```\n\n### `caphcli create-host-yaml --help`\n\n```text\nGenerate a HetznerBareMetalHost YAML file for one Hetzner Robot server.\n\nThe command talks directly to Hetzner Robot, ensures rescue SSH access, reboots\nthe target server into rescue once, inspects the available disks, and writes a\nYAML file to the requested output path. Progress and confirmation prompts go to stderr.\n\nUsage:\n  caphcli create-host-yaml SERVER_ID OUTPUT_FILE [flags]\n\nExamples:\n  caphcli create-host-yaml 1751550 host.yaml\n  caphcli create-host-yaml --force --name bm-e2e-1751550 1751550 host.yaml\n\nFlags:\n      --force                              Skip the reboot confirmation prompt\n  -h, --help                               help for create-host-yaml\n      --name string                        metadata.name for the generated HetznerBareMetalHost (default: bm-SERVER_ID)\n      --poll-interval duration             Polling interval while waiting for rescue SSH (default 10s)\n      --timeout-activate-rescue duration   Timeout for activating rescue boot (default 45s)\n      --timeout-ensure-ssh-key duration    Timeout for ensuring SSH key in Robot (default 1m0s)\n      --timeout-fetch-server duration      Timeout for fetching server details from Robot (default 30s)\n      --timeout-load-input duration        Timeout for env loading + initial validation (default 30s)\n      --timeout-reboot-rescue duration     Timeout for requesting reboot to rescue (default 45s)\n      --timeout-wait-rescue duration       Timeout for waiting until rescue SSH is reachable (default 8m0s)\n```\n\n\u003c!-- readmegen:cli-help:end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyself%2Fcaphcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyself%2Fcaphcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyself%2Fcaphcli/lists"}