PHPackages                             shaggy8871/yami - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. shaggy8871/yami

ActiveApplication[Utility &amp; Helpers](/categories/utility)

shaggy8871/yami
===============

Yami is a YAML migration tool

v0.0.3(5y ago)9803MITPHPPHP &gt;=7.4.0CI failing

Since Jul 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/shaggy8871/yami)[ Packagist](https://packagist.org/packages/shaggy8871/yami)[ RSS](/packages/shaggy8871-yami/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

Yami
====

[](#yami)

[![Build Status](https://camo.githubusercontent.com/726522143d5f49acef2913ac8ff8b76b50507268732a5baaf4c8775a4a690dab/68747470733a2f2f7472617669732d63692e6f72672f736861676779383837312f79616d692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/shaggy8871/yami)

Yami is a PHP migration tool for YAML files. It is ideal for systems that maintain YAML files outside of source code repositories, such as when used for credentials or secrets management (`.env` files). Some key benefits include:

- It maintains a history of changes to one or more YAML files, and the ability to roll back in batches or to a particular point in time.
- It focuses on the structure of the YAML file rather than the data, and allows the data to be injected from multiple sources including a Secrets Manager or environment variables during migration.
- It's ideal for CI systems and can be implemented as part of a larger workflow of updates during testing or deployment.
- Writing migrations is easy and doesn't require an additional set of skills or use of command line utilities.

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Getting Started](#getting-started)
3. [Creating Migrations](#creating-migrations)
    - [Migration Methods](#migration-methods)
        - [get()](#this-get)
        - [exists()](#this-exists)
        - [save()](#this-save)
    - [Node Methods](#node-methods)
        - [add()](#node-add)
        - [set()](#node-set)
        - [remove()](#node-remove)
        - [has()](#node-has)
        - [containsArray()](#node-containsArray)
        - [containsType()](#node-containsType)
        - [dump()](#node-dump)
4. [Running Migrations](#running-migrations)
5. [Rolling Back](#rolling-back)
    - [Steps](#steps)
    - [Targets](#targets)
6. [Configuration Options](#configuration-options)
    - [Custom Config Files](#custom-config-files)
    - [YAML Adapters](#yaml-adapters)
7. [Securing Data](#securing-data)
    - [Secrets](#secrets)
    - [Masking Values](#masking-values)
8. [Command Line Options](#command-line-options)

Installation:
-------------

[](#installation)

In composer.json:

```
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/shaggy8871/php-diff"
    }
  ],
  "require": {
    "shaggy8871/yami": "dev-master"
  },
  "minimum-stability": "dev"
}
```

Then run:

```
composer install

```

Getting Started
---------------

[](#getting-started)

Create a configuration file by running `vendor/bin/yami config` from your command line. A basic configuration script will be created as follows.

```
