cli icon indicating copy to clipboard operation
cli copied to clipboard

Enable host setup loading via ENV variable

Open bastianallgeier opened this issue 1 year ago • 1 comments

You can now load a different host config by setting the new KIRBY_HOST env variable:

env KIRBY_HOST=production.com kirby my-command

@lukasbestle could you have a look at this. I tried to also implement the idea of an additional --env or --host option, but we need to load Kirby first before we can really start parsing the arguments and it would have turned into a bad hack.

I found HOST to be better than ENV, but I wonder if we should do KIRBY_CLI_HOST instead? Not entirely sure.

bastianallgeier avatar May 03 '24 08:05 bastianallgeier

I like KIRBY_HOST. Don't think we need KIRBY_CLI_HOST as it's obvious we are running the CLI and the command is just called kirby.

Implementation looks good as well. 👍

lukasbestle avatar May 05 '24 12:05 lukasbestle