nullstone-io / nullstone

Nullstone is a customizable developer platform launched on your cloud accounts.
https://nullstone.io
MIT License
39 stars 1 forks source link

C712 Flags #27

Closed BSick7 closed 2 years ago

BSick7 commented 2 years ago

This PR alters the syntax of the CLI to use flags instead of positional args for stack, app, block, and env. Additionally, the following env vars can be used in place of flags: NULLSTONE_STACK, NULLSTONE_APP, NULLSTONE_BLOCK, and NULLSTONE_ENV.

The existing usage of positional args is deprecated, but not removed yet. This will allow us to update existing code flows without breaking deployments.

This PR also adds the nullstone outputs --block=<env> --env=<env> command.

Here are a few example snippets that work properly:

nullstone push --source=nullfire nullfire dev # deprecated
nullstone push --app=nullfire --env=dev --source=nullfire
NULLSTONE_APP=nullfire NULLSTONE_ENV=dev nullstone logs --source=nullfire

nullstone status -w nullfire dev # deprecated
nullstone status --app=nullfire --env=dev -w
NULLSTONE_APP=nullfire NULLSTONE_ENV=dev nullstone status -w

nullstone logs -t -s '5m' nullfire dev # deprecated
nullstone logs --app=nullfire --env=dev -t -s '5m'
NULLSTONE_APP=nullfire NULLSTONE_ENV=dev nullstone logs -t -s '5m'

nullstone exec nullfire dev # deprecated
nullstone exec --app=nullfire --env=dev
NULLSTONE_APP=nullfire NULLSTONE_ENV=dev nullstone exec

nullstone outputs --block=nullfire --env=dev
NULLSTONE_BLOCK=nullfire NULLSTONE_ENV=dev nullstone outputs
NULLSTONE_APP=nullfire NULLSTONE_ENV=dev nullstone outputs