ipvm-wg/homestar

Add `init` command to generate keypairs and settings file

bgins opened this issue · 1 comments

Summary

Problem

Homestar requires users to generate a keypair or use a randomly generated one. Also, settings are set by default computationally. We should give people the ability to initialize a configuration (with defaults) and an existing keypair (with the option of which key type).

Impact

Manually generating a keypair is inconvenient. Randomly generated keypairs result in a new peer ID on each run, which makes it challenging to configure network discovery and connections.

Solution

We will use a default configuration and .pem in $HOME/.config for Linux and macOS, and $USERPROFILE for Windows. We should always check the configuration first at the default location. If no configuration is available at the default location, and no configuration is provided, just start with automatic defaults.

Closed with #582.