Andriamanitra / coctus

Command line tool for playing Clash of Code locally
MIT License
4 stars 2 forks source link

Global configuration #61

Open ellnix opened 2 months ago

ellnix commented 2 months ago

When considering things like #20 and various other features #60 we will require to maintain some sort of configuration state.

I made this issue to discuss the interface for it. Assuming that we store it in a toml file to be consistent with the rest of the repo, we will probably have simple key/value strings.

Personally I recommend a git-like syntax:

$ clash config
workspace: not set
editor: not set
$ clash config editor vim
Successfully set editor to vim.
$ clash config
workspace: not set
editor: vim
Andriamanitra commented 2 months ago

The CLI for that would probably be

but to be honest at first stage we just need to have a file, the CLI is easy to add later. Here are the options the config file should contain (eventually, not everything needs to be implemented at once)