koinos / koinos-cli

A command line utility used for key management and to interact with the Koinos blockchain.
Other
9 stars 7 forks source link

[FEATURE]: Load a global koinosrc file if one is not found in your home directory #157

Closed jredbeard closed 1 year ago

jredbeard commented 1 year ago

Is there an existing issue for this?

New feature

As a CLI user who installed the app via a package manager I would like the ability to have a global koinosrc file loaded in if one is not in my home directory. Because of this, the app will "just work" for me on koinos mainnet after installing. This approach provides sane defaults for users while keeping the code chain agnostic and part of the overall framework.

Connecting to the default mainnet RPC and having the contracts loaded in for koinos mainnet is very valuable for user experience. If installing via package managers a .koinosrc may not be automatically placed in a home directory (because for example on Linux you would probably install with sudo apt-get install koinos-cli -y)

Anything else?

For Linux the global koinosrc location would probably be: /etc/koinos-cli/koinosrc-default For macOS the global koinosrc location would probably be: /Library/Application Support/koinos-cli/koinosrc-default

It would probably be fine to use runtime.GOOS to detect the platform, but, if this app has other OS specific requirements then it should probably be handled the same way as those. Build constraints are another way to handle this.

This issue will also require #158 to be completed before package manager installations become available.

koinos-ci commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

koinos-ci commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.