Skip to content

Command index

Every command runs as stacktape <command>, or stp <command> for short. stacktape help <command> prints a command's flags in the terminal. Each page below has the same flags, with examples.

Most commands work without a Stacktape account. Commands that act on a stack use your local AWS credentials. Commands marked (Console) need a Stacktape sign-in, from stacktape login or a STACKTAPE_API_KEY in CI.

Set up

  • init: Creates the Stacktape configuration for your project, or a new project from a starter, and guides you through the first deploy.
  • aws-profile create: Creates an AWS profile on your machine.
  • aws-profile list: Lists the AWS profiles on your machine.
  • aws-profile update: Updates an AWS profile.
  • aws-profile delete: Deletes an AWS profile.
  • defaults set: Sets default values for flags such as the region, stage and AWS profile.
  • defaults list: Prints the defaults you set.
  • domain add: Adds a registered domain to your AWS account, so Stacktape can manage its DNS records and certificates.
  • upgrade: Upgrades the CLI to the latest version.
  • version: Prints the installed CLI version.
  • help: Prints the commands, or the flags of one command.

Deploy and manage stacks

  • validate: Checks your configuration without deploying anything.
  • diff: Shows what a deploy would change in the stack.
  • synth: Prints the CloudFormation template your configuration produces.
  • package: Builds the deployment packages of your functions and containers.
  • deploy: Creates or updates a stage in your AWS account.
  • status (Console): Shows a deployed stack's URLs, outputs and resources.
  • stack list: Lists the stacks deployed in a region.
  • stack history (Console): Lists recent deploys and other operations with their result.
  • rollback: Returns the stack to a previous deployment version.
  • stack recover: Recovers a stack stuck in UPDATE_FAILED or UPDATE_ROLLBACK_FAILED.
  • stack update-modules: Updates the CloudFormation modules the stack uses.
  • deployment-script run: Runs a deployment script of the stack in AWS.
  • bucket sync: Mirrors a local directory into a bucket, removing files that no longer exist locally.
  • delete: Deletes a stage and its resources.

Develop locally

  • dev: Runs your app on your machine, connected to its resources.
  • dev stop: Stops a dev session started with dev --agent, and cleans up containers left by crashed sessions.
  • dev network: Shows the dev network of an AWS account and region.
  • dev network delete: Deletes the dev network of an AWS account and region.
  • script run: Runs a script from your configuration.

Secrets and parameters

  • secret set: Creates or updates a secret in AWS Secrets Manager.
  • secret get: Prints a secret's details, and its value only when you ask.
  • secret delete: Deletes a secret.
  • param get: Prints one parameter of a deployed resource, such as a URL or ARN.

Inspect and debug

  • logs: Prints and filters the logs of a deployed resource.
  • metrics: Prints CloudWatch metrics of a deployed resource.
  • alarm list: Lists the alarms of the stack and their state.
  • aws call: Runs a read-only AWS SDK call against the stack's resources.
  • container shell: Opens a shell inside a running container.
  • container exec: Runs one command in a running container and prints the output.
  • bastion shell: Opens a shell on the stack's bastion host.
  • bastion tunnel: Opens a tunnel from your machine to a private database or cache.
  • query sql: Runs a read-only SQL query against a relational database.
  • query dynamodb: Reads items and the schema of a DynamoDB table.
  • query redis: Reads keys, values and server info from a Redis cache.
  • query opensearch: Searches an OpenSearch domain.

Incidents and errors

  • incident list (Console): Lists incidents: downtime, failing checks, firing alarms and production errors.
  • incident show (Console): Prints everything known about one incident.
  • incident ack (Console): Marks an incident as being handled.
  • incident watch (Console): Waits until an incident recovers and stays recovered.
  • incident resolve (Console): Resolves an incident after you deployed and verified a fix.
  • error list (Console): Lists runtime errors from your functions and containers.
  • error resolve (Console): Marks an error as resolved. It reopens if the error comes back.
  • error ignore (Console): Ignores an error, so it does not reopen or alert.
  • error reopen (Console): Reopens a resolved or ignored error.

Console and account

  • login: Signs this machine in to Stacktape.
  • logout: Signs this machine out of Stacktape.
  • connect: Connects the AWS account of your local credentials to the Console, without redeploying anything.
  • whoami (Console): Shows your user, organization, connected AWS accounts and projects.
  • org list (Console): Lists the organizations you can access.
  • org create (Console): Creates an organization.
  • org delete (Console): Deletes the organization of your API key.
  • project list (Console): Lists projects with their stages, status and costs.
  • project create (Console): Creates a project.
  • project delete (Console): Deletes a project.
  • alarm export (Console): Prints alarm rules created in the Console as configuration you can paste.

Coding agents

  • mcp: Starts the Stacktape MCP server for coding agents.
  • mcp add: Registers the MCP server with Claude Code, Codex, Cursor, VS Code and other agents.
  • mcp remove: Removes the MCP server registration.
  • ai connect (Console): Connects your own AI subscription for the AI incident runs in the Console.
  • ai disconnect (Console): Removes an AI subscription you connected.