{"id":43678259,"url":"https://github.com/macie/smallstache.sh","last_synced_at":"2026-02-05T01:20:31.989Z","repository":{"id":78228440,"uuid":"595253629","full_name":"macie/smallstache.sh","owner":"macie","description":"POSIX-compliant logic-less template engine.","archived":false,"fork":false,"pushed_at":"2024-09-15T08:15:57.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2024-09-16T10:27:39.913Z","etag":null,"topics":["mustache","posix","posix-compliant","shell","template-engine"],"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/macie.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}},"created_at":"2023-01-30T17:57:55.000Z","updated_at":"2024-09-15T08:15:50.000Z","dependencies_parsed_at":"2024-09-15T10:26:49.116Z","dependency_job_id":"1363b40a-1202-4bc6-a525-a4955283b9e0","html_url":"https://github.com/macie/smallstache.sh","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/macie/smallstache.sh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macie%2Fsmallstache.sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macie%2Fsmallstache.sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macie%2Fsmallstache.sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macie%2Fsmallstache.sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macie","download_url":"https://codeload.github.com/macie/smallstache.sh/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macie%2Fsmallstache.sh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29105274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T00:52:08.035Z","status":"ssl_error","status_checked_at":"2026-02-05T00:52:07.703Z","response_time":62,"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":["mustache","posix","posix-compliant","shell","template-engine"],"created_at":"2026-02-05T01:20:31.263Z","updated_at":"2026-02-05T01:20:31.973Z","avatar_url":"https://github.com/macie.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smallstache.sh\n\n[![Quality check status](https://github.com/macie/smallstache.sh/actions/workflows/check.yml/badge.svg)](https://github.com/macie/smallstache.sh/actions/workflows/check.yml)\n[![License](https://img.shields.io/github/license/macie/smallstache.sh)](https://tldrlegal.com/license/mit-license)\n\nA commandline, POSIX-compliant [logic-less template engine](https://en.wikipedia.org/wiki/Web_template_system)\nsimilar to [Mustache](https://mustache.github.io/)/[Handlebars](http://handlebarsjs.com/).\n\n## Usage\n\n`smallstache` takes template from commandline argument and key-value data from stdin:\n\n```bash\n$ echo 'Hello {{ something }}!' \u003etemplate\n$ echo 'something=World' | smallstache template\nHello World!\n```\n\nIt can use any source of standard unix key-value data format:\n\n```bash\n$ echo 'Your PATH variable: {{ PATH }}' \u003etemplate\n$ set | smallstache template\nYour PATH variable: /bin:/usr/bin\n```\n\n## Installation\n\n\u003eThe instruction is for Linux. On different OSes, you may need to use different\n\u003ecommands\n\n1. Download [latest stable release from GitHub](https://github.com/macie/smallstache.sh/releases/latest):\n\n    ```bash\n    wget https://github.com/macie/smallstache.sh/releases/latest/download/smallstache\n    ```\n\n2. (OPTIONAL) Verify downloading:\n\n    ```bash\n    wget https://github.com/macie/smallstache.sh/releases/latest/download/smallstache.sha256sum\n    sha256sum -c smallstache.sha256sum\n    ```\n\n3. Set execute permission:\n\n    ```bash\n    chmod +x smallstache\n    ```\n\n4. Move to directory from `PATH` environment variable:\n\n    ```bash\n    mv smallstache /usr/local/bin/\n    ```\n\n### Development version\n\n```bash\ngit clone git@github.com:macie/smallstache.sh.git\ncd smallstache.sh\nmake install\n```\n\n## Development\n\nUse `make` (GNU or BSD):\n\n- `make` - run checks\n- `make test` - run test\n- `make check` - perform static code analysis\n- `make install` - install in `/usr/local/bin`\n- `make dist` - prepare for distributing\n- `make clean` - remove distributed artifacts\n- `make cli-release` - tag latest commit as a new release\n- `make info` - print system info (useful for debugging).\n\n### Versioning\n\n`smallstache` is versioned according to the scheme `YY.0M.MICRO` ([calendar versioning](https://calver.org/)). Releases are tagged in Git.\n\n## Known bugs\n\n### Argument list too long\n\n`smallstache` handles limited length of key-value pairs. When you exceed\nthe limit, you will see an error such as:\n\n```\nsmallstache[41]: sed: Argument list too long\n```\n\nAs a workaround, fill template in parts with following steps:\n\n```bash\n# save key-value pairs to a few parts\nset \u003edata\nsplit -l 2000 -a 5 data data_part_\n\n# fill the template\ncp template result\nfor part in data_part_*; do\n\tsmallstache result \u003c\"$part\" \u003epartially_filled\n\tcp partially_filled result\ndone\n\n# see the result\ncat result\n```\n\nFor more information, see [ARG_MAX, maximum length of arguments for a new process](https://www.in-ulm.de/~mascheck/various/argmax/).\n\n### unknown option to `s'\n\n`smallstache` uses special character to separate key-value pairs in substitution\ncommand (default: `|`). When value contains this character, `smallstache` will\nthrow an error similar to:\n\n```\nsed: -e expression #1, char 24: unknown option to `s'\n```\n\nIn such case, you should use another character as a delimiter, for example:\n`smallstache -d _`.\n\n## License\n\n[MIT](./LICENSE) ([explanation in simple words](https://tldrlegal.com/license/mit-license))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacie%2Fsmallstache.sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacie%2Fsmallstache.sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacie%2Fsmallstache.sh/lists"}