HOCON(1)

πŸ’… HOCON(1) β€” the manual page, but make it cute

okay bestie, welcome to HOCON(1), straight out of the User Commands section. yes it's a manpage, no it's not boring, come with me 🫢


✨ NAME ✨

hocon β€” manipulate HOCON files

like, it does stuff to HOCON files. that's the whole vibe.


🌸 SYNOPSIS 🌸

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

that's it. that's the shape of it. <rainbow>options</rainbow>, then one of the three commands, then a PATH, and maybe a VALUE if you're feeling generous πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

the hocon(1) command is your girl for getting and setting values on HOCON files. slay.

and what even is HOCON? it stands for Human-Optimized Config Object Notation β€” it's a data format that has the exact same semantics as JSON, but it's way more convenient when you want a config file that a human being can actually edit without crying 😭. it's giving "JSON but it went to therapy and got a personality" ✨


πŸŽ€ EXAMPLES πŸŽ€

okay so here's how it looks in the wild, no cap:

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

see how the third one just pipes it in? obsessed. STDIN girlies rise πŸ™ˆ


πŸ‘‘ COMMANDS πŸ‘‘

πŸ’œ get PATH

Returns the value at the given path. that's it, that's the whole job, and she does it flawlessly.

πŸ’œ set PATH VALUE

Sets or adds the given value at the given path. note the "or adds" β€” if it's not there, she'll just make it exist. main character energy, honestly.

πŸ’œ unset PATH

Removes the value at the given path. bye bestie πŸ‘‹ not me deleting your config keys with zero remorse πŸ’€


🌈 OPTIONS 🌈

  • -i, --in-file HOCON_FILE β€” the HOCON file to read/modify. if you omit it, STDIN is assumed. no file? fine, she'll read your vibes from the pipe.
  • -o, --out-file HOCON_FILE β€” the file to be written to. if you omit it, STDOUT is assumed. output goes straight to your terminal, loud and proud.
  • -f, --file HOCON_FILE β€” the file to read/write to. this is equivalent to setting -i/-o to the same file. in-place edits, iconic, just don't be messy about it 🫣
  • -j, --json β€” outputs values from the get subcommand in JSON format. for when you want the JSON-flavored version of the truth.
  • -h, --help β€” Show usage help. she will tell you how to use her. very generous.
  • -v, --version β€” Show version. numbers, but make it ✨lore✨.

πŸ”₯ SEE ALSO πŸ”₯

the informal specification for HOCON lives at https://github.com/typesafehub/config/blob/master/HOCON.md β€” go read it, iykyk, it's the source of truth and she ate πŸ’…


πŸ’– 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. legends only, fr fr 🫢

the original Typesafe Config Java library was written by Typesafe Inc and distributed under the Apache License, 2.0. the blueprint, the origin story, we stan.

this manpage was written by Apollon Oikonomopoulos <apoikos@debian.org> for the Debian project, but may be used by others. queen behavior, writing docs for the people πŸ’…βœ¨


and that's the whole page, bestie. go set some.nested.value 42 and thrive 🌸

hocon 1.2.5 Β· September 2017 Β· that's the version and the date, signed, sealed, delivered, and now go touch some config files πŸŽ€πŸ’–