Skip to content

Totem CLI (Legacy)

Totem has a command-line interface (CLI) to help you manage your Totem projects. This includes the ability to synthesize your application, handle various AWS account-related tasks, initialize configurations, and manage secrets.

Installation

To install the Totem CLI, you typically need to have Node.js (20+) and npm (Node Package Manager) installed on your machine. Run the following command to install Totem CLI globally:

Terminal window
npm i -g @meltmedia/totem esbuild

Available Commands

totem account bootstrap

Bootstraps an account using a specified repository.

Usage:

Terminal window
totem account bootstrap <org>/<repo> [options]

Parameters:

  • <org>/<repo>: The GitHub organization (<org>) and the repository name (<repo>) to grant access for each bootstrapped account.

Options:

  • --target <target-name>: Limit the account bootstrap to the specified target environment.
  • --profile <profile-name>: Specifies the AWS credentials profile to use. Defaults to the profile specified for each target.
  • --no-profile: Use AWS environment variables, not a profile, for authentication
  • --dry-run: Simulates the operation without making actual changes.

totem account info

Lists the details of each targets accounts bootstrap status and configuration.

Usage:

Terminal window
totem account info [options]

Options:

  • --target <target-name>: Limit the details to the specified target environment.
  • --profile <profile-name>: Specifies the AWS credentials profile to use. Defaults to the profile specified for each target.
  • --no-profile: Use AWS environment variables, not a profile, for authentication

totem account sync

Synchronize the CDK context for each target’s accounts

Usage:

Terminal window
totem account sync [options]

Options:

  • --target <target-name>: Limit the account sync to the specified target environment.
  • --profile <profile-name>: Specifies the AWS credentials profile to use. Defaults to the profile specified for each target.
  • --no-profile: Use AWS environment variables, not a profile, for authentication
  • --dry-run: Simulates the operation without making actual changes.

totem init app-registry

This command initializes the Totem project’s AppRegistry entries for all targets.

Usage:

Terminal window
totem init app-registry [options]

Options:

  • --profile <profile-name>: Specifies the AWS credentials profile to use. Defaults to the profile specified for each target.
  • --no-profile: Use AWS environment variables, not a profile, for authentication
  • --dry-run: Simulates the operation without making actual changes.

totem synth

This command invokes the synth method from the Totem app to synthesize the application.

Usage:

Terminal window
totem synth

totem secrets init

Initialize managed secrets, skipping existing secrets

Usage:

totem secrets init [options]

Options:

  • -b, --branches <branches...>: Only initialize the secrets for the specified branches
  • -s, --secrets <secrets...>: Only initialize the specified secrets
  • --profile <profile-name>: Specifies the AWS credentials profile to use.
  • --no-profile: Use AWS environment variables, not a profile, for authentication
  • --dry-run: Simulates the operation without making actual changes.
  • --no-prompt: Do not prompt for secret values, use placeholder values instead

totem secrets add-value

Add a new key/value pair to a managed secret

Usage:

totem secrets add-value [options] <secret-name> <key>

Arguments:

  • secret-name: Name of the secret to update
  • key: The key to add to the secret

Options:

  • -v, --value <value>: The secret value to set for the given key. Will prompt if not provided.
  • -b, --branches <branches...>: Only add the value to the specified branches
  • --profile <profile-name>: Specifies the AWS credentials profile to use.
  • --no-profile: Use AWS environment variables, not a profile, for authentication
  • --dry-run: Simulates the operation without making actual changes.
  • --force: Force update the secret value even if the existing value is not JSON

totem secrets list

Builds a list of the app’s configured secrets and prints them as JSON.

Usage:

Terminal window
totem secrets list

totem secrets clone

Clones the specified secret from the source branch to the destination branch.

Usage:

totem secrets clone <secretName> <srcBranch> <destBranch> [options]

Options:

  • --profile <profile-name>: Specifies the AWS credentials profile to use.
  • --no-profile: Use AWS environment variables, not a profile, for authentication
  • --dry-run: Simulates the operation without making actual changes.