I currently use two zrok environments - one at api.zrok.io and one on my self-hosted zrok service. To "switch" from a self-hosted environment to a one at api.zrok.io, I need to do something like,
zrok disable
zrok config set apiEndpoint https://api.zrok.io
zrok enable <token>
Is there a better way to interact with multiple environments?
If you're on Linux, you can use a HOME environment variable...
# main environment
$ zrok enable <token>
# another environment
$ HOME=/tmp/another zrok enable <token>
and then you can do things like:
$ HOME=/tmp/another zrok share public ...
I am on Linux, so was able to do the following,
alias zrok-private 'HOME=~/.config/zrok/private zrok'
alias zrok-public 'HOME=~/.config/zrok/public zrok'
and then
> zrok-public enable <token>
> zrok-public overview # βοΈ
> zrok-private config set apiEndpoint <endpoint>
> zrok-private enable <token>
> zrok-private overview # βοΈ
which resulted in
β― tree -a ~/.config/zrok
.config/zrok
βββ private
β βββ .zrok
β βββ config.json
β βββ environment.json
β βββ identities
β β βββ environment.json
β βββ metadata.json
βββ public
βββ .zrok
βββ environment.json
βββ identities
β βββ environment.json
βββ metadata.json

I like your use of aliases better than the symlink method I've been using. Will adopt!