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:
npm i -g @meltmedia/totem esbuildAvailable Commands
totem account bootstrap
Bootstraps an account using a specified repository.
Usage:
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:
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:
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:
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
synthmethod from the Totem app to synthesize the application.
Usage:
totem synthtotem 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 updatekey: 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:
totem secrets listtotem 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.