Should servers be a dict of id -> url, or id-> object? For example we might want to store alternative names for that server. (You can imagine issuing queries like "Tell me more about ideas that Dimitri has on heroism that differ from Alex's")
In the future we might add other properties to config as a convenient place to stash them.
[ ] Have a default config file that is used if it exists (although that can be explictly turned off too for development)
[x] Add a --force to command to remove a token
[x] Add a --create flag that must be passed to create a new shortname, unless it's endpoint
[x] Allow selecting a item via its short_name or its endpoint.
[x] Only create a new entry if --create is passed.
[ ] If the host_name isn't known, suggest other ones based on edit distance?
[x] Figure out some idiomatic way to set token and endpoint together so the "don't forget to add endpoint" is just done in one step. Maybe python3 -m config.directory set https;//polymath.komoroske.com token sk_blah_blah (which just works for free with the above)
When people have a number of server endpoints they like to include.
Instead of having to pass
--server https://example.com --server https://foo.com
it should be possible to have a config file.We could have the command by default look for it at a location like
config.json
but also have an argument to provide a different config.Some uses for endpoints need there to be a name for them (e.g.
wdl
,alex
etc).Should
servers
be a dict of id -> url, or id-> object? For example we might want to store alternative names for that server. (You can imagine issuing queries like "Tell me more about ideas that Dimitri has on heroism that differ from Alex's")In the future we might add other properties to config as a convenient place to stash them.