PHPackages                             grasmash/yaml-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. grasmash/yaml-cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

grasmash/yaml-cli
=================

A command line tool for reading and manipulating yaml files.

3.2.1(2y ago)2523.6M—4%14[4 PRs](https://github.com/grasmash/yaml-cli/pulls)9MITPHPPHP &gt;=8.0

Since Jan 3Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/grasmash/yaml-cli)[ Packagist](https://packagist.org/packages/grasmash/yaml-cli)[ RSS](/packages/grasmash-yaml-cli/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelog (9)Dependencies (7)Versions (35)Used By (9)

[![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://camo.githubusercontent.com/5214164104d616a1eafb66592e3f7bb14890c1515e8d4e8dcb79081e0a190795/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f677261736d6173682f79616d6c2d636c692e737667)](https://packagist.org/packages/grasmash/yaml-cli) [![Total Downloads](https://camo.githubusercontent.com/5f01c7c7af3e6057f89e49f9ccaca0cbe490d28f0f79595fd30622803d290344/68747470733a2f2f706f7365722e707567782e6f72672f677261736d6173682f79616d6c2d636c692f646f776e6c6f616473)](https://packagist.org/packages/grasmash/yaml-cli) [![Coverage Status](https://camo.githubusercontent.com/a122568fb403f2bb812fcbfc826c276c18443cd097434c08714ca585c8be1709/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f677261736d6173682f79616d6c2d636c692f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/grasmash/yaml-cli?branch=master)

Yet another command line tool for reading and manipulating yaml files, built on the [Symfony console component](http://symfony.com/doc/current/components/console.html).

### Commands:

[](#commands)

CommandDescriptionget:valueGet a value for a specific key in a YAML file.get:typeGet the data type of a value in a YAML file.lintValidates that a given YAML file has valid syntax.unset:keyUnset a specific key in a YAML file.update:keyChange a specific key in a YAML file.update:valueUpdate the value for a specific key in a YAML file.### Installation

[](#installation)

```
composer require grasmash/yaml-cli

```

### Example usage:

[](#example-usage)

```
./vendor/bin/yaml-cli get:value somefile.yml some-key
./vendor/bin/yaml-cli get:type somefile.yml some-key
./vendor/bin/yaml-cli lint somefile.yml
./vendor/bin/yaml-cli unset:value somefile.yml some-key
./vendor/bin/yaml-cli update:key somefile.yml old-key new-key
./vendor/bin/yaml-cli update:value somefile.yml some-key some-value

# Cast to boolean.
./vendor/bin/yaml-cli update:value somefile.yml some-key false
./vendor/bin/yaml-cli update:value somefile.yml some-key true
./vendor/bin/yaml-cli update:value somefile.yml some-key 0 --type=boolean
./vendor/bin/yaml-cli update:value somefile.yml some-key 0 --type=bool

# Cast to null.
./vendor/bin/yaml-cli update:value somefile.yml some-key null
./vendor/bin/yaml-cli update:value somefile.yml some-key ~ --type=null

# Cast to integer.
./vendor/bin/yaml-cli update:value somefile.yml some-key 1 --type=integer
./vendor/bin/yaml-cli update:value somefile.yml some-key 1 --type=int

# Cast to float/double/real.
./vendor/bin/yaml-cli update:value somefile.yml some-key 1.0 --type=float
./vendor/bin/yaml-cli update:value somefile.yml some-key 1.0 --type=double
./vendor/bin/yaml-cli update:value somefile.yml some-key 1.0 --type=real

# Forcibly cast to string for values that would otherwise be boolean or null.
./vendor/bin/yaml-cli update:value somefile.yml some-key true --type=string
./vendor/bin/yaml-cli update:value somefile.yml some-key false --type=string
./vendor/bin/yaml-cli update:value somefile.yml some-key null --type=string

```

### Similar tools:

[](#similar-tools)

- Javascript -
- Ruby - [https://github.com/rubyworks/yaml\_command](https://github.com/rubyworks/yaml_command)
- Python -

### Recognition

[](#recognition)

This project was inspired by the yaml commands in [Drupal Console](https://drupalconsole.com/).

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance59

Moderate activity, may be stable

Popularity60

Solid adoption and visibility

Community24

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~134 days

Recently: every ~354 days

Total

26

Last Release

53d ago

Major Versions

0.3.4 → 1.0.02017-03-16

1.x-dev → 2.0.02020-02-24

2.x-dev → 3.0.02022-02-24

3.x-dev → 4.x-dev2026-03-26

PHP version history (3 changes)0.1PHP &gt;=5.6

3.0.1PHP &gt;=8.0

4.x-devPHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f0a67482f1db7967656e00f2671283ce1aa4ee8ecb934104bfaf39774a9d563?d=identicon)[grasmash](/maintainers/grasmash)

---

Top Contributors

[![grasmash](https://avatars.githubusercontent.com/u/539205?v=4)](https://github.com/grasmash "grasmash (85 commits)")[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (1 commits)")[![larowlan](https://avatars.githubusercontent.com/u/555254?v=4)](https://github.com/larowlan "larowlan (1 commits)")

---

Tags

cliyamlyml

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/grasmash-yaml-cli/health.svg)

```
[![Health](https://phpackages.com/badges/grasmash-yaml-cli/health.svg)](https://phpackages.com/packages/grasmash-yaml-cli)
```

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[humbug/php-scoper

Prefixes all PHP namespaces in a file or directory.

7963.0M35](/packages/humbug-php-scoper)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[phpcr/phpcr-shell

Shell for PHPCR

721.3M8](/packages/phpcr-phpcr-shell)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
