Skip to content

Move config file to XDG base directory #54

@yochem

Description

@yochem

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions