Add CLI config file management #4
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#5 Add
vektor login command
austin/vektor
#3 Add Bearer token authentication for API access
austin/vektor
Reference
austin/vektor#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The CLI needs to know which server to talk to and what token to use. This is the foundation for all CLI commands.
What needs to happen
Create config management (e.g.,
internal/cli/config.go) that reads/writes~/.config/vektor/config.jsonwith fields:server_url— the Vektor server URLtoken— the API token fromvektor loginAdd a
vektor config set-server <url>command.Respect environment variable overrides:
VEKTOR_SERVERoverridesserver_urlVEKTOR_TOKENoverridestokenUse
os.UserConfigDir()for cross-platform config directory resolution. This is straightforward file I/O and JSON marshaling — a good early Go exercise.vektor logincommand