Skip to main content

Commands

In this section, you will find:

Main commands

CommandDescription
stk loginLog in to a StackSpot account.
stk logoutLogs out of the StackSpot account.
stk initLaunches and configures the stk CLI tool in your environment.
stk --helpThe --help flag shows more information about the commands and their parameters.
stk --versionShows the current installed version.
stk upgradeUpdates the CLI's version.
stk validate pluginValidates the structure of your Plugin.
stk publish pluginPublish your Plugin on StackSpot.

Content creation, queries, and using StackSpot

CommandDescription
stk create pluginAllows you to create new Plugins on StackSpot.
stk apply pluginApply a Plugin that adds new capabilities to an application.
stk create appCreate an application from one or more Plugins.
stk validate appValidates the structure of an application.
stk list workspaceLists all Workspaces available on your account.
stk use workspaceAllows you to access a Workspace.
stk exit workspaceTerminates use of a Workspace.
stk create actionCreates an Action's structure.
stk run actionExecutes an Action.
stk list actionLists all Actions available in a Workspace.
stk validate actionValidates an Action's structure.
stk publish actionPublish an Action on StackSpot.
stk list stackLists all Stacks available in a Workspace.
stk list starterLists all Starters available in a Workspace.
stk list pluginLists all Plugins within a Workspace.
stk list envLists all environments available in a Workspace.
stk register appLogs information from an application to a Workspace.
stk list appLists all apps registered to a Workspace.
stk create infraCreates a Shared Infrastructure.
stk register infraLogs information from a Shared Infrastructure to a Workspace.
stk list infraLists the Shared Infrastructures registered to your Workspace.
stk deploy appDeploys your application
stk validate infraValidates the structure of an Infrastructure.
stk deploy infraDeploys your infrastructure.
stk deploy statusMonitors the status of the current deploy running.
stk remove pluginRemoves Plugins from your application or infrastructure manifest.
stk configure connection-interfaceEdits the required Connection Interface settings when applying an app or infra Plugin.

All commands

stk login

The command stk login logs in to a StackSpot account. You need to enter your StackSpot account email. From there, the command opens your browser and asks you to fill in your data and confirm access to generate a session.

Use

stk login [EMAIL]

Parameters

OptionsDescriptionExample
EMAILEmail used to login to StackSpot account.stk login mystackspot-account@email.com

stk logout

The command stk logout logs out a logged-in StackSpot account. It inactivates the session created through the command stk login.

Use

stk logout

stk init

The command stk init is used to initialize and configure the STK CLI tool in your environment. The command shows a list of all available parameters. In addition, allows you to configure the proxy and disable certificates.

Users with Private VPN must configure the parameters manually.

Parameters

Confira as opções disponíveis no comando:

OptionsDescriptionExample
-f, --force-updateForces the Plugin catalogs to be updated before the automatic update, which occurs 24 hours after the last update.stk init --force-update
-o, --plugins-offlineConfigures Stacks catalogs to work in offline mode by default. It is used when STK CLI users do not have permission to clone repositories from GitHub.stk init --plugins-offline
-k, --disable-ssl-verifyDisables verification of SSL certificates. It is used when the proxy in private VPN environments returns invalid certificates to Github.stk init --disable-ssl-verify
-p, --proxy <host>:<port>Configures a proxy to make HTTP connections.stk init --proxy proxy.mycorp:8080
-c, --cleanClears previously made settings. It is used to remove default settings.stk init --clean
-e, --proxy-exclusions <url-proxy1>,<url-proxy-2>Defines the list of URLs, separated by a comma, which must not connect via the configured proxy.stk init --proxy-exclusions proxy.mycorp1.com, proxy2.mycorp.com, proxyn.mycorp.com

stk --help

STK CLI has the option --help to show more information about the commands and their parameters.

Write in your terminal the command you need to know more information and then add --help.

Use

<stk command> --help

stk --version

Displays in the terminal the current version of the installed STK CLI.

Use

stk --version

Parameters

OptionsDescriptionExample
--version, -vDisplays in the terminal the current version of the STK CLI installed on your machine.stk --version or stk -v

stk upgrade

The command stk upgrade updates the STK CLI version when a new one is available.

When the command stk upgrade is executed in the terminal, it updates the STK CLI to the latest version. If there is a new version, the following message will be displayed:

Your STK CLI version 4.0.0 is outdated. The new version 4.1.0 is available.
To upgrade run the command: 'stk upgrade'.

Use

stk upgrade

Parameters

OptionsDescriptionExample
--forceForce the STK CLI to upgrade to a new major versionstk upgrade --force

A new major release, also known as a release major, brings changes from the previous release. These changes cause incompatibility between versions and make it impossible for you to go back to the previous version.

If a major version is available, when updating, the STK CLI displays an incompatibility warning and provides the parameter --force for you to update the version.


stk validate plugin

  • Validates the structure of your Plugin;
  • Remove empty folders;
  • Ignores files and folders that you don't want when you finish your Plugin development.

At the end of the command execution, it displays a message with the inconsistencies and the validation result.

Use

stk validate plugin

Parameters

OptionsDescriptionExample
-v, --verboseOption to list the details of all analyzed, validated, and ignored items of your Plugin.stk validate plugin --verbose
-h, --helpDisplays the command help and exits.stk validate plugin --help

stk publish plugin

The command stk publish publishes your Plugin on StackSpot.

Use

stk publish plugin --studio [TEXT]

Parameters

OptionsDescriptionExample
-s, --studioName of the Studio where you want to publish the Plugin.stk publish plugin --studio my-studio-name
-v, --verboseDisplays publishing steps in detail.stk publish plugin --verbose
-h, --helpDisplays the command help and exits.stk publish plugin --help

stk apply plugin

The command stk apply plugin applies a Plugin that adds new capabilities to an application.

Use

stk apply plugin [NAME_OR_PATH]

Parameters

OptionsDescriptionExample
NAME_OR_PATHName or path of the Plugin folder that will be applied.stk apply plugin account-name/studio-name/plugin-name-v@1.0.0
-s ou --skip-warningDisables the warning displayed when the Plugin is applied outside of an application created with StackSpot.stk apply plugin account-name/studio-name/plugin-name-v@1.0.0 --skip-warning
-h, --helpDisplays the command help and exits.stk apply plugin --help
--<nome-input> <valor-input>Defines the values ​​of the Plugin's inputs through the terminal. To enter a value for more than one input, separate each input with a space.stk apply plugin <plugin-name> --<input-name1> <input-value1> --<input-name2> <input-value2> --<input-name3> <input-value3>
--non-interactiveDisable the warning when a Plugin is applied out of an Application create with StackSpot.stk apply plugin studio/stack/plugin --non-interactive In this case, if input or items (e.g. Connection Interface) are not informed, the user receives an error. No questions are asked.
-i, --inputs-jsonAction input parameter in JSON format. Add the inputs using single quotes.stk apply plugin studio/stack/plugin --inputs-json '{"input1_name": "Input 1 value", "input2_name": "Input 2 value"}'
-s, --skip-warningIt doesn't ask the parameter input for the user. It returns an error if a required parameter hasn't been informed. When the user adds this flag, it avoids the 'The current folder does not belong to a StackSpot. Do you still want to apply the Plugin?' question.stk apply plugin studio/stack/plugin --skip-warning
info

For the input flags (--<input-name> <input-value>) of Connection Interfaces, the values must be informed with the prefix --connectors.CONNECTION-INTERFACE-TYPE CONNECTION-INTERFACE.

Examples:

Connection Interface syntax via input flag

stk apply plugin <PLUGIN-NAME_OR_PATH> --connectors.<CONNECTION-INTERFACE-TYPE> <CONNECTION-INTERFACE-INSTANCE>

Input flag filled in the command example

stk apply plugin my-plugin-name --connectors.aws-rds-conn my-aws-rds-conn

stk create plugin

The stk create plugin command allows you to create new Plugins for StackSpot.

When you execute the command in the terminal, you have to choose which type the Plugin should be and a folder is generated with the structure to create the Plugin. The user must edit the file plugin.yaml and configure the Plugin's input parameters.

Use

stk create plugin [NAME]

Parameters

OptionsDescriptionExample
-d, --descriptionText describing the Plugin and its purpose. Write the text in quotes to use spaces in the description.stk create plugin my-plugin --description "Plugin description"
-v, --versionAdds the Plugin version. It is one of the requirements to publish the Plugin.stk create plugin my-plugin --version 1.0.0
-ar, --add-repositoryControls whether a repository should be started. Possible values ​​are: 's'/'n' or 'true'/'false'.stk create plugin my-plugin --add-repository 'true'
-t, --typeType of Plugin that will be created. Possible values ​​are app or infra.stk create plugin my-plugin --type app
-gci , --generates-connection-interfaceDefine the Connections Interfaces in the requires Plugins field of type app and infra. To define more than one Connection Interface, separate each one with a comma (,).stk create plugin my-plugin -gci 'aws-ecs-conn, aws-eks-conn' --description "Plugin description"
-rci, --requires-connection-interfacesDefine the Connections Interfaces in the generates Plugins field of type infra. To define more than one Connection Interface, separate each one with a comma (,).stk create plugin my-plugin -rci 'aws-ecs-conn, aws-eks-conn' --description "Plugin description"
-r, --remoteGit URL to set as the source of the Plugin repository. Required when NAME is not provided, in which case NAME will be set to the name of the Git repository.stk create plugin --remote my-url-git-repository
-h, --helpDisplays the command help and exits.stk create plugin --help

stk create app

The stk create app command creates an application from one or more Plugins. The application is generated with the capabilities of the Plugins used. It can be applications with business rules, infrastructure, or some specific feature.

Use

stk create app [APP_NAME] --starter [ACCOUNT/STUDIO/STACK/STARTER]
info

If the Workspace is active, you do not need to enter the Account. Use the format: stk create app [NOME_APP] --starter [STUDIO/STACK/STARTER].

Example:

stk create app my-app-name --starter my-studio/my-stack/starter-name

Parameters

OptionsDescriptionExample
APP_NAMEDefines the name of the application. If you don't provide the name, the value of the --remote option will be the application name.stk create app my-app-name
-s -s, --starter, --starter account-slug/studio-slug/stack-slug/starter-slugDefines the Starter that will apply the set of Plugins in the application. You must inform the name of the Starter and its source data such as the Account, Studio and Stack.stk create app my-app-name --starter my-account/my-studio/my-stack/starter-name
-r, --remote <git-url>Defines the URL of the remote Git repository that is used as the project source. If not informed, the remote repository will not be configured and you must do the process manually.stk create app my-app-name --remote my-git-repository-url
-i, --inputs-jsonAction input parameter in JSON format. Add the inputs using single quotes.stk create app app-name --starter [ACCOUNT/STUDIO/STACK/STARTER] --inputs-json '{"input1_name": "Input 1 value", "input2_name": "Input 2 value"}'.
-d, --descriptionDefines a description of your application and its purpose.stk create app my-app-name --description "my app description" --starter my-studio/my-stack/starter-name
-ci, --connection-interfacesThe parameter passes a list in JSON format. It is an object with the names of the Connections Interfaces of the Plugins connectors of type app and infra.'{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'
-q, --non-interactiveIt does not ask the user for input parameters, returning an error if any required parameter has not been provided.stk create app studio/stack/plugin --non-interactive
-h, --helpDisplays the command help and exits.stk create app --help

Examples:

Connection Interface syntax via input flag

stk create app <APP_NAME> --starter [ACCOUNT/STUDIO/STACK/STARTER] -ci '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'

Input flag filled in the command example

stk create app my-app --starter my-account/my-studio/my-stack/starter-name -ci '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'

stk validate app

The stk validate app command validates the structure of an application. To validate, execute the command inside the application's folder.

The command will:

  • Validate the structure of your application;
  • Remove empty folders;
  • Ignore files and folders you don't want when you're done developing your application.
info

For the files skipped in the .gitignore file, the command will not validate these files.

At the end of the command execution, it displays a message with the inconsistencies and the validation result.

Use

stk validate app

Parameters

OptionsDescriptionExample
-v, --verboseOption to list the details of all analyzed, validated and ignored items in your application.stk validate app --verbose
-h, --helpDisplays the command help and exits.stk validate app --help

stk list workspace

The command stk list workspace lists a table of all Workspaces available to your account. To view Workspaces, login to the STK CLI using the stk login command.

Use

stk list workspace

stk use workspace

The command stk use workspace allows you to access a Workspace. To access the available Workspaces, login to the STK CLI via the stk login command.

Use

stk use workspace [NAME]
info

To change Workspace, execute the command again stk use workspace informing the name of another Workspace you want to use.

Parameters

OptionsDescriptionExample
NAMEWorkspace name you want to access. If no name is entered, a list of available Workspaces will be displayed on the terminal for you to choose a Workspace.stk use workspace my-workspace-slug
-h, --helpDisplays the command help and exits.stk use workspace --help

stk exit workspace

The command stk exit workspace ends the active session in a Workspace. After running the command, all of the following actions will only have local scope on your machine.

Use

stk exit workspace

stk create action

The command stk create action creates the basic structure for you to develop an Action.

When you run the command in the terminal, choose what type the Action should be. Thus, a folder is generated with the structure to create this Action. Edit the file action.yam land configure the Action's input parameters.

Use

stk create action [NAME]

Parameters

OptionsDescriptionExample
-d, --descriptionText describing the Action and its purpose. Write the text in quotes to use spaces in the description.stk create action my-action --description "Action description"
-v, --versionAdds the Action version. It is one of the requirements to publish the Action.stk create action my-action --version 1.0.0
-ar, --add-repositoryControls whether a repository should be started. Possible values ​​are: 's'/'n' or 'true'/'false'.stk create action my-action --add-repository 'true'
-t, --typeAction type that will be created. Possible values ​​are shell and python.stk create action my-action --type shell
-r, --remoteGit URL to set as the origin of the Action's repository. Required when NAME is not provided, in which case NAME will be set to the name of the Git repository.stk create action --remote my-url-git-repository
-rci, --requires-connection-interfaceDefines the Connection Interfaces required by the Action.stk create action my-action -rci aws-rds-conn
-h, --helpDisplays the command help and exits.stk create action --help

stk run action

The command stk run action runs an Action.

info

To use an Action using the values ​​set in a Workspace, first access a Workspace with the stk use workspace command.

Run the Action following the pattern stk run action [STUDIO/STACK/ACTION]:

stk run action my-studio-name/my-stack-name/my-action-name

Use

stk run action [NAME_OR_PATH]

Parameters

OptionsDescriptionExample
NAMEName of a published Action. Valid values:

1. Execute an Action without using Workspace context variables: <studio-slug>/<action-name>@<action-version>. Can only be used when there is no active Workspace.

2. Execute an Action using the context variables configured for the Action on the Stack within the active Workspace. The Action version (@stack-version) can only be set if there is no active Workspace: <studio-slug>/<stack-slug>/<action-name>@<stack-version>.
1. No Workspace: stk run action my-studio-name/action-name@1.0.0

2. Active Workspace: stk run action my-studio-name/my-stack-name/my-action-name
PATHFolder path of an Actionstk run action User/HomeDir/action-folder-name
--<input-name> <input-value>Defines the values ​​of the Plugin's inputs through the terminal. To enter a value for more than one input, separate each input with a space.stk run action action-name --input-name1 input-value1 --input-name2 input-value2 --input-name3 input-value3
-i, --inputs-jsonAction input parameters in JSON format.stk run action "${{ inputs.action_name }}" --inputs-json "$INPUTS"
-e, --envName of the environment in which the Action will run.stk run action my-studio-name/my-stack-name/my-action-name --env prod
-q, --non-interactiveIt does not ask the user for input parameters, returning an error if any required parameter has not been provided.stk run action my-studio-name/my-stack-name/my-action-name --non-interactive
-ci, --connection-interfacesDefine the Connection Interfaces in the generates Plugins field of type infra. To define more than one Connection Interface, separate each one with a comma (,).Active Workspace: stk run action my-studio-name/my-stack-name/my-action-name -ci 'aws-ecs-conn, aws-eks-conn'
-h, --helpDisplays the command help and exits.stk run action --help
info

For the input flags (--<input-name> <input-value>) of Connection Interfaces, the values ​​must be informed with the prefix --connectors.CONNECTION-INTERFACE-TYPE CONNECTION-INTERFACE. To inform values in the JSON format, use thhe flag -ci or --connection-interfaces.

Examples:

Connection Interface syntax via input flag

stk run action <ACTION-NAME> --connectors.<CONNECTION-INTERFACE-TYPE> <CONNECTION-INTERFACE-INSTANCE>

Example of the input flag filled in the command

stk run action my-action-name --connectors.aws-rds-conn rds-inputs-envs

Example to inform the Connection Interface as json

With active Workspace:

`stk run action my-studio-name/my-stack-name/my-action-name -ci '[{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]'` 

stk list action

The command stk list action displays in the terminal a list with all the Actions of a Workspace.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

stk list action

Parameters

OptionsDescriptionExample
--stackList only the Actions of a specific Stackstk list action --stack my-stack-name
-h, --helpDisplays the command help and exits.stk list action --help

stk validate action

The command stk validate action alidates the structure of your Action. You must run the command inside the Action folder you want to validate.

info

For the files skipped in the .gitignore file, the command will not validate these files.

Validation occurs by type of Action, the items validated for each type are:

All Actions

  • Validates if the file action.yaml or action.yml;
  • Validates if the files action.yaml or action.yml are duplicated inside the Action's folder.

Python Actions

  • A path to the script.py.
    • It is validated if the script.py is empty.
    • It is validated if there is a file script.py.
    • It is validated that the inputs are of the right type (pattern with regex).

Shell Actions

  • It is validated that the inputs are of the right type (pattern with regex)

Use

stk validate action

Parameters

OptionsDescriptionExample
-v, --verboseOption to list the details of all analyzed and validated items of your Action.stk validate action --verbose
-h, --helpDisplays the command help and ends the search.stk validate action --help

stk publish action

The command stk action publishes your Action on StackSpot.

Use

stk publish action --studio [TEXT]

Parameters

OptionsDescriptionExample
-s, --studioName of the Studio you want to publish the Action.stk publish action --studio my-studio-name
-v, --verboseDisplays publishing steps in detail.stk publish action --verbose
-h, --helpDisplays the command help and exits.stk publish action --help

stk list stack

The command stk list stack lists in the terminal the Workspace Stacks available for your account. To list the Stacks you must be inside a Workspace, for that, run the stk use workspace command before listing the Stacks.

Use

stk list stack

stk list starter

The command stk list starter ists in the terminal the Starters available in a Workspace. To list the Starters you must be inside a Workspace. Execute the stk use workspace command before listing the Starters.

Use

stk list starter 

Parameters

OptionsDescriptionExample
-stu, --studioFilters and displays the list of Starters by Studio.stk list starter --studio studio-name
-sta, --stackFilters and displays the list of Starters by Stack.stk list starter --stack stack-name
-h, --helpDisplays the command help and exits.stk list starter --help

stk list plugin

The stk list plugin command lists the Plugins of a Workspace. To list the Plugins you must be inside a Workspace. To do that, execute the stk use workspace command before listing Plugins.

Use

stk list plugin

Parameters

OptionsDescriptionExample
-stu, --studioFilters and displays the list of Plugins by Studiostk list plugin --studio studio-name
-sta, --stackFilters and displays the list of Plugins by Stackstk list plugin --stack stack-name
-t, --typePlugin type will be displayed. Possible values app or infra.stk list plugin --type app or stk list plugin --type infra
-h, --helpDisplays the command help and exits.stk list plugin --help

stk list env

The command stk list env lists all available environments for your Account.

The environments must be configured on the StackSpot website.
To learn how to set up an environment, see more about Workspace.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

stk list env

Parameters

OptionsDescriptionExample
-h, --helpDisplays the command help and exits.stk list env --help

stk register app

The command stk register app registers an application in your Workspace.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

Run the command in the application folder:

stk register app

Parameters

OptionsDescriptionExample
-r, --remoteDefines the URL of the remote Git repository that is used to host your application. If not informed, the remote repository will not be configured and you must do the process manually.stk register app --remote https://github.com/my-git-repository-url
-bb, --base-branchName of the base branch of your application's repository.stk register app --base-branch my-app-release-branch
-h, --helpDisplays the command help and exits.stk register app --help

stk list app

The command stk list app displays in the terminal a list with all the applications registered in your Workspace.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

stk list app

Parameters

OptionsDescriptionExample
-h, --helpDisplays the command help and exits.stk list app --help

stk create infra

The stk create infra command creates one or more Shared Infrastructure resources from Stack's Plugins of infra type.

Use

stk create infra [INFRA_NAME] --stack [STUDIO/STACK]

Parameters

OptionsDescriptionExample
NOME_INFRADefines the name of the Shared Infrastructure. If you don't provide the name, the value of the --remote option will be the Shared Infrastructure name.stk create infra my-infra-name
-s, --stackThe Stack that contains the list of Plugins of the infra type to be applied in your Shared Infrastructure. It should follow the pattern: <STUDIO>/<STACK>stk create infra my-infra-name --stack my-studio/my-stack
-r, --remote <git-url>Defines the URL of the remote Git repository that is used as the project source. If not informed, the remote repository will not be configured and you must do the process manually.stk create infra my-infra-name --remote my-git-repository-url
--<nome-input> <valor-input>Defines the values ​​of the Plugin's inputs through the terminal. To enter a value for more than one input, separate each input with a space. If the input is already filled in the Plugin file, only the value filled in the file will be considered and the value informed via flag will be disregarded.stk create infra infra-name --stack [STUDIO/STACK] --<input-name1> <input-value1> --<input-name2> <input-value2>.
i, --inputs-jsonAction input parameter in JSON format.--
-d, --descriptionDefines a description of your Shared Infrastructure and its purpose.stk create infra my-app-name --description "my infra description"
-ci, --connection-interfacesIt lists all Plugins’ required Connection Interfaces.stk create infra infra1287v6 -s cli-qa-studio/stack-de-teste --non-interactive --description "example" --resource "example2" -ci '{"cli-qa-studio/stack-de-teste/1287v1@0.0.2":[{"name":"my-com","type":"aws-eks-conn"}]}' --plugins "cli-qa-studio/test-stack/1287v1@0.0.2"
-p, --pluginsIt lists all Infra Plugins that can be used.Apply only one Infra Plugin:stk create infra --plugins <STUDIO>/<STACK>/<PLUGIN>@<VERSION> Example: stk create infra infra1287v5 -s cli-qa-studio/stack-de-teste --plugins "cli-qa-studio/stack-de-teste/1287v1@0.0.2". Apply multiple Infra Plugins: stk create infra --plugins <STUDIO>/<STACK>/<PLUGIN>@<VERSION>, STUDIO/STACK/PLUGIN@VERSION Example: stk create infra infra-x2 -s deploy-studio/new-deploy-stack --plugins "deploy-studio/new-deploy-stack/aws-rds-plugin@0.0.3,deploy-studio/new-deploy-stack/sqs-deploy@0.1.1".
-h, --helpDisplays the command help and exits.stk create infra --help

Examples:

Connection Interface syntax via input flag

stk create infra <INFRA_NAME> --stack <STUDIO/STACK> -ci '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'

Input flag filled in the command example

stk create infra my-infra --stack my-studio/my-stack -ci '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'

Example as more Plugins

stk create infra my-infra --stack my-studio/my-stack -ci '{"cli-studio/cli-stack/container-conn-plugin@0.0.1": [{"type": "ecs-task-conn", "name": "ecs-task-conn-inputs-envs"}], "cli-studio/cli-stack/ecs-cluster-fargate-plugin@0.0.2": [{"type": "ecs-cluster-fargate-conn", "name": "ecs-cluster-fargate-conn-inputs-envs"}], "cli-studio/cli-stack/aws-vpc-pluginn@0.0.3": [{"type": "aws-vpc-conn", "name": "aws-vpc-conn-inputs-envs"}, {"type": "aws-rds-conn", "name": "rds-inputs-envs"}], "cli-studio/cli-stack/aws-secret-manager-plugin@3.0.0": [{"type": "aws-secret-manager-conn", "name": "my-secret-manager"}]}'

stk register infra

The command stk register infra registers a Shared Infrastructure in your Workspace.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

stk register infra

Parameters

OptionsDescriptionExample
-r, --remoteDefines the URL of the remote Git repository that is used to host your Shared Infrastructure.stk register infra --remote https://github.com/my-git-repository-url
-bb, --base-branchYour Shared Infrastructure repository base branch namestk register infra --base-branch my-shared-infra-branch
-h, --helpDisplays the command help and exits.stk register infra --help

stk list infra

The command stk list infra displays in the terminal a list with all the Shared Infrastructures registered in your Workspace.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

stk list infra

Parameters

OptionsDescriptionExample
-h, --helpDisplays the command help and exits.stk list infra --help

stk deploy app

The command stk deploy app deploys your application to your Workspace Environment.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

stk deploy app

Parameters

OptionsDescriptionExample
-e, --envDefines the name of the Environment that will be used to deploy the application. Consult the Environments available in your Workspace through the stk list env command.stk deploy app --env qa
-d, --draftCreates a draft of the IAC (infrastructure as code) file that should be generated. When using the option --draft he deploy is not executed.stk deploy app --draft
-v, --versionDefines the version of the deploy tag. You must use the semantic versioning pattern. Example: "1.0.0"stk deploy app --version 1.0.0
--<nome-input> <valor-input>Defines the values ​​of the deploy inputs through the terminal. To enter a value for more than one input, separate each input with a space. In case the inputs are already defined for your deployment, only the defined values ​​will be considered and the values ​​informed via flag will be disregarded.stk deploy app --<input-name1> <input-value1> --<input-name2> <input-value2>.
-vv, --verboseIt shows more detaisl about deployment.stk deploy app --vv
-wut, --watch-unlimited-timeoutIt watches the deployment status every 5 seconds. It does that after the deployment ends.stk deploy app --wut
-h, --helpDisplays the command help and exits.stk deploy app --help

stk validate app

The command stk-validate app validates the structure of an application. To validate an application, run the command inside the application's folder.

The command will:

  • Validate the structure of your application;
  • Remove empty folders;
  • Ignore files and folders you don't want when you're done developing your application.
info

For the files skipped in the .gitignore file, the command will not validate these files.

At the end of the command execution, it displays a message with the inconsistencies and the validation result.

Use

stk validate app

Parameters

OptionsDescriptionExample
-v, --verboseOption to list the details of all analyzed, validated and ignored items in your application.stk validate app --verbose
-h, --helpDisplays the command help and exits.stk validate app --help

stk validate infra

The command stk-validate infra validates the structure of an infrastructure. To validate a backend, run the command inside the backend folder.

The command will:

  • Validate the structure of your infrastructure;
  • Remove empty folders;
  • Ignore files and folders you don't want when you're done developing your application.
info

For the files skipped in the .gitignore file, the command will not validate these files.

At the end of the command execution, it displays a message with the inconsistencies and the validation result.

Use

stk validate infra

Parameters

OptionsDescriptionExample
-v, --verboseOption to list details of all parsed, validated, and ignored items in your infrastructure.stk validate infra --verbose
-h, --helpDisplays the command help and exits.stk validate infra --help

stk deploy infra

The command stk deploy infra deploys your infrastructure to your Workspace Environment.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

stk deploy infra

Parameters

OptionsDescriptionExample
-e, --envDefines the name of the Environment that will be used to deploy the infrastructure. Consult the Environments available in your Workspace through the stk list env command.stk deploy infra --env qa
-d, --draftCreates a draft of IAC (infrastructure as code) files that can be viewed by the user. When using the option --draft the deploy is not executed.stk deploy infra --draft
-v, --versionDefines the version of the deploy tag. You must use the semantic versioning pattern. Example: "1.0.0"stk deploy infra --version 1.0.0
--<nome-input> <valor-input>Defines the values ​​of the deploy inputs through the terminal. To enter a value for more than one input, separate each input with a space. In case the inputs are already defined for your deployment, only the defined values ​​will be considered and the values ​​informed via flag will be disregarded.stk deploy infra --<input-name1> <input-value1> --<input-name2> <input-value2>.
-vv, --verboseIt shows more detaisl about deployment.stk deploy infra --vv
-wut, --watch-unlimited-timeoutIt watches the deployment status every 5 seconds. It does that after the deployment ends.stk deploy infra --wut
-h, --helpDisplays the command help and exits.stk deploy infra --help

stk deploy status

The command stk deploy status monitors and displays the deployment status of your running application or infrastructure.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. If you have an active Workspace, access a Workspace with the stk use workspace command.

Use

stk deploy status [APP-OR-INFRA_ID]
info

The deploy ID is located in the stk.yaml file of the application or infrastructure. In the spec: field in the app-id or infra-id attributes.

Parameters

OptionsDescriptionExample
-w, --watchMonitors and displays the deployment status in the terminal every 5 seconds during the 60-second interval.stk deploy status 01GX4FNBBBVS53WN7N2KBCK6DM2 --watch
-h, --helpDisplays the command help and exits.stk deploy status --help

stk remove plugin

The command stk remove plugin removes Plugins from the manifest automatically. It can be interactive or not.

Before running the command you must:

  1. Log in to your Account with the stk login command.
  2. Run the command inside the Plugin app or infra folder.

Use

Syntax

stk remove plugin [PLUGIN_NAME/STACK_NAME/PLUGIN_VERSION]

Example

stk remove plugin deploy-studio/new-deploy-stack/sqs-deploy@0.0.9.
  • It is not mandatory to add the Plugin name in the command.
  • If you do not inform the Plugin name, the CLI searches the manifest for existing Plugins and shows all available options for removal.

Parameters

OptionsDescriptionExample
-q, --non-interactiveIt doesn't ask for input parameters if you don't provide any.stk remove plugin plugin-name/stack-name/plugin-version@1.0.9 --non-interactive
-c, --connectorInforms the connector name of a Plugin that will be removed, if there is a name conflict.stk remove plugin --connector aws-eks-conn

stk configure connection-interface

The command stk configure connection-interface makes it possible to edit the Connection Interface settings that are required when applying an app or infra Plugin.

  • The required Connection Interface must already be registered.

Use

Syntax

stk configure connection-interface [OPTIONS] [CONNECTION-INTERFACE]

You can configure the Connection Interfaces that appear in the Portal list.

Example

stk configure connection-interface <connection-interface> --plugin <studio-slug>/<stack-slug>/<plugin-slug>@<version> --new-value <connection-interface-name>

Parameters

OptionsDescriptionExample
-p, --pluginPlugin that configures: <studio>/<stack>/<plugin>@<version>stk configure connection-interface my-lambda-conn --plugin my-studio/my-stack/my-lambda-plugin@1.0.0
-nv, --new-valueInforms the name of the new Connection Interface.stk configure connection-interface my-lambda-conn --plugin my-studio/my-stack/my-lambda-plugin@1.0.0 --new-value my-new-lambda-conn

Was this page helpful?