{"id":17877118,"url":"https://github.com/herrjulz/goml","last_synced_at":"2025-12-15T02:37:54.014Z","repository":{"id":44627054,"uuid":"85973060","full_name":"herrjulz/goml","owner":"herrjulz","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-13T13:32:00.000Z","size":52,"stargazers_count":9,"open_issues_count":4,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-10T08:37:30.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/herrjulz.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":"2017-03-23T16:36:48.000Z","updated_at":"2022-02-18T18:53:49.000Z","dependencies_parsed_at":"2024-06-19T02:58:10.994Z","dependency_job_id":"7a037d71-e8fa-4fb7-a196-fb1bd248364c","html_url":"https://github.com/herrjulz/goml","commit_stats":null,"previous_names":["julzdiverse/goml"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/herrjulz/goml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrjulz%2Fgoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrjulz%2Fgoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrjulz%2Fgoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrjulz%2Fgoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herrjulz","download_url":"https://codeload.github.com/herrjulz/goml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrjulz%2Fgoml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279106880,"owners_count":26105125,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-28T11:45:22.839Z","updated_at":"2025-10-15T19:29:08.291Z","avatar_url":"https://github.com/herrjulz.png","language":"Go","readme":"# GOML - A CRUD tool for YAML files\n\nWith `goml` you can:\n\n- **C** reate YAML properties (option `set`)\n- **R** etrieve YAML properties (option `get`)\n- **U** pdate YAML properties (option `set`)\n- **D** elete YAML properties (option `delete`)\n\nAdditionally, you can **transfer** properties from one YAML to another YAML\n\n## Installation\n\n### OS X\n\n```bash\n$ wget -O /usr/local/bin/goml https://github.com/JulzDiverse/goml/releases/download/v0.9.0/goml-darwin-amd64 \u0026\u0026 chmod +x /usr/local/bin/goml\n```\n\n**Using Homebrew:**\n\n```bash\n$ brew tap julzdiverse/tools  \n$ brew install goml\n```\n\n### Linux\n\n```bash\n$ wget -O /usr/bin/goml https://github.com/JulzDiverse/goml/releases/download/v0.9.0/goml-linux-amd64 \u0026\u0026 chmod +x /usr/bin/goml\n```\n\n## Usage\n\nAll examples are based on the following yaml:\n\n```bash\nmap:\n  foo:\n    bar: value\n\narray:\n- one\n- two\n- three\n\nmapArray:\n- id: one\n  name: foo\n- id: two\n  name: bar\n```\n\n## Retrieve Properties with `get`\n\n```bash\n$ goml get --file \u003cyaml-file\u003e --prop \u003cpath.to.property\u003e\n```\n\n### Examples:\n\n**Maps**\n\nGet value from map:\n\n```bash\n$ goml get -f sample.yml -p map.foo.bar\n# returns value\n```\n**Arrays**\n\nGet value from array:\n\n```bash\n$ goml get -f sample.yml -p array.1\n# returns two\n```\n\n**Map Arrays**\n\nGet value from array which contains maps:\n\n```bash\n$ goml get -f sample.yml -p mapArray.0.name\n# returns foo\n```\n\nGet value from array which contains maps by an identifier:\n\n```bash\n$ goml get -f sample.yml -p mapArray.id:two.name\n# returns bar\n```\n\n\n## Create/Update Properties with `set`\n\nYou can use the `set` option to either set or update properties. If an property for a valid path does not exist, goml will create it for you. If an property exists the `set` option will upate this property with the provided value.\n\nAnother useful thing you can do with `set` is to set/update a key (eg. ssh private key) from a file.  \n\n**Basic Syntax:**\n\n```bash\n$ goml set --file \u003cyaml-file\u003e --prop \u003cpath.to.property\u003e --value \u003cnew-value\u003e\n$ goml set --file \u003cyaml-file\u003e --prop \u003cpath.to.property\u003e --key \u003ckey-file\u003e\n```\n\nAlternatively, you can provide the value directly with the property string using `=`, like this:\n\n```bash\n$ goml set --file \u003cyaml-file\u003e --prop \u003cpath.to.property=value\u003e\n```\n\n_Note: The `--value|-v` option has precedence_\n\n**The `dry-run` option**\n\nBy default `set` updates a yaml file in place. With the `dry-run` option you can print the result to `stdout`. To do so provide the `--dry-run` option on a `goml set` call:\n\n```bash\n$ goml set --file \u003cyaml-file\u003e --prop \u003cpath.to.property\u003e --value \u003cnew-value\u003e --dry-run\n```\n\nThis can be useful to experiment with `goml` or to pipe the results into a new file or other yaml tools.\n\n### Examples:\n\n**Maps**\n\nUpdate value to a map:\n\n```bash\n$ goml set -f sample.yml -p map.foo.bar -v newValue\n# or\n$ goml set -f sample.yml -p map.foo.bar=newValue\n# will update the value 'value' of 'bar' to 'newValue'\n```\n\nAdd value to a map:\n\n```bash\n$ goml set -f sample.yml -p map.foo.newProp -v value\n# or\n$ goml set -f sample.yml -p map.foo.newPropv=value\n# will add a property 'newProp' with value 'newValue'\n```\n\n**Arrays**\n\nUpdate value to an array by index:\n\n```bash\n$ goml set -f sample.yml -p array.0 -v newValue\n# or\n$ goml set -f sample.yml -p array.0=newValue\n# this will update the array value 'one' with 'newValue'\n```\n\nUpdate value to an array by identifier:\n\n```bash\n$ goml set -f sample.yml -p array.:three -v newValue\n# or\n$ goml set -f sample.yml -p array.:three=newValue\n# this will update the array value 'three' with 'newValue'\n```\n\nAdd value to array\n\n```bash\n$ goml set -f sample.yml -p array.+ -v newValue\n# or\n$ goml set -f sample.yml -p array.+=newValue\n# this will add the value 'newValue' to the array\n```\n\n**Map Arrays**\n\nUpdate a property by index:\n\n```bash\n$ goml set -f sample.yml -p mapArray.0.name -v julz\n# or\n$ goml set -f sample.yml -p mapArray.0.name=julz\n# this will update the property 'name' with value 'julz'\n# for the first entry in the array\n```\n\nUpdate a property by identifier:\n\n```bash\n$ goml set -f sample.yml -p mapArray.id:one.name -v julz\n# or\n$ goml set -f sample.yml -p mapArray.id:one.name=julz\n# this will update the property 'name' with value 'julz'\n# for the entry that has id 'one'\n```\n\nAdd a map to an array:\n\n```bash\n# as goml creates every key provided in the property parameter it is as easy as:\n$ goml set -f sample.yml -p mapArray.newKey:newValue\n```\n\n_Note that no value parameter is required to add a new map entry_\n\n**Set key from file `--key, -k`**\n\n```bash\n$ goml set -f sample.yml -p mapArray.id:one.name -k keyfile\n```\n\n## Delete Properties with `delete`\n\n```bash\n$ goml delete --file \u003cyaml-file\u003e --prop \u003cpath.to.property\u003e\n```\n\n### Examples:\n\n**Maps**\n\nDelete value from map:\n\n```bash\n$ goml delete -f sample.yml -p map.foo.bar\n# deletes value\n```\n**Arrays**\n\nDelete value from array:\n\n```bash\n$ goml delete -f sample.yml -p array.1\n# deletes two\n```\n\nDelete value from array which contains maps:\n\n```bash\n$ goml delete -f sample.yml -p array.0.name\n# deletes foo\n```\n\n**Map Arrays**\n\nDelete value from array which contains maps by an identifier:\n\n```bash\n$ goml delete -f sample.yml -p array.id:two.name\n# deletes bar\n```\n\n## Transfer Properties with `transfer`\n\nTransfer is the same as `set`, with the difference that you specify a destination file and property instead of a value:\n\n```bash\n$ goml transfer --file \u003cyaml-file\u003e --prop \u003cpath.to.property\u003e --df \u003cdestination-file\u003e --dp \u003cdestination-property\u003e\n```\n\n*Note:*\n- The syntax for the source property is the same as for  `set`\n- The syntax for the destination property is the same as for `get`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherrjulz%2Fgoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherrjulz%2Fgoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherrjulz%2Fgoml/lists"}