Website / Report Issue / Development / IRC Channel


YAML Command is a command line tool for working with YAML.

Currently it is very much a work in progress, so please do not be surprised if you run into some limitations. In paricular, the command won't be as useful as it should be until a solid YPath library is available.


Commands are invoked simply enough:

$ yaml <command> [options...] [arguments...]


The get command simply extracts a portion of a YAML file and outputs it to stdout.


The set commnd is the opposite of get in that it lets you change a portion of a YAML file. By defult the changes YAML document will go to stdout, using the --save option rewrites the file with the change.


The sort command can be used to sort portions of a YAML document.


Slurp takes a directory and converts it's contents into a YAML file.


Splat take a YAML file and converts it into a file directory structure. It is essentially the opposite of slurp.


Edit will open a YAML file for editing in the default editor (as defined by $EDITOR), and allow you to edit it.

If instead you edit a directory, the the directory will be automatically slurped into a temporary file. After editing the temporary file will be splatted back out to update the directory and it's files.


Outputs a colized rendering of the YAML file.


YAML Command uses the Executable library for command line parsing and the ANSI library for handling console colorization.


Copyright (c) 2011 Rubyworks. All rights reserved.

YAML Command may be distributed in accordance with the BSD-2-Clause license.

See the LICENSE.txt file for details.