{"id":31566504,"url":"https://github.com/liamchampton/go-cli-template","last_synced_at":"2026-02-16T10:35:39.332Z","repository":{"id":181209975,"uuid":"666406289","full_name":"liamchampton/go-cli-template","owner":"liamchampton","description":"This is a template that can be used with GitHub Codespaces to get you up and running with your CLI project","archived":false,"fork":false,"pushed_at":"2023-07-14T15:48:52.000Z","size":419,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T07:35:54.281Z","etag":null,"topics":["cli","go","template"],"latest_commit_sha":null,"homepage":"","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/liamchampton.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}},"created_at":"2023-07-14T12:42:37.000Z","updated_at":"2025-07-19T00:35:49.000Z","dependencies_parsed_at":"2023-07-14T14:17:56.963Z","dependency_job_id":null,"html_url":"https://github.com/liamchampton/go-cli-template","commit_stats":null,"previous_names":["liamchampton/go-cli-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/liamchampton/go-cli-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamchampton%2Fgo-cli-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamchampton%2Fgo-cli-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamchampton%2Fgo-cli-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamchampton%2Fgo-cli-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liamchampton","download_url":"https://codeload.github.com/liamchampton/go-cli-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamchampton%2Fgo-cli-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29506156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"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":["cli","go","template"],"created_at":"2025-10-05T07:31:41.927Z","updated_at":"2026-02-16T10:35:39.308Z","avatar_url":"https://github.com/liamchampton.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-cli-template\nThis is a template that is designed to be used with GitHub Codespaces to get you up and running with your CLI project in a matter of minutes.\n\nThis project is using https://github.com/spf13/cobra as a foundation.\n\n## Getting started\n\nTo get started, first you need to decide if you want to `fork` or `template` this repository. In simple terms, with a fork you will have a copy of this repository in your own GitHub account and you can make changes to it as you wish, as well as the ability to pull any updates made from this top level template repository. With a template, you will have a copy of this repository in your own GitHub account as it stands in its current form. You will be able to make changes to the code and make the project your own, but you will not be able to push those changes back to this template repository.\n\n### Forking / Templating\n\n![Forking or templating](./assets/fork-or-template.png)\n\n### Creating a codespace\n\nOnce you have your own copy of this repository, you can create a codespace by clicking the green `Code` button and selecting `New Codespace`.\n\n![Template codespace](./assets/template-button.png)\n\nOR\n\n![Codeing codespace](./assets/code-button.png)\n\nOnce you have chosen your method, you will be presented with a screen that looks like this:\n\n![Codespace creation](./assets/codespace-setup.png)\n\nWait for this to finish and you will be presented with a screen that looks like VSCode, but in your browser.\n\nOnce this has opened you will need to wait just a moment longer for the post create command to finish setting up the environment. You will know this is done when you see the following in the terminal:\n\n![Post create command](./assets/post-create-command.png)\n\nOnce this is done, you are ready to start coding!\n\n## Running out of the box\nrun the commands:\n\n```bash\ngo build\n./go-cli-template\n```\n\n## Commands\n\nSo far there is only 1 command created, `example` and this can be seen within the `/cmd` directory.\n\nThe pre-installed Cobra CLI tools can help make your project far more extensible with little work.\n\nTo see the commands available with Cobra, run the command: \n\n```bash\ncobra-cli -h\n```\n\nThis will show you the following output:\n\n![Cobra CLI help](./assets/cobra-cli.png)\n\n### Adding a new command\n\nAdding a new command at the root level is very easy to do, you just need to use the following command:\n\n```bash\ncobra-cli add \u003cname of new command\u003e\n```\n\nOnce you have done this, navigate to the new command within the `/cmd` directory and edit the boilerplate code provided for your needs.\n\nThis is a basic foundation for you to build ontop of without the hassel of setup. Adding flags and subcommand palletes is bespoke to your own projet and information on how to do that can be found in the offical docs - https://pkg.go.dev/github.com/spf13/cobra#section-readme\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamchampton%2Fgo-cli-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliamchampton%2Fgo-cli-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamchampton%2Fgo-cli-template/lists"}