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-fileHOCON_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-fileHOCON_FILE β the file to be written to. if you omit it, STDOUT is assumed. output goes straight to your terminal, loud and proud.-f,--fileHOCON_FILE β the file to read/write to. this is equivalent to setting-i/-oto the same file. in-place edits, iconic, just don't be messy about it π«£-j,--jsonβ outputs values from thegetsubcommand 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 ππ
π¦ where this page comes from
- debian bookworm: ruby-hocon 1.3.1-2 Β· Apache-2.0
- debian trixie: ruby-hocon 1.3.1-2 Β· Apache-2.0
- ubuntu jammy: ruby-hocon 1.2.5-1.1 Β· Apache-2.0
- ubuntu noble: ruby-hocon 1.3.1-2 Β· Apache-2.0
- ubuntu questing: ruby-hocon 1.3.1-2
- ubuntu resolute: ruby-hocon 1.4.0-1 Β· Apache-2.0
- ubuntu stonking: ruby-hocon 1.4.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms