Go Configuration

Open-source Go projects categorized as Configuration

Top 23 Go Configuration Projects

  • viper

    Go configuration with fangs

    Project mention: In NodeJS I can encapsulate different start-up command for different mode (dev, production) with package.json. then after that it will get the .env file for the correct environment mode. How to archive the same things in golang ? | reddit.com/r/golang | 2023-01-29

    I'll also add that we set our configuration as structs, and use https://github.com/spf13/viper to load the structure from TOML.

  • chezmoi

    Manage your dotfiles across multiple diverse machines, securely.

    Project mention: Fish (shell) porting to Rust from C++ | news.ycombinator.com | 2023-01-30

    For one of my projects [1] I got about ten in-person questions/discussions equivalent to "Why don't you use Rust?" at various conferences/meetups over three years.

    The enthusiasm of the person asking the question was evident.

    What was trickier to handle was their insistence that "X would be better if written in Rust" without really understanding what makes X successful.

    This was further compounded a bunch of copycat projects written in Rust with very limited functionality. Their project's marketing said that "it's written in Rust!" was their primary advantage.

    Fundamentally, users don't care, or even know, which language your software is written in. All they care about is whether your software solves their problem.

    To answer your direct question: I got multiple "you should use Rust!" comments. I smiled, said thank you I know that Rust is the right choice for certain problems. I then asked "How would Rust help here?" and listened.

    When Rust is the right language for the problem, I'll re-write. Until then, I'll be polite and listen.

    [1] https://github.com/twpayne/chezmoi

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

  • kelseyhightower/envconfig

    Golang library for managing configuration data from environment variables

    Project mention: A new method of configuration load in Golang | news.ycombinator.com | 2022-12-28
  • dasel

    Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.

    Project mention: Jc – JSONifies the output of many CLI tools | news.ycombinator.com | 2022-11-03
  • cue

    The new home of the CUE language! Validate and define text-based and dynamic configuration

    Project mention: Ask HN: Do you use JSON Schema? Help us shape its future stability guarantees | news.ycombinator.com | 2023-01-30

    My struggle with JSON Schema is that not everyone uses it! I do a lot of work with various APIs and ingestion systems that accept JSON, but they don't provide a JSON Schema for me to validate my payloads against. Instead, I often have a human being on the other side emailing me and saying, "Your data structure isn't correct."

    It's mildly infuriating. I've taken to using Cuelang[0] to write my own validators based on their specifications. (Using Cue because JSON isn't the only data format I have to support.)

    I wish there were an easier way to take some documentation and generate JSON Schema from it. I can take the sample JSON in the docs and generate one, but those samples don't usually contain all the edge cases that the systems complain about, so it's not super useful.

    [0] https://cuelang.org/

  • env

    A simple and zero-dependencies library to parse environment variables into structs.

    Project mention: I created a library for parsing environment variables "envparse" | reddit.com/r/golang | 2023-01-27

    These are a few reasons my team is using https://github.com/caarlos0/env

  • ini

    Package ini provides INI file read and write functionality in Go

    Project mention: Convert any to string or alternative to any | reddit.com/r/golang | 2022-12-02

    I am very new to golang and am trying to write a Program that uses INI Cobfiguration Files. The library that I am using, has built in functions to output the Key as a certain type (string, int, bool, etc). However as I will be accessing several different Keys of different types, I wrote a wrapper that takes the section and key name and the output type, passes that to the libraries functions and outputs the result as the any type. While trying to pass the output into another function that requires a string, it throws the error that it is unable to convert any to string as string requires type assertion. I couldn't find much about the any type, but it seems luke i will either need to redesign my wrapper function, use an alternative to any or find a way to convert any to string or []byte at least.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • tanka

    Flexible, reusable and concise configuration for Kubernetes

    Project mention: Helm makes it overly complex, or is it just me? | reddit.com/r/kubernetes | 2023-01-17
  • go-arg

    Struct-based argument parsing in Go

    Project mention: Libraries for CLI and console applications | reddit.com/r/golang | 2023-01-07

    I’ve used multiple libraries over the last two years but less is more and go-arg feels like something that would be in the stdlib: https://github.com/alexflint/go-arg

  • koanf

    Simple, lightweight, extensible, configuration management library for Go. Support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.

    Project mention: Simplify Your Configurations in Go | reddit.com/r/golang | 2022-11-11
  • go-toml

    Go library for the TOML file format

  • ytt

    YAML templating tool that works on YAML structure instead of text

    Project mention: The YAML Document from Hell | news.ycombinator.com | 2023-01-12

    > Templating yaml is a terrible, terrible idea

    I've had a good time using ytt: https://carvel.dev/ytt/. It implements language-aware templating, which is IMO the only reasonable way to do it.

  • drago

    ☁️ Securely connect anything with WireGuard® and manage all your networks from a single place.

  • cleanenv

    ✨Clean and minimalistic environment configuration reader for Golang

    Project mention: Configuration in microservices | reddit.com/r/golang | 2022-10-29

    I’m using this with yaml configurations https://github.com/ilyakaznacheev/cleanenv Supports env aswell

  • konfig

    Composable, observable and performant config handling for Go for the distributed processing era

  • confita

    Load configuration in cascade from multiple backends into a struct

  • isopod

    An expressive DSL and framework for Kubernetes configuration without YAML

    Project mention: Deploying Kubernetes clusters in increasingly absurd languages | news.ycombinator.com | 2022-05-06
  • aconfig

    Simple, useful and opinionated config loader.

    Project mention: Library for loading configuration into a struct in Go | reddit.com/r/golang | 2022-03-20

    Well, now I see my project is very similar to this https://github.com/cristalhq/aconfig

  • gookit/config

    📝 Go configuration manage(load,get,set,export). support JSON, YAML, TOML, Properties, INI, HCL, ENV and Flags. Multi file load, data override merge, parse ENV var. Go应用配置加载管理,支持多种格式,多文件加载,远程文件加载,支持数据合并,解析环境变量名 (by gookit)

    Project mention: GitHub - gookit/config: 📝 Go configuration manage(load,get,set,export). support JSON, YAML, TOML, Properties, INI, HCL, ENV and Flags. Multi file load, data override merge, parse ENV var, binding data to struct. | reddit.com/r/golang | 2022-08-30
  • jk

    Configuration as Code with ECMAScript

  • config

    12 factor configuration as a typesafe struct in as little as two function calls (by JeremyLoy)

  • config

    A lightweight yet powerful configuration manager for the Go programming language (by golobby)

  • hjson

    Hjson for Go

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-01-30.

Go Configuration related posts


What are some of the best open-source Configuration projects in Go? This list will help you:

Project Stars
1 viper 21,838
2 chezmoi 8,381
3 kelseyhightower/envconfig 4,401
4 dasel 4,013
5 cue 3,548
6 env 3,209
7 ini 3,154
8 tanka 1,868
9 go-arg 1,559
10 koanf 1,465
11 go-toml 1,376
12 ytt 1,290
13 drago 1,010
14 cleanenv 885
15 konfig 635
16 confita 456
17 isopod 443
18 aconfig 424
19 gookit/config 421
20 jk 387
21 config 323
22 config 310
23 hjson 290
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives