Welcome to the STACKIT CLI, a command-line interface for the STACKIT services.
This CLI is in a BETA state. More services and functionality will be supported soon. Your feedback is appreciated!
Please refer to our installation guide for instructions on how to install and get started using the STACKIT CLI.
A typical command is structured as:
stackit <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <PARAMETER FLAGS> [OPTION FLAGS]
<GROUP>
can be the name of a service, such asdns
ormongodbflex
, or other groups for additional functionality, such asconfig
to configure the CLI orauth
to authenticate.<SUB-GROUP>
should be the name (singular form) of a service resource, when<GROUP>
is the name of a service. Examples:zone
,instance
.<COMMAND>
is a command associated to the innermost group. Usually it's an action for the resource in question, such aslist
(to show all resources of the given type) or the CRUD operationscreate
,describe
,update
anddelete
.<ARGUMENT>
is required by some commands to specify a resource identifier. Examples:stackit dns zone delete ZONE_ID
,stackit ske cluster create CLUSTER_NAME
.<PARAMETER FLAGS>
is a list of inputs necessary to execute the command, in the format--[flag]
or--[flag] [value]
. Some are required, while others are optional.[OPTION FLAGS]
is a set of optional settings that modify the command's execution context. Examples:--output-format=json
changes the format of the output to JSON,--assume-yes
skips confirmation prompts.
Examples:
stackit ske cluster describe my-cluster --project-id xxx --output-format json
stackit mongodbflex instance create --name my-instance --cpu 1 --ram 4 --acl 0.0.0.0/0 --assume-yes
stackit dns zone delete my-zone
Some commands are implemented at the root, group or sub-group level:
stackit config
to define variables to be used in future commands.stackit ske enable
to enable the SKE engine on your project.
Help is available for any command by specifying the special flag --help
(or simply -h
):
stackit --help
stackit -h
stackit <GROUP> --help
stackit <GROUP> <SUB-GROUP> --help
stackit <GROUP> <SUB-GROUP> <COMMAND> --help
Below you can find a list of the STACKIT services already available in the CLI (along with their respective command names) and the ones that are currently planned to be integrated.
Service | CLI Commands | Status |
---|---|---|
Argus | Will be integrated soon | |
Authorization | project , organization |
✅ |
DNS | dns |
✅ |
Kubernetes Engine (SKE) | ske |
✅ |
Load Balancer | Will be integrated soon | |
LogMe | logme |
✅ |
MariaDB | mariadb |
✅ |
MongoDB Flex | mongodbflex |
✅ |
Object Storage | object-storage |
✅ |
OpenSearch | opensearch |
✅ |
PostgreSQL Flex | postgresflex |
✅ |
RabbitMQ | rabbitmq |
✅ |
Redis | redis |
✅ |
Resource Manager | project |
✅ |
Secrets Manager | secrets-manager |
✅ |
Service Account | service-account |
✅ |
Most of the commands will require you to be authenticated. Currently it's possible to authenticate with your personal user or with a service account.
After successful authentication, the CLI stores credentials in your OS keychain. You won't need to login again for the duration of your session, which is 2h by default but configurable by providing the --session-time-limit
flag on the config set
command (see Configuration).
To authenticate as a user, run the command below and follow the steps in your browser.
stackit auth login
To authenticate using a service account, run:
stackit auth activate-service-account
For more details on how to setup authentication using a service account, check our authentication guide.
You can configure the CLI using the command:
stackit config
The configurations are stored in ~/stackit/cli-config.json
and are valid for all commands. For example, you can set a default project-id
by running:
stackit config set --project-id xxxx-xxxx-xxxxx
To remove it, you can run:
stackit config unset --project-id
Run the config set
command with the flag --help
to get a list of all of the available configuration options.
You can lookup your current configuration by checking the configuration file or by running:
stackit config list
You can also edit the configuration file manually.
If you wish to setup command autocompletion in your shell for the STACKIT CLI, please refer to our autocompletion guide.
If you encounter any issues or have suggestions for improvements, please reach out to the Developer Tools team or open a ticket through the STACKIT Help Center.
Your contribution is welcome! For more details on how to contribute, refer to our contribution guide.
Apache 2.0