{"id":18100155,"url":"https://github.com/carlocorradini/inline","last_synced_at":"2025-07-09T14:33:34.728Z","repository":{"id":105493854,"uuid":"568199559","full_name":"carlocorradini/inline","owner":"carlocorradini","description":"Inline script sources","archived":false,"fork":false,"pushed_at":"2025-03-17T20:42:04.000Z","size":505,"stargazers_count":13,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T16:09:23.235Z","etag":null,"topics":["automation","bash","inline","posix-sh","script","source"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/carlocorradini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"carlocorradini"}},"created_at":"2022-11-19T19:03:29.000Z","updated_at":"2025-02-23T09:55:31.000Z","dependencies_parsed_at":"2025-04-13T16:09:25.484Z","dependency_job_id":"7348b66a-3632-4b84-bd00-1e0b4031f074","html_url":"https://github.com/carlocorradini/inline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/carlocorradini/inline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlocorradini%2Finline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlocorradini%2Finline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlocorradini%2Finline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlocorradini%2Finline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlocorradini","download_url":"https://codeload.github.com/carlocorradini/inline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlocorradini%2Finline/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264476224,"owners_count":23614472,"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":["automation","bash","inline","posix-sh","script","source"],"created_at":"2024-10-31T21:13:09.532Z","updated_at":"2025-07-09T14:33:34.711Z","avatar_url":"https://github.com/carlocorradini.png","language":"Shell","funding_links":["https://github.com/sponsors/carlocorradini"],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 --\u003e\n\n# [Inline](./inline.sh) script sources\n\n[![ci](https://github.com/carlocorradini/inline/actions/workflows/ci.yml/badge.svg)](https://github.com/carlocorradini/inline/actions/workflows/ci.yml)\n[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)\n\nInline script sources (`source` or `.`).\n\nIt is convenient to be able to divide long scripts into many files to make them easier to work with while maintaining the ability to distribute them as a single script.\n\nInspired by [@joehillen](https://github.com/joehillen) [GitHub Gist](https://gist.github.com/joehillen/30f08738c1c3c0ca3e4c754ad33ad2ff)\n\n## Features\n\n- `POSIX` compliant\n\n- Sourcing with quotes, spaces and more\n\n- Sourcing from `$PATH`\n\n- Sourcing from [ShellCheck](https://github.com/koalaman/shellcheck) source: `# shellcheck source=path/to/script.sh`\n\n  \u003e **Warning**: Available only if `source` or `.` is invalid\n\n  ```sh\n  # shellcheck source=path/to/script.sh\n  . \"$DIR/path/to/script.sh\"\n  ```\n\n- Sources in sources\n\n- Recursion detection\n\n- Shebang (`#!`) removal in sources\n\n- Skip source: `# inline skip`\n\n  \u003e **Note**: Works with [ShellCheck](https://github.com/koalaman/shellcheck) as well\n\n  ```sh\n  # inline skip\n  # shellcheck source=path/to/script.sh\n  . path/to/script.sh\n  ```\n\n- Configurable \\\n  See [Options](#options)\n\n## Download\n\n```sh\nwget https://raw.githubusercontent.com/carlocorradini/inline/main/inline.sh\n```\n\n## Usage\n\n\u003e **Warning**: Script must have _execute_ permission: `chmod u+x ./inline.sh`\n\n\u003e **Note**: See [Options](#options) for more configuration\n\n\u003e **Note**: Type `--help` for more information\n\nPass the script to be aligned with `--in-file path/to/script.sh` \\\nIt creates a script called `script.aligned.sh` \\\nThe resulting script is automatically _aligned_: all sources (`source` or `.`) are directly included.\n\n### Examples\n\n1. Inline script `hello.sh` and save it as `world.sh`\n\n   ```sh\n   ./inline.sh --in-file hello.sh --out-file world.sh\n   ```\n\n1. Inline script `hello_world.sh` and overwrite it\n\n   ```sh\n   ./inline.sh --in-file hello_world.sh --overwrite\n   ```\n\n## Options\n\n| **Name**              | **Description**            | **Default**                                 | **Values**                                                                                                                            |\n| --------------------- | -------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| `--disable-color`     | Disable color              | `false`                                     |\n| `--help`              | Show help message and exit |\n| `--in-file \u003cFILE\u003e`    | Input file                 |                                             | Any valid file                                                                                                                        |\n| `--log-level \u003cLEVEL\u003e` | Logger level               | `info`                                      | `fatal` Fatal level \u003cbr/\u003e `warn` Warning level \u003cbr/\u003e `info` Informational level \u003cbr/\u003e `debug` Debug level \u003cbr/\u003e `silent` Silent level |\n| `--out-file \u003cFILE\u003e`   | Output file                | `[IN_FILE_NAME].inlined[IN_FILE_EXTENSION]` | Any valid file                                                                                                                        |\n| `--overwrite`         | Overwrite input file       | `false`                                     |\n\n## Contributing\n\nI would love to see your contribution :heart:\n\nSee [CONTRIBUTING](./CONTRIBUTING.md) guidelines.\n\n## License\n\nThis project is licensed under the [MIT](https://opensource.org/licenses/MIT) License. \\\nSee [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlocorradini%2Finline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlocorradini%2Finline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlocorradini%2Finline/lists"}