{"id":17081374,"url":"https://github.com/eugenmayer/go-shell-cli-quickstarter","last_synced_at":"2026-03-11T07:30:58.750Z","repository":{"id":57516454,"uuid":"154848197","full_name":"EugenMayer/go-shell-cli-quickstarter","owner":"EugenMayer","description":"Boilerplate to bootstrap you go-cli project and replace bash - pragmaticly","archived":false,"fork":false,"pushed_at":"2023-02-25T16:00:03.000Z","size":40,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T20:53:30.545Z","etag":null,"topics":["bash","cli-command","exec","golang","scp","ssh"],"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/EugenMayer.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":"2018-10-26T14:35:17.000Z","updated_at":"2023-02-25T16:00:08.000Z","dependencies_parsed_at":"2022-09-26T18:00:49.662Z","dependency_job_id":null,"html_url":"https://github.com/EugenMayer/go-shell-cli-quickstarter","commit_stats":null,"previous_names":["eugenmayer/go-antibash-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EugenMayer%2Fgo-shell-cli-quickstarter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EugenMayer%2Fgo-shell-cli-quickstarter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EugenMayer%2Fgo-shell-cli-quickstarter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EugenMayer%2Fgo-shell-cli-quickstarter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EugenMayer","download_url":"https://codeload.github.com/EugenMayer/go-shell-cli-quickstarter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631725,"owners_count":21136560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bash","cli-command","exec","golang","scp","ssh"],"created_at":"2024-10-14T12:52:02.433Z","updated_at":"2026-03-11T07:30:58.701Z","avatar_url":"https://github.com/EugenMayer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## WAT\n\nThis boilerplate / starter should help you to replace a bash script as fast as possible - run `./create-my-project.sh`  and start right away with your business logic.\n\nIt should be transparent, you should be able to understand what is happening and go as deep into the matter as you like.\nIt should be easy to understand, all implementations in cmd/ are small and specific so you can junk them together and chain them.\n\nIt should help you\n - **get the job done. Period.** (not teach you go concepts all over the place)\n - be documented .. right.\n - handling script parameters and options using the [cobra](https://github.com/spf13/cobra) lib\n - running cli commands on the shell with proper stdin/stdout/err handling easily: [go-exec](https://github.com/EugenMayer/go-exec)\n - running cli commands over ssh utilizing your ssh-agent/privkey/password easily: [go-sshclient](https://github.com/EugenMayer/go-sshclient)\n - transferring files from and to remote server using scp easily: [go-sshclient](https://github.com/EugenMayer/go-sshclient)\n - Include IntelliJ run configuration to run/debug the tasks right away\n \n\n**Why not learning all the deeper concepts?**\nWell you could .. but that stops most people from using golang over bash in the smaller, daily projects.\nSo you will learn the deeper parts every time you write something, part by part - but that happens as a side-track, while\nyou actually get your job done\n \n## Get started\n\nYou can generate a new project for yourself using this boilerplate\n\nThis will generate a new shell-project with the name 'mycliname' in `/tmp/mycliname` - you can open the folder using your\nIDE and start developing right away\n\n```bash\n./create-my-project.sh --project=mycliname --username=ghusername --strip-ssh\n\n# or with private SCM\n./create-my-project.sh --project=mycliname --username=ghusername  --host=ourprivate-scm.tld --strip-ssh\n```\n\nYou most probably want to `mv` the project from `/tmp` into a folder for your scm prjects.\n\n### Parameters\n\n- `--project` - The name of your CLI program that you are planning (`mycliname` in the examples).\n- `--username` - Your namespace, usually your GitHub username (`ghusername` in the examples).\n- `--strip-ssh` (optional) - Will remove the `ssh` and `scp` examples from the starter, including all of it's dependencies for a slim and stripped down project.\n- `--host` (optional) - Your private VCS domain (without scheme).\n\nThat's it, read the shell output and you are ready and set to start creating.\n\n## Included examples\n\nI did ship `dist/mycli*` in the repo for convenience reasons for now, so you do neither need to `build` yourself nor us `curl`\nGenerally depending on your use, use `mycli-macos` or `mycli-linux`\n\n### Exec\n\n```bash\n  dist/mycli-macos myexec --cmd=\"echo hi\"\n```\n\n### SSH\nIf you want to the the ssh command, just use the local `docker-compose.yml` to start a local `ssh node`\n\n```\n  docker-compose up -d\n  dist/mycli-macos myssh --host=localhost --port=2301 --key=test/sshkeys/id_rsa\n```\n\n### SCP\nIf you want to the the ssh command, just use the local `docker-compose.yml` to start a local `ssh node`\n\n```bash\n  docker-compose up -d\n  dist/mycli-macos myscp --host=localhost --port=2301 --key=test/sshkeys/id_rsa --file=test/dummytestfile\n```\n\n## Build this project yourself\n\n```bash\n   make build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenmayer%2Fgo-shell-cli-quickstarter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feugenmayer%2Fgo-shell-cli-quickstarter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenmayer%2Fgo-shell-cli-quickstarter/lists"}