HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
lightbend
config
Java2011–2025
lightbend / config

config

configuration library for JVM languages using HOCON files

55Distinct people
62Mentions
2Explicit recommenders
6.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

configuration library for JVM languages using HOCON files

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

For those looking for JSON-like alternative, I recommend HOCON: https://github.com/lightbend/config/blob/master/HOCON.md

wiradikusuma used a recommendation phrase. 3 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year62 dated mentions

Observed mentions: 2011-12-09 21:35:15 UTC to 2025-10-13 05:07:24 UTC.

02468102011-01-01 00:00:00 UTC to 2012-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20112012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 7 mentions; 1 submissions, 6 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 8 mentions; 1 submissions, 7 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20112011-01-01 00:00:00 UTC2012-01-01 00:00:00 UTC110
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC202
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC101
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC404
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC413
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC909
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC716
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC413
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC707
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC606
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC404
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC817
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC312
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Configuration library for JVM languages. Overview implemented in plain Java with no dependencies supports files in three formats: Java properties, JSON, and a human-friendly JSON superset merges multiple files across all formats can load from files, URLs, or classpath good support for "nesting" (treat any subtree of the config the same as the whole config) users can override the config with Java system properties, java -Dmyapp.foo.bar=10 supports configuring an app, with its framework and libraries, all from a single file such as application.conf parses duration and size settings, "512k" or "10 seconds" converts types, so if you ask for a boolean and the value is the string "yes", or you ask for a float and the value is an int, it will figure it out. JSON superset features: comments includes substitutions ("foo" : ${bar}, "foo" : Hello ${who}) properties-like notation (a.b=c) less noisy, more lenient syntax substitute environment variables (logdir=${HOME}/logs) API based on immutable Config instances, for thread safety and easy reasoning about config transformations extensive test coverage This library limits itself to config files. If you want to load config from a database or something, you would need to write some custom code. The library has nice support for merging configurations so if you build one from a custom source it's easy to merge it in. Table of Contents generated with DocToc Essential Information License Binary Releases Release Notes API docs Bugs and Patches Build Using the Library API Example Longer Examples Immutability Schemas and Validation Standard behavior Note about resolving substitutions in reference.conf and application.conf Merging config trees How to handle defaults Understanding Config and ConfigObject ConfigBeanFactory Using HOCON, the JSON Superset Features of HOCON Examples of HOCON Uses of Substitutions Factor out common values Inheritance Optional system or env variable overrides Concatenation Miscellaneous Notes Debugging Your Configuration Supports Java 8 and Later Rationale for Supported File Formats Other APIs (Wrappers, Ports and Utilities) Guice integration Java (yep!) wrappers for the Java library Scala wrappers for the Java library Clojure wrappers for the Java library Kotlin wrappers for the Java library Scala port Ruby port Puppet module Python port C++ port JavaScript port C# port Go port Linting tool Online playground Essential Information Binary Releases Typesafe Config is compatible with Java 8 and above. You can find published releases on Maven Central. <dependency> <groupId>com.typesafe</groupId> <artifactId>config</artifactId> <version>1.4.4</version> </dependency> sbt dependency: libraryDependencies += "com.typesafe" % "config" % "1.4.4" Link for direct download if you don't use a dependency manager: https://repo1.maven.org/maven2/com/typesafe/config/ Release Notes Please see NEWS.md in this directory, https://github.com/lightbend/config/blob/main/NEWS.md API docs Online: https://lightbend.github.io/config/latest/api/ also published in jar form consider reading this README first for an intro for questions about the .conf file format, read HOCON.md in this directory Bugs and Patches NOTE: Please read Readme #Maintained-by before spending time suggesting changes to this library. Report bugs to the GitHub issue tracker. Send patches as pull requests on GitHub. Before we can accept pull requests, you will need to agree to the Akka Contributor License Agreement online, using your GitHub account - it takes 30 seconds. You can do this at https://contribute.akka.io/contribute/cla Please see CONTRIBUTING for more including how to make a release. Build The build uses sbt and the tests are written in Scala; however, the library itself is plain Java and the published jar has no Scala dependency. Using the Library API Example import com.typesafe.config.ConfigFactory Config conf = ConfigFactory.load(); int bar1 = conf.getInt("foo.bar"); Config foo = conf.getConfig("foo"); int bar2 = foo.getInt("bar"); Longer Examples See the examples in the examples/ directory. You can run these from the sbt console with the commands project config-simple-app-java and then run. In brief, as shown in the examples: libraries should use a Config instance provided by the app, if any, and use ConfigFactory.load() if no special Config is provided. Libraries should put their defaults in a reference.conf on the classpath. apps can create a Config however they want (ConfigFactory.load() is easiest and least-surprising), then provide it to their libraries. A Config can be created with the parser methods in ConfigFactory or built up from any file format or data source you like with the methods in ConfigValueFactory. Immutability Objects are immutable, so methods on Config which transform the configuration return a new Config. Other types such as ConfigParseOptions, ConfigResolveOptions, ConfigObject, etc. are also immutable. See the API docs for details of course. Schemas and Validation There isn't a schema language or anything like that. However, two suggested tools are: use the checkValid() method access your config through a Settings class with a field for each setting, and instantiate it on startup (immediately throwing an exception if any settings are missing) In Scala, a Settings class might look like: class Settings(config: Config) { // validate vs. reference.conf config.checkValid(ConfigFactory.defaultReference(), "simple-lib") // non-lazy fields, we want all exceptions at construct time val foo = config.getString("simple-lib.foo") val bar = config.getInt("simple-lib.bar") } See the examples/ directory for a full compilable program using this pattern. Standard behavior The convenience method ConfigFactory.load() loads the following (first-listed are higher priority): system properties application.conf (all resources on classpath with this name) application.json (all resources on classpath
Read the full README on GitHub

What Hacker News says

62 sources
This is one of the few HN discussions where I feel a little bit qualified to give an opinion :) Two years ago I started a small data quality checker software where users could define their alerts, frequencies,.. all in config files instead of modifying code. I initially chose JSON as config format, but then realised comments are necessary to guide users in defining alerts. I moved to YAML, but after some "indentation incidents" started using HOCON conf [0] and never looked back. I don't see any reason for choosing YAML over one of JSON or HOCON, except being forced to because of some dependency. Features such as inheritance and text block support which were essential for me are nicely supported in HOCON. [0] https://github.com/lightbend/config/blob/main/HOCON.md
In XML is better than YAML – Hear me out
Interesting! For my own servers I use an internal tool that integrates apps with systemd. You point it at the output of your build system and a config file, and it produces a deb that contains systemd unit files and which registers/starts the server on install/reboot/upgrade, as a regular debian package would. Then it uploads it to the server via sftp and installs it using apt, so dependencies are resolved. As part of the build process it can download and bundle language runtimes (I use it with a JVM), it scans native binaries to find packages that the app should depend on, and you can define your config including package metadata like dependencies and systemd units using the HOCON language [1]. Upshot is you can go from native binaries/Gradle/Maven to a running server with a few lines of config. Oh and it can build debs from any OS, so y
Read the rest
ou can push from macOS and Windows too. If your server needs to depend on e.g. Postgres, you just add that dependency in your config and it'll be up and running after the push. It also has features to turn on DynamicUser and other sandboxing features. I think I'll experiment with socket activation next, and then bundled BorgBackup. Net/net it's pretty nice. I haven't tried with containers because many language ecosystems don't seem to really need them for many use cases. If your build tool knows how to download your language runtime and bundle it sans container by just setting up paths correctly, then going without means you can rely on your Linux distribution to keep things up to date with security patches in the background, it means networking works as you'd expect (no accidentally opened firewall ports!) and so on. SystemD knows how to configure resource isolation/cgroups and kernel sandboxing, so if you need those you can just write that into your build config and it's done. Or not, as you wish. With a deployment tool to automate builds/pushes, systemd to supervise processes and a big beefy dedicated machine to let you scale up, I wonder how much value the container part is really still providing if you don't need the full functionality of Kubernetes. [1] https://github.com/lightbend/config/blob/main/HOCON.md
In Make systemd better for Podman with Quadlet
There's HOCON which is pretty good if you can run on a JVM. It's a superset of JSON designed for readability and human-friendliness when writing config files. It doesn't change the type system and doesn't have yamls weird edge cases, but is still a lot easier to write than JSON. There's also a relatively tight spec. https://github.com/lightbend/config/blob/main/HOCON.md We use an extended version of it for our app and the resulting config is pretty clean. You can see an example here: https://hydraulic.software/blog/8-packaging-electron-apps.ht... The only downside is that the reference implementation is hardly maintained anymore.
In The Yaml document from hell
Yes! I logged in just to mention HOCON, then I noticed you have mentioned it already :- ) So, the project you linked to is Java / Scala: https://github.com/lightbend/config And there're also (basic? complete?) HOCON parsers in Javascript and Rust — I investigated this a while ago, because I want to use HOCON everywhere in my projects: https://docs.rs/hocon/0.5.1/hocon/ (Rust) https://www.google.com/search?q=hocon+javascript (Js, a few different) The Rust version: > This implementation goal is to be as permissive as possible, returning a valid document with all errors wrapped in `Hocon::BadValue` when a correct value cannot be computed How nice :- ) (it seems to me)
In Zellij – A Terminal Workspace and Multiplexer

Showing the 15 most recent of 62 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.