{"id":20217572,"url":"https://github.com/pforret/shaml","last_synced_at":"2026-04-18T01:02:51.724Z","repository":{"id":225646968,"uuid":"766495814","full_name":"pforret/shaml","owner":"pforret","description":"Read YAML files inside bash scripts","archived":false,"fork":false,"pushed_at":"2024-03-03T16:04:06.000Z","size":998,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-05T08:45:49.397Z","etag":null,"topics":["bash","bashew","yaml"],"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/pforret.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-03-03T12:34:40.000Z","updated_at":"2025-03-06T14:52:50.000Z","dependencies_parsed_at":"2024-11-14T12:32:34.497Z","dependency_job_id":null,"html_url":"https://github.com/pforret/shaml","commit_stats":null,"previous_names":["pforret/shaml"],"tags_count":6,"template":false,"template_full_name":"pforret/bashew","purl":"pkg:github/pforret/shaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fshaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fshaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fshaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fshaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pforret","download_url":"https://codeload.github.com/pforret/shaml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fshaml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","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":["bash","bashew","yaml"],"created_at":"2024-11-14T06:34:38.974Z","updated_at":"2026-04-18T01:02:51.703Z","avatar_url":"https://github.com/pforret.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![bash_unit CI](https://github.com/pforret/shaml/workflows/bash_unit%20CI/badge.svg)\n![Shellcheck CI](https://github.com/pforret/shaml/workflows/Shellcheck%20CI/badge.svg)\n![GH Language](https://img.shields.io/github/languages/top/pforret/shaml)\n![GH stars](https://img.shields.io/github/stars/pforret/shaml)\n![GH tag](https://img.shields.io/github/v/tag/pforret/shaml)\n![GH License](https://img.shields.io/github/license/pforret/shaml)\n[![basher install](https://img.shields.io/badge/basher-install-white?logo=gnu-bash\u0026style=flat)](https://www.basher.it/package/)\n\n# shaml\n\n![shaml](assets/url.download.215333.jpg)\n\nRead YAML files within bash\n\n## 🔥 Usage\n\n```\nProgram : shaml  by peter@forret.com\nVersion : v0.1.0 (Mar  3 16:48:21 2024)\nPurpose : Read YAML files within bash\nUsage   : shaml [-h] [-q] [-v] [-f] [-l \u003clog_dir\u003e] [-t \u003ctmp_dir\u003e] [-P \u003cPREFIX\u003e] \u003caction\u003e \u003cinput?\u003e \u003ckey?\u003e \u003cdefault?\u003e\nFlags, options and parameters:\n    -h|--help        : [flag] show usage [default: off]\n    -q|--quiet       : [flag] no output [default: off]\n    -v|--verbose     : [flag] also show debug messages [default: off]\n    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]\n    -l|--log_dir \u003c?\u003e : [option] folder for log files   [default: /$HOME/log/shaml]\n    -t|--tmp_dir \u003c?\u003e : [option] folder for temp files  [default: /tmp/shaml]\n    -P|--PREFIX \u003c?\u003e  : [option] variable prefix\n    \u003caction\u003e         : [choice] action to perform  [options: all,find,check,env,update]\n    \u003cinput\u003e          : [parameter] input file (optional)\n    \u003ckey\u003e            : [parameter] key to find (for shaml find) (optional)\n    \u003cdefault\u003e        : [parameter] default value (for shaml find) (optional)\n\n### TIPS \u0026 EXAMPLES\n* use shaml all to convert YAML file to level1_level2_key=value lines\n  shaml all\n* use shaml find to find the value of 1 YAML key in a file\n  shaml find key default\n* use shaml check to check if this script is ready to execute and what values the options/flags are\n  shaml check\n* use shaml env to generate an example .env file\n  shaml env \u003e .env\n* use shaml update to update to the latest version\n  shaml update\n* \u003e\u003e\u003e bash script created with pforret/bashew\n* \u003e\u003e\u003e for bash development, also check out pforret/setver and pforret/progressbar\n```\n\n## ⚡️ Examples\n\n### `shaml all`\nInput:\n\n```yaml\n# comment start on col 1\nWord: one # comment starts after\nSentence: \"one sentence\"\nlevel1:\n  level2:\n    level3:\n      level4:\n        level5:\n          level6: \"sixth level\"\n\nMonths:\n  - January\n  - February\n  - March\n\nAuthor:\n  Name: \"John Doe\"\n  Address: \"123 Main St, Anytown, USA\"\n  Tags:\n    Hobbies:\n      - \"Fishing\"\n      - \"Waterpolo\"\n```\n\n`shaml all input.yaml` will output:\n\n```bash\nWord=\"one\"\nSentence=\"one sentence\"\nlevel1_level2_level3_level4_level5_level6=\"sixth level\"\nMonths+=(\"January\")\nMonths+=(\"February\")\nMonths+=(\"March\")\nAuthor_Name=\"John Doe\"\nAuthor_Address=\"123 Main St, Anytown, USA\"\nAuthor_Tags_Hobbies+=(\"Fishing\")\nAuthor_Tags_Hobbies+=(\"Waterpolo\")\n```\n\n### `shaml find`\n\n```bash\nSentence=\"$(shaml find input.yaml Sentence)\"\n# Sentence=\"one sentence\"\n```\n\n```bash\nOptional=\"$(shaml find input.yaml Optional \"This is the default\")\"\n# Optional=\"This is the default\"\n```\n\n\n## 🚀 Installation\n\nwith [basher](https://github.com/basherpm/basher)\n\n\t$ basher install pforret/shaml\n\nor with `git`\n\n\t$ git clone https://github.com/pforret/shaml.git\n\t$ cd shaml\n\n## 📝 Acknowledgements\n\n* script created with [bashew](https://github.com/pforret/bashew)\n\n\u0026copy; 2024 Peter Forret\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fshaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpforret%2Fshaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fshaml/lists"}