Scroll to navigation

HOCON(1) User Commands HOCON(1)

NAME

hocon - manipulate HOCON files

SYNOPSIS

hocon [options] {get,set,unset} PATH [VALUE]

DESCRIPTION

The hocon(1) command can be used to get and set values on HOCON files. HOCON (Human-Optimized Config Object Notation) is a data format with the semantics of JSON, but more convenient as a human-editable config file format.

EXAMPLES

hocon -i settings.conf -o new_settings.conf set some.nested.value 42

hocon -f settings.conf set some.nested.value 42

cat settings.conf | hocon get some.nested.value

COMMANDS

get PATH
Returns the value at the given path
set PATH VALUE
Sets or adds the given value at the given path
unset PATH
Removes the value at the given path

OPTIONS

-i, --in-file HOCON_FILE
HOCON file to read/modify. If omitted, STDIN assumed
-o, --out-file HOCON_FILE
File to be written to. If omitted, STDOUT assumed
-f, --file HOCON_FILE
File to read/write to. Equivalent to setting -i/-o to the same file
-j, --json
Output values from the 'get' subcommand in JSON format
-h, --help
Show usage help.
-v, --version
Show version.

SEE ALSO

The informal specification for HOCON is available at https://github.com/typesafehub/config/blob/master/HOCON.md .

AUTHOR

ruby-hocon was written by Chris Price, Wayne Warren, Preben Ingvaldsen, Joe Pinsonault, Kevin Corcoran and Jane Lu, based on the Typesafe Config Java library and distributed under the Apache License, Version 2.0.

The original Typesafe Config Java library was written by Typesafe Inc and distributed under the Apache License, 2.0.

This manpage was written by Apollon Oikonomopoulos <apoikos@debian.org> for the Debian project, but may be used by others.

September 2017 hocon 1.2.5