Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move config file to XDG base directory #54

Open
yochem opened this issue Oct 9, 2024 · 0 comments
Open

Move config file to XDG base directory #54

yochem opened this issue Oct 9, 2024 · 0 comments

Comments

@yochem
Copy link

yochem commented Oct 9, 2024

#17 proposes to hide the edge impulse config file.

I would much rather see a configuration file being moved to a XDG compliant directory, as is the norm within unix systems. This spec allows for a clean home directory and enabled users to change their configuration directory. For linux and mac, this would normally be ~/.config, thus the location for this file could be ~/.config/edge-impulse/config.json.

I don't know much about the typescript ecosystem, but there is a npm package that handles these paths for you. Of course, implementing it yourself is also trivial (I could create a PR for it).

Also, reviewing the contents of the config file, it looks more like either data or state than config. This is what the spec says about the difference between these two:

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, …)
  • current state of the application that can be reused on a restart (view, layout, open files, undo history, …)

The standard directories on unix would be respectively ~/.local/share and ~/.local/state.

Thank you for considering not to clutter our home directory, and let me know if I can be of any help. Always glad to help!

TL;DR: suggestion to change location of config file from ~/edge-impulse-config.json to ~/.local/state/edge-impulse/cli.json or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant