Skip to content

Instantly share code, notes, and snippets.

@giuliobosco
Last active November 1, 2020 21:26
Show Gist options
  • Save giuliobosco/71debc51b42365e4cea9fdcd08fa64a5 to your computer and use it in GitHub Desktop.
Save giuliobosco/71debc51b42365e4cea9fdcd08fa64a5 to your computer and use it in GitHub Desktop.
stormkit-cli.md

stormkit-cli

Manage applications:

$ sk app ls [--numbers] [--details]
$ sk app add <repo>|.
$ sk app rm <id>|--repo <repo>|--index <index>|.
$ sk app use <id>|--repo <repo>|--index <index>|.
$ sk app info [<id>|--repo <repo>|--index <index>|.] [--get...|--set...] ## configure app settings
$ sk app envs [<id>|--repo <repo>|--index <index>|.]

manage environments (of application)

$ sk env ls [--numbers] [--details]
$ sk env add <name> <branch>|.
$ sk env rm <name>
$ sk env use <name>
$ sk env info [<name>|.] [--get...|--set...]
$ sk env domain <name>

manage deploys (of env)

$ sk deploy ls [--numbers] [--details]
$ sk deploy pubish [<id>|<index>] # with notthing use latest
$ sk deploy preview [<id>|<index>]
$ sk deploy details [<id>|<index>]
$ sk deploy rm [<id>|<index>]
$ sk deploy [<env_name> [<branch>]]

manage logs (of env)

$ sk logs 
# need help of which operation write

manage remote config (of env)

$ sk remote-config ls [--numbers] [--details]
$ sk remote-config add <name> [--description <description>] [--experiment-id <experiment-id>]
$ sk remote-config rm <name>|<index>|<id>
$ sk remote-config info <name>|<index>|<id> [--set|--get]
$ sk remote-config value ls
$ sk remote-config value add <name>|<index>|<id> <value> [--percentile <percentile>] [--segment <segment>] [--version <version>]
$ sk remote-config value rm <name>|<index>|<id>
$ sk remote-config value info <name>|<index>|<id> [--set|--get]

remote config aliases:

  • rc
  • param

Monitoring (of env)

sk monitor

Manage snippets (of env)

$ sk snippet ls
$ sk snippet add <name> [--content <string>|--content-file <path>] [--preappend|--append(default)] [--body|--head(default)] [--enabled]
$ sk snippet rm <name>|<index>|<id>
$ sk snippet info <name>|<index>|<id> [--get|--set]
@svedova
Copy link

svedova commented Nov 1, 2020

Option 2 is very cool. Great Job 🙏

I have a question regarding the use parameter. What does sk app use and sk env use do?

Also, even though in the backend it is called remote-config, I like the sk param alias as well. Perhaps we can create an alias for param and rc (remote config).

@giuliobosco
Copy link
Author

The Idea is that you can use the tool when you are in the directory repository of you project deployed on stormkit or you can also use anywhere else.

When you are not in the directory of the repository you can list all of your applications with sk app ls and then use the sk app use to say which application you want to work on (automatically using default env), then you do sk env ls and then select another environment you want to work on with sk env use.
Could be an idea add sk use <app> <env>.

For remote-config we can do this as main command and then param and rc as aliases.

@svedova
Copy link

svedova commented Nov 1, 2020

Ahh so basically it's like setting a session if you're not inside the application folder. It makes sense. Just a heads up, we need to keep in mind that we may still require to read the stormkit.config.yml even if we're not inside the folder. So somehow the use command needs to know where in the local system the application folder is located, or it needs to be able to read the file through either API or fetching the repository content.

For remote-config we can do this as main command and then param and rc as aliases.

Yup, I like this! 👍 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment