cli icon indicating copy to clipboard operation
cli copied to clipboard

create `dcl config` command

Open fmiras opened this issue 5 years ago • 1 comments

What?

Create a dcl config subcommand:

Developers should be able to change any type of environment configuration just as debugging, MANA/LAND contracts and content server url. This can already be achieved by setting up environment variables which is very convenient when it's about CI/Server/Container environments but when working/developing in a scene it could be a little bit annoying, e.g.:

DEBUG=true LAND_REGISTRY=0x.. MANA_TOKEN=0x... CONTENT_URL=https://content.fmiras.com dcl deploy --yes

It would be nice to just config this variables globally so developers don't have to put them in each every command:

dcl config contentUrl=https://content.fmiras.com
dcl info 0,0 # Uses the new globally configurated content URL

This should be saved at .dclinfo file that we already have in the HOME path and it has to support deleting them to start using the default value again like maybe:

dcl config -D contentUrl

In the first iteration of this feature dcl config can have a global scope and maybe later we can save a project scope and differ them with a --global flag just like git config does.

fmiras avatar Jan 11 '19 18:01 fmiras

How about following the git way? git config --global user.name "Mona Lisa" Basically no = Also let's be consistent with the UPPER_CASE or camelCase usage of the vars.

Other than that, looks great 👍

belohlavek avatar Jan 11 '19 19:01 belohlavek