{"id":36754629,"url":"https://github.com/gofunct/goexec","last_synced_at":"2026-01-12T12:48:25.205Z","repository":{"id":57571225,"uuid":"170158235","full_name":"gofunct/goexec","owner":"gofunct","description":"golang + bash scripting + templating+ cli = 👍 https://gofunct.github.io/goexec/.","archived":false,"fork":false,"pushed_at":"2019-02-15T06:26:50.000Z","size":3274,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T19:27:50.608Z","etag":null,"topics":["colemanword"],"latest_commit_sha":null,"homepage":"https://gofunct.github.io/goexec/.","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/gofunct.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}},"created_at":"2019-02-11T16:04:03.000Z","updated_at":"2023-12-16T18:18:09.000Z","dependencies_parsed_at":"2022-09-17T15:42:03.447Z","dependency_job_id":null,"html_url":"https://github.com/gofunct/goexec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gofunct/goexec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunct%2Fgoexec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunct%2Fgoexec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunct%2Fgoexec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunct%2Fgoexec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gofunct","download_url":"https://codeload.github.com/gofunct/goexec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunct%2Fgoexec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["colemanword"],"created_at":"2026-01-12T12:48:24.520Z","updated_at":"2026-01-12T12:48:25.197Z","avatar_url":"https://github.com/gofunct.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![gofunct](https://github.com/gofunct/logo/blob/master/white_logo_dark_background.jpg?raw=true)\n\n# GoExec\n\n**Author:** Coleman Word coleman.word@gofunct.com\n\n**Download**: `go get github.com/gofunct/goexec/goexec`\n\n**License:** MIT\n\n```text\n _____       ______               \n / ____|     |  ____|              \n| |  __  ___ | |__  __  _____  ___ \n| | |_ |/ _ \\|  __| \\ \\/ / _ \\/ __|\n| |__| | (_) | |____ \u003e  \u003c  __/ (__ \n \\_____|\\___/|______/_/\\_\\___|\\___|\n                                   \n```\n\n## Getting Started `goexec init`\n\n\n- Run goexec init to create a default goexec sripting cli in your current directory\n- You will be prompted for the name of the directory to create(this will be the name of the cli)\n- After entering a directory name, a folder containing the cli, along with a default goexec.yaml will be created\n- Enter the created directory and install the program\n- Run the command to see the default subcommands and flags\n\nThe default generated cli will print its usage if called without any subcommands. It should look like this:\n\n## Goexec Usage: `goexec`\n\n\u003cdetails\u003e\u003csummary\u003eshow\u003c/summary\u003e\n\u003cp\u003e\n\n```text\n\nAuthor: Coleman Word coleman.word@gofunct.com\nDownload: go get github.com/gofunct/goexec/goexec\nLicense: MIT\n  _____       ______               \n / ____|     |  ____|              \n| |  __  ___ | |__  __  _____  ___ \n| | |_ |/ _ \\|  __| \\ \\/ / _ \\/ __|\n| |__| | (_) | |____ \u003e  \u003c  __/ (__ \n \\_____|\\___/|______/_/\\_\\___|\\___|\n                                   \n\n## Getting Started\n- Run goexec init to create a default goexec sripting cli in your current directory\n- You will be prompted for the name of the directory to create(this will be the name of the cli)\n- After entering a directory name, a folder containing the cli, along with a default goexec.yaml will be created\n- Enter the created directory and install the program\n- Run the command to see the default subcommands and flags\n\nThe default generated cli will print its usage if called without any subcommands. It should look like this:\n\n## Default Goexec Usage\nA goexec cli comes with default subcommands built in.\n\nHere is the usage for a goexec cli that was generated with the name \"scripter\":\n\n---\u003e Change me to a longer descripton of your goexec cli \u003c---\n\nUsage:\n  scripter [command]\n\nAvailable Commands:\n  debug       debug flags or current configuration\n  help        Help about any command\n  load        download all of your executable dependencies\n  script      run bash scripts\n\nFlags:\n  -h, --help      help for scripter\n      --version   version for scripter\n\nUse \"scripter [command] --help\" for more information about a command.\n\n\"load\" subcommands:\n\ndownload all of your executable dependencies\n\nUsage:\n  scripter load [command]\n\nAvailable Commands:\n  get         intelligently download folders/files from a remote url\n  mod         download go mod executable dependencies\n\nFlags:\n  -h, --help   help for load\n\n\"debug\" subcommands:\ndebug flags or current configuration\n\nUsage:\n  scripter debug [command]\n\nAvailable Commands:\n  config      debug configuration settings\n  flags       debug current flag settings\n\nFlags:\n  -h, --help   help for debug\n\n## Configuration\n\n- Your GoExec cli will read in all files that are named either goexec.yaml or goexec.json\n- Your configuration settings are automatically synced to environmental variables\n- Your configuration settings can be used to template scripts added to the cli\n\n## Templating\n\n- Goexec uses the excellent sprig funcmap functions package ref:https://github.com/Masterminds/sprig\n- Goexec renders scripts that contain \"{{\" with your current configuration settings and the sprig funcmap\nex: \nif you set name: \"Coleman Word\" in a goexec.yaml file in your current directory and add the following script:\necho \"hello {{ .name }}\" \u003e\u003e name.txt\n\nit will create a name.txt file containing \"Coleman Word\"\n\np       he...\n\n{{abbrevboth 5 10 \"1234 5678 9123\"}}:                                               ...5678...\n\n{{initials \"First Try\"}}:                                                           FT\n\n{{randNumeric 3}}:                                                                  528\n\n{{wrapWith 5 \"\\t\" \"Hello World\"}}:                                                  Hello\tWorld\n\n{{contains \"cat\" \"catch\"}}:                                                         true\n\n{{hasPrefix \"cat\" \"catch\"}}:                                                        true\n\n{{cat \"hello\" \"beautiful\" \"world\"}}:                                                hello beautiful world\n\n{{\"I Am Henry VIII\" | replace \" \" \"-\"}}:                                            I-Am-Henry-VIII\n\n{{snakecase \"FirstName\"}}:                                                          first_name\n\n{{camelcase \"http_server\"}}:                                                        HttpServer\n\n{{shuffle \"hello\"}}:                                                                holle\n\nRegExp:\n\n{{regexMatch \"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,}\" \"test@acme.com\"}}:   true\n\n{{- /*{{regexFindAll \"[2,4,6,8]\" \"123456789\"}}*/}}:\n{{regexFind \"[a-zA-Z][1-9]\" \"abcd1234\"}}:                                           d1\n\n{{regexReplaceAll \"a(x*)b\" \"-ab-axxb-\" \"${1}W\"}}:                                   -W-xxW-\n\n{{regexReplaceAllLiteral \"a(x*)b\" \"-ab-axxb-\" \"${1}\"}}:                             -${1}-${1}-\n\n{{regexSplit \"z+\" \"pizza\" -1}}:                                                     [pi a]\n\n{{if contains \"cat\" \"catch\"}}yes{{else}}no{{end}}:   yes\n\n{{1 | plural \"one anchovy\" \"many anchovies\"}}:       one anchovy\n\n{{2 | plural \"one anchovy\" \"many anchovies\"}}:       many anchovies\n\n{{3 | plural \"one anchovy\" \"many anchovies\"}}:       many anchovies\n\n\n## Contributing\n\nFeel free to open up any prs if you find any bugs!\n\n\"\n\nUsage:\n  goexec [command]\n\nAvailable Commands:\n  help        Help about any command\n  init        initialize a new goexec program in your current working directory\n\nFlags:\n  -h, --help   help for goexec\n\nUse \"goexec [command] --help\" for more information about a command.\n\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n \n## Default Goexec Usage(generated): `\"your-goexec-cli\"`\nA goexec cli comes with default subcommands built in.\n\nHere is the usage for a goexec cli that was generated with the name \"scripter\":\n\n```text\n---\u003e Change me to a longer descripton of your goexec cli \u003c---\n\nUsage:\n  scripter [command]\n\nAvailable Commands:\n  debug       debug flags or current configuration\n  help        Help about any command\n  load        download all of your executable dependencies\n  script      run bash scripts\n\nFlags:\n  -h, --help      help for scripter\n      --version   version for scripter\n\nUse \"scripter [command] --help\" for more information about a command.\n\n```\n\n\n### Load Subcommands: `\"your-goexec-cli\" load`\n\n```text\ndownload all of your executable dependencies\n\nUsage:\n  scripter load [command]\n\nAvailable Commands:\n  get         intelligently download folders/files from a remote url\n  mod         download go mod executable dependencies\n\nFlags:\n  -h, --help   help for load\n```\n\n\n### Debug Subcommands: `\"your-goexec-cli\" debug`\n```text\ndebug flags or current configuration\n\nUsage:\n  scripter debug [command]\n\nAvailable Commands:\n  config      debug configuration settings\n  flags       debug current flag settings\n\nFlags:\n  -h, --help   help for debug\n```\n\n\n## Configuration\n\n- Your GoExec cli will read in all files that are named either goexec.yaml or goexec.json\n- Your configuration settings are automatically synced to environmental variables\n- Your configuration settings can be used to template scripts added to the cli\n\n## Templating\n\n- Goexec uses the excellent sprig funcmap functions package ref:https://github.com/Masterminds/sprig\n- Goexec renders scripts that contain \"{{\" with your current configuration settings and the sprig funcmap\n\nex: \nif you set name: \"Coleman Word\" in a goexec.yaml file in your current directory and add the following script:\necho \"hello {{ .name }}\" \u003e\u003e name.txt\n\nit will create a name.txt file containing \"Coleman Word\"\nHere is a short list of template function examples that can be embedded in a script:\n(Generating uuid, self-signed certificates, rsa private keys, and more can be rendered at runtime but not listed below) \n\nSemantic Versioning:\n`{{ semverCompare \"1.2.3\" \"1.2.3\" }}`:  `true`\n\n\t\t`{{ semverCompare \"^1.2.0\" \"1.2.3\" }}`: `true`\n\n\t\t`{{ semverCompare \"^1.2.0\" \"2.2.3\" }}`: `false`\n\nDeriving Passwords: \n\t`{{derivePassword 1 \"long\" \"password\" \"user\" \"example.com\"}}`:    \"ZedaFaxcZaso9*\"\n\n\t\t`{{derivePassword 2 \"long\" \"password\" \"user\" \"example.com\"}}`:    \"Fovi2@JifpTupx\"\n\n\t\t`{{derivePassword 1 \"maximum\" \"password\" \"user\" \"example.com\"}}`: \"pf4zS1LjCg\u0026LjhsZ7T2~\"\n\n\t\t`{{derivePassword 1 \"medium\" \"password\" \"user\" \"example.com\"}}`:  \"ZedJuz8$\"\n\n\t\t`{{derivePassword 1 \"basic\" \"password\" \"user\" \"example.com\"}}`:   \"pIS54PLs\"\n\n\t\t`{{derivePassword 1 \"short\" \"password\" \"user\" \"example.com\"}}`:   \"Zed5\"\n\n\t\t`{{derivePassword 1 \"pin\" \"password\" \"user\" \"example.com\"}}`:     \"6685\",\n\nString Manipulation:\n{{trim \"   hello    \"}}:                                                            hello\n\n{{trimAll \"$\" \"$5.00\"}}:                                                          5.00\n\n{{trimSuffix \"-\" \"hello-\"}}:                                                        hello\n\n{{upper \"hello\"}}:                                                                  HELLO\n\n{{lower \"HELLO\"}}:                                                                  hello\n\n{{title \"hello world\"}}:                                                            Hello World\n\n{{untitle \"Hello World\"}}:                                                          hello world\n\n{{repeat 3 \"hello\"}}:                                                               hellohellohello\n\n{{substr 0 5 \"hello world\"}}:                                                       hello\n\n{{nospace \"hello w o r l d\"}}:                                                      helloworld\n\n{{trunc 5 \"hello world\"}}:                                                          hello\n\n{{abbrev 5 \"hello world\"}}:                                                         he...\n\n{{abbrevboth 5 10 \"1234 5678 9123\"}}:                                               ...5678...\n\n{{initials \"First Try\"}}:                                                           FT\n\n{{randNumeric 3}}:                                                                  528\n\n{{wrapWith 5 \"\\t\" \"Hello World\"}}:                                                  Hello\tWorld\n\n{{contains \"cat\" \"catch\"}}:                                                         true\n\n{{hasPrefix \"cat\" \"catch\"}}:                                                        true\n\n{{cat \"hello\" \"beautiful\" \"world\"}}:                                                hello beautiful world\n\n{{\"I Am Henry VIII\" | replace \" \" \"-\"}}:                                            I-Am-Henry-VIII\n\n{{snakecase \"FirstName\"}}:                                                          first_name\n\n{{camelcase \"http_server\"}}:                                                        HttpServer\n\n{{shuffle \"hello\"}}:                                                                holle\n\nRegExp:\n\n{{regexMatch \"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,}\" \"test@acme.com\"}}:   true\n\n{{- /*{{regexFindAll \"[2,4,6,8]\" \"123456789\"}}*/}}:\n{{regexFind \"[a-zA-Z][1-9]\" \"abcd1234\"}}:                                           d1\n\n{{regexReplaceAll \"a(x*)b\" \"-ab-axxb-\" \"${1}W\"}}:                                   -W-xxW-\n\n{{regexReplaceAllLiteral \"a(x*)b\" \"-ab-axxb-\" \"${1}\"}}:                             -${1}-${1}-\n\n{{regexSplit \"z+\" \"pizza\" -1}}:                                                     [pi a]\n\n{{if contains \"cat\" \"catch\"}}yes{{else}}no{{end}}:   yes\n\n{{1 | plural \"one anchovy\" \"many anchovies\"}}:       one anchovy\n\n{{2 | plural \"one anchovy\" \"many anchovies\"}}:       many anchovies\n\n{{3 | plural \"one anchovy\" \"many anchovies\"}}:       many anchovies\n\n\n\n## Contributing\n\nFeel free to open up any prs if you find any bugs!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofunct%2Fgoexec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgofunct%2Fgoexec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofunct%2Fgoexec/lists"}