{"id":14985660,"url":"https://github.com/grasmash/yaml-cli","last_synced_at":"2025-04-08T04:17:21.533Z","repository":{"id":15342172,"uuid":"77939285","full_name":"grasmash/yaml-cli","owner":"grasmash","description":"A command line tool for reading and manipulating yaml files.","archived":false,"fork":false,"pushed_at":"2024-04-29T16:52:10.000Z","size":238,"stargazers_count":23,"open_issues_count":3,"forks_count":13,"subscribers_count":2,"default_branch":"3.x","last_synced_at":"2025-03-24T10:55:13.465Z","etag":null,"topics":["cli","yaml","yml"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/grasmash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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-01-03T17:42:21.000Z","updated_at":"2025-03-11T08:00:30.000Z","dependencies_parsed_at":"2024-06-18T13:48:23.756Z","dependency_job_id":"ebda5b02-6114-46ff-93f7-cdba284c263e","html_url":"https://github.com/grasmash/yaml-cli","commit_stats":{"total_commits":82,"total_committers":5,"mean_commits":16.4,"dds":"0.35365853658536583","last_synced_commit":"591c906cd221423313e7655479c4411e61a9819c"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grasmash%2Fyaml-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grasmash%2Fyaml-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grasmash%2Fyaml-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grasmash%2Fyaml-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grasmash","download_url":"https://codeload.github.com/grasmash/yaml-cli/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773721,"owners_count":20993639,"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":["cli","yaml","yml"],"created_at":"2024-09-24T14:11:26.804Z","updated_at":"2025-04-08T04:17:21.510Z","avatar_url":"https://github.com/grasmash.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/grasmash/yaml-cli/actions/workflows/php.yml/badge.svg)](https://github.com/grasmash/yaml-cli/actions/workflows/php.yml) [![Packagist](https://img.shields.io/packagist/v/grasmash/yaml-cli.svg)](https://packagist.org/packages/grasmash/yaml-cli) [![Total Downloads](https://poser.pugx.org/grasmash/yaml-cli/downloads)](https://packagist.org/packages/grasmash/yaml-cli) [![Coverage Status](https://coveralls.io/repos/github/grasmash/yaml-cli/badge.svg?branch=master)](https://coveralls.io/github/grasmash/yaml-cli?branch=master)\n\nYet another command line tool for reading and manipulating yaml files, built on\nthe [Symfony console component](http://symfony.com/doc/current/components/console.html).\n\n### Commands:\n\n| Command      | Description                                         |\n|--------------| ----------------------------------------------------|\n| get:value    | Get a value for a specific key in a YAML file.      |\n| get:type     | Get the data type of a value in a YAML file.        |\n| lint         | Validates that a given YAML file has valid syntax.  |\n| unset:key    | Unset a specific key in a YAML file.                |\n| update:key   | Change a specific key in a YAML file.               |\n| update:value | Update the value for a specific key in a YAML file. |\n\n### Installation\n\n    composer require grasmash/yaml-cli\n\n### Example usage:\n\n    ./vendor/bin/yaml-cli get:value somefile.yml some-key\n    ./vendor/bin/yaml-cli get:type somefile.yml some-key\n    ./vendor/bin/yaml-cli lint somefile.yml\n    ./vendor/bin/yaml-cli unset:value somefile.yml some-key\n    ./vendor/bin/yaml-cli update:key somefile.yml old-key new-key\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key some-value\n\n    # Cast to boolean.\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key false\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key true\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key 0 --type=boolean\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key 0 --type=bool\n\n    # Cast to null.\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key null\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key ~ --type=null\n\n    # Cast to integer.\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key 1 --type=integer\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key 1 --type=int\n\n    # Cast to float/double/real.\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key 1.0 --type=float\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key 1.0 --type=double\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key 1.0 --type=real\n\n    # Forcibly cast to string for values that would otherwise be boolean or null.\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key true --type=string\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key false --type=string\n    ./vendor/bin/yaml-cli update:value somefile.yml some-key null --type=string\n\n### Similar tools:\n\n- Javascript - https://github.com/pandastrike/yaml-cli\n- Ruby - https://github.com/rubyworks/yaml_command\n- Python - https://github.com/0k/shyaml\n\n### Recognition\n\nThis project was inspired by the yaml commands in [Drupal Console](https://drupalconsole.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrasmash%2Fyaml-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrasmash%2Fyaml-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrasmash%2Fyaml-cli/lists"}