{"id":26544077,"url":"https://github.com/hmerritt/combine-script","last_synced_at":"2026-04-29T15:02:57.016Z","repository":{"id":110878310,"uuid":"348180653","full_name":"hmerritt/combine-script","owner":"hmerritt","description":"Bash framework to create CLI scripts by combining multiple scripts into one.","archived":false,"fork":false,"pushed_at":"2024-12-06T18:21:41.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T23:42:50.707Z","etag":null,"topics":["bash","bash-script","cli","framework"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/hmerritt.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}},"created_at":"2021-03-16T01:53:06.000Z","updated_at":"2025-03-12T16:09:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd58b4b5-3462-4f26-a4d2-d479cc3ed266","html_url":"https://github.com/hmerritt/combine-script","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/hmerritt/combine-script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fcombine-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fcombine-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fcombine-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fcombine-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmerritt","download_url":"https://codeload.github.com/hmerritt/combine-script/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fcombine-script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32430803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","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":["bash","bash-script","cli","framework"],"created_at":"2025-03-22T03:17:15.533Z","updated_at":"2026-04-29T15:02:56.967Z","avatar_url":"https://github.com/hmerritt.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Combine.sh\n\nA simple script that combines bash scripts **and** provides CLI usage for all user functions.\n\n## Usage\n\nSee [Example](./example/README.md) for a more detailed example.\n\n### Recommendations\n\n1. Write all scripts using functions\n    - This is because functions combine easily and can be called via CLI when combined\n2. Don't combine scripts that use CLI arguments (wrap them within a function instead!)\n    - CLI arguments will mess with the other scripts when combined\n3. Any function you write can be called within any other function (even if they are in a different file!)\n4. Functions can be public/private. A public function starts with a capital letter, and can be executed from the CLI after combining. Private functions act as utility functions and are hidden from the CLI.\n\n### Build a Combined Script\n\nBuild using the following command:\n\n```bash\n$ ./combine.sh \u003cdir-to-scripts\u003e\n```\n\n```bash\n$ ./combine.sh scripts\n```\n\n### Using CLI commands for functions\n\n`Combine.sh` makes it possible to run individual functions within a script directly from the CLI.\n\n```bash\n$ ./script.sh run \u003cfunction\u003e\n```\n\n#### Example CLI function usage\n\nLets say we have a script as follows;\n\n```bash\n#!/bin/bash\n\nfunction example_func {\n  echo \"Example function\"\n\n  mv $1 $2\n\n  cp $2 /example/location/$2\n\n  echo \"All arguments are passed through: ${3}, ${4}, ... (infinity)\"\n}\n```\n\nAfter building it with `Combine.sh`, we can run this (super useful) function via the CLI:\n\n```bash\n$ ./script.sh run example_func\n```\n\nPassing arguments is just as easy:\n\n```bash\n$ ./script.sh run example_func \"arg1.sh\" \"arg2.sh\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmerritt%2Fcombine-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmerritt%2Fcombine-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmerritt%2Fcombine-script/lists"}