{"id":23535046,"url":"https://github.com/ripta/hypercmd","last_synced_at":"2026-02-23T01:31:31.972Z","repository":{"id":57511416,"uuid":"158933421","full_name":"ripta/hypercmd","owner":"ripta","description":"A hyperbinary wrapper","archived":false,"fork":false,"pushed_at":"2025-12-17T08:36:58.000Z","size":151,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-07T21:39:29.573Z","etag":null,"topics":["binary","cobra","golang","hyperbinary","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ripta.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":"2018-11-24T12:18:28.000Z","updated_at":"2025-12-17T08:37:00.000Z","dependencies_parsed_at":"2025-10-29T10:19:43.688Z","dependency_job_id":null,"html_url":"https://github.com/ripta/hypercmd","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ripta/hypercmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fhypercmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fhypercmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fhypercmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fhypercmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ripta","download_url":"https://codeload.github.com/ripta/hypercmd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fhypercmd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29734468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["binary","cobra","golang","hyperbinary","wrapper"],"created_at":"2024-12-26T01:14:30.475Z","updated_at":"2026-02-23T01:31:31.965Z","avatar_url":"https://github.com/ripta.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hypercmd\n\nA [spf13/cobra](https://github.com/spf13/cobra)-compatible wrapper to make magical\nhyperbinaries: a binary containing other commands. The hyperbinary behaves like tools\nsuch as `busybox`, where multiple related commands can be bundled into a single binary\nfor convenience, and then installed as separate symlinked commands.\n\n## Usage\n\nCreate a hyperbinary by initializing a `HyperCommand` and adding your cobra commands to it:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/ripta/hypercmd/pkg/hypercmd\"\n)\n\nfunc main() {\n\t// Create a new hypercommand\n\thc := hypercmd.New(\"mytool\")\n\n\t// Add commands to the hypercommand\n\taddCmd := \u0026cobra.Command{\n\t\tUse:   \"add [numbers...]\",\n\t\tShort: \"Add numbers together\",\n\t\tRun: func(cmd *cobra.Command, args []string) {\n\t\t\tfmt.Println(\"Adding numbers:\", args)\n\t\t},\n\t}\n\n\tmultiplyCmd := \u0026cobra.Command{\n\t\tUse:   \"multiply [numbers...]\",\n\t\tShort: \"Multiply numbers together\",\n\t\tRun: func(cmd *cobra.Command, args []string) {\n\t\t\tfmt.Println(\"Multiplying numbers:\", args)\n\t\t},\n\t}\n\n\thc.AddCommand(addCmd)\n\thc.AddCommand(multiplyCmd)\n\n\t// Resolve and execute the appropriate command\n\tcmd, err := hc.Resolve(os.Args, false)\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Error: %v\\n\", err)\n\t\tos.Exit(1)\n\t}\n\n\tif err := cmd.Execute(); err != nil {\n\t\tos.Exit(1)\n\t}\n}\n```\n\nAfter building the binary, you can use it in multiple ways.\n\n### As a traditional command with subcommands\n\n```bash\n# Run as the main command\n❯ mytool\nRun a command in mytool\n\nUsage: mytool [command]\n\nAvailable Commands:\n  add         Add numbers together\n  help        Help about any command\n  install     Install hyperbinary commands as symlinks\n  multiply    Multiply numbers together\n\n❯ mytool add 1 2 3\nAdding numbers: [1 2 3]\n\n❯ mytool multiply 4 5 6\nMultiplying numbers: [4 5 6]\n```\n\n### As symlinked binaries (after running `install`)\n\nYou'd first install the symlinks for each subcommand. Only the first level of\nsubcommands are actually installed.\n\n```bash\n❯ mytool install -y\nInstalling 2 symlinks to /home/foo/bin/mytool in /home/foo/bin\nInstalled symlink for add at /home/foo/bin/add\nInstalled symlink for multiply at /home/foo/bin/multiply\n```\n\nOnce installed, each subcommand becomes available as its own binary:\n\n```bash\n❯ add 1 2 3\nAdding numbers: [1 2 3]\n\n❯ multiply 4 5 6\nMultiplying numbers: [4 5 6]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripta%2Fhypercmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fripta%2Fhypercmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripta%2Fhypercmd/lists"}