#9085·concourse

Use Cobra/Viper to parse app config (env vars and cli flags)

Author: taylorsilvaCreated Feb 26, 2025Updated Jun 26, 2026
Labelsenhancement

App configuration currently works, so there is little motivation to change it. It would be great if we could modernize this area of our code base though as it relies on some stale libraries. I know printing --help for the web or worker command is broken unless you have a wide terminal. This is a minor pain, but a pain nevertheless.

I would like to switch to https://github.com/spf13/viper for parsing concourse web and concourse worker configuration. It would do everything we currently support:

  • env vars
  • cli flags

And add the ability for folks to make configuration files. No more passing in a massive list of env vars.

I'm imagining the biggest hurdle will be changes in parsing behaviour between our current flag parser (https://github.com/jessevdk/go-flags) and viper. This might have to go into a Major version release as a breaking change.

If anyone in the community wants to pick up this work please feel free to, just communicate so here. I will not be working on this anytime soon. The amount of work is huge and the benefits are minimal.