where should I store personal data for npm package?

64 Views Asked by At

For example, I have a npm package which is a cli-tool. Users should set their yahoo email and password first before using the functionalities. My question is where should I store the personal data? Is there a convention?

1

There are 1 best solutions below

0
On

Most cli's use a hidden configuration file commonly stored in the home directory of the user. For example .cli-config, it is also good to store the configuration data as JSON or YAML.

Finally be carful to save sensitive data in the config file as it still is just a file and can be accessed by anyone with correct permissions.