0

I'm working on CLI tool written in python.

There should be default config directory. Very similar to nginx approach:

conf_root
   |__main.conf
   |__projects
      |__project1.conf
      |__project2.conf
      |__another_project.conf

I'm looking for a conventionally practices to store config CLI config files.

Package root seems to be a bad idea. I'm thinking about /etc/package_name but not sure if it's right and how correctly to work with permissions if I need to create new folder at /etc and copy default config files?

I going to use pip as an installation tool. (pip install package_name)

  • 1
    Look at the XDG Base Directory Specification i.e. normally under ~/.config/your_unique_application_name/ – Anthon Jul 14 '17 at 5:32
  • note that this question has three close votes, two of which are for being "primarily opinion-based". I almost cast a close vote for that reason, but I think the real question here is, "where do CLI tools conventionally store config files?" which seems more on-topic. – strugee Jul 16 '17 at 6:52
  • @strugee, thank for pointing out. I've added changes to the question. Let me know if I can make it more clear. – Alex T Jul 16 '17 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.