HACKER Q&A
📣 maximilianroos

It's time for a `.config` path in repos


As the number of tools built for repos increases, the roots of repos are becoming increasingly cluttered.

A repo like dbt-labs/dbt-core [0] has 21 files in its root, almost all config files like `Makefile`, `Dockerfile.test`, `pyproject.toml`.

GitHub's structure — showing the full file listing before the Readme — means that this clutter adds a small tax to browsing repos. Those 21 files appear below 14 directories, so it's 2+ screens before we can see the readme.

Would folks support a standard path for config files, like a `.config` path, similar to the XDG default? Tools would look there in addition to the root of the repo, and so we could move many of those config files out of the root.

If there were support: I'm not sure of the best way of organizing this. Maybe a few tools start embracing the standard, and others follow? Or we have a "arewedotconfigyet.com" site? Does putting a config file in the root help the marketing of tools, such that tools are less incentivized to do this?

[0]: https://github.com/dbt-labs/dbt-core


  👤 rektide Accepted Answer ✓
Yeah I 100% dislike having these random things littering up the main directory. It's so ugly, from the command line & from github.

I personally might go with 'config' or some such, versus .config. I dont think they should be hidden files, personally... we only hide them because we put them in such a bloody inconvenient & highly visible spot.


👤 cratermoon
How many of those files need to be in the root, vs put there out of laziness? The authors of the repo have chosen to use a lot of different python ecosystem tools to automate various steps, but how many of those tools could simply be set to look in a different place for the files? The Makefile references tox for testing, both black and flake8 to enforce style (why two?), and of course the docker stuff. I bet most of those tools can be given a parameter for the location of the file, and they could all be moved into some subdir.

👤 terminal_d
Not everything needs to be "cleaned", thank you.

👤 dave4420
It would be easier for GitHub to not show those files by default.