CLI Commands
hereya-cli
Section titled “hereya-cli”The package manager for infrastructure resources.
Installation
Section titled “Installation”$ npm install -g hereya-cli$ hereya COMMANDrunning command...$ hereya (--version)hereya-cli/0.57.1 linux-x64 node-v20.19.4$ hereya --help [COMMAND]USAGE $ hereya COMMAND...Commands
Section titled “Commands”hereya add PACKAGE
Section titled “hereya add PACKAGE”Add a package to the project.
USAGE $ hereya add PACKAGE [--chdir <value>] [--debug] [-p <value>...] [-w <value>]
ARGUMENTS PACKAGE The package to add, specified as a GitHub repository in the format owner/repository. To change the registry URL, set the HEREYA_REGISTRY_URL environment variable, so that it points to $HEREYA_REGISTRY_URL/owner/repository. For local packages, use the format local/path/to/package where path/to/package is the path to the package on your local machine.
FLAGS -p, --parameter=<value>... [default: ] parameter for the package, in the form of 'key=value'. Can be specified multiple times. -w, --workspace=<value> name of the workspace to add the package to (defaults to current workspace) --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode
DESCRIPTION Add a package to the project.
EXAMPLES $ hereya add cloudy/docker_postgreshereya bootstrap INFRASTRUCTURETYPE
Section titled “hereya bootstrap INFRASTRUCTURETYPE”Install necessary resources for hereya operations in an infrastructure.
USAGE $ hereya bootstrap INFRASTRUCTURETYPE [-f]
ARGUMENTS INFRASTRUCTURETYPE infrastructure to bootstrap. Options are local, aws
FLAGS -f, --force redeploy hereya resources if already deployed
DESCRIPTION Install necessary resources for hereya operations in an infrastructure.
EXAMPLES $ hereya bootstrap aws
$ hereya bootstrap localhereya config export-backend [FILE]
Section titled “hereya config export-backend [FILE]”Export the cloud backend configuration to a file
USAGE $ hereya config export-backend [FILE]
ARGUMENTS FILE Path to save the export file. Defaults to cloud-backend.json in current directory
DESCRIPTION Export the cloud backend configuration to a file
EXAMPLES $ hereya config export-backend
$ hereya config export-backend ./path/to/export.jsonhereya config get-backend
Section titled “hereya config get-backend”get the current backend type
USAGE $ hereya config get-backend
DESCRIPTION get the current backend type
EXAMPLES $ hereya config get-backendhereya config import-backend FILE
Section titled “hereya config import-backend FILE”Import a backend configuration from a file
USAGE $ hereya config import-backend FILE
ARGUMENTS FILE Path to the file containing the backend configuration to import
DESCRIPTION Import a backend configuration from a file
EXAMPLES $ hereya config import-backend ./path/to/cloud-backend.jsonhereya config use-backend TYPE
Section titled “hereya config use-backend TYPE”set the current backend type
USAGE $ hereya config use-backend TYPE
ARGUMENTS TYPE type of backend to use. Possible values: s3, local
DESCRIPTION set the current backend type
EXAMPLES $ hereya config use-backend s3
$ hereya config use-backend localhereya delete-state
Section titled “hereya delete-state”Delete the remote state of a project for a given workspace
USAGE $ hereya delete-state -w <value> [--chdir <value>]
FLAGS -w, --workspace=<value> (required) workspace name --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable.
DESCRIPTION Delete the remote state of a project for a given workspace
EXAMPLES $ hereya delete-state -w dev
$ hereya delete-state --workspace staginghereya deploy
Section titled “hereya deploy”Deploy a hereya project using the project deployment package
USAGE $ hereya deploy -w <value> [--chdir <value>] [--debug]
FLAGS -w, --workspace=<value> (required) name of the workspace to deploy the packages for --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode
DESCRIPTION Deploy a hereya project using the project deployment package
EXAMPLES $ hereya deployhereya doc PACKAGE
Section titled “hereya doc PACKAGE”Display documentation for a package from the registry
USAGE $ hereya doc PACKAGE [-C <value>] [-j] [--no-doc]
ARGUMENTS PACKAGE Package name with optional version (e.g., my-package or my-package@1.0.0)
FLAGS -j, --json Output in JSON format --no-doc Show only metadata without the full documentation
GLOBAL FLAGS -C, --chdir=<value> [default: .] directory to run command in
DESCRIPTION Display documentation for a package from the registry
EXAMPLES $ hereya doc my-package
$ hereya doc my-package@1.0.0
$ hereya doc my-package --json
$ hereya doc my-package --no-dochereya down
Section titled “hereya down”Destroy all packages in the project.
USAGE $ hereya down [--chdir <value>] [--debug] [--deploy] [-s <value>...] [-w <value>]
FLAGS -s, --select=<value>... [default: ] select the packages to destroy -w, --workspace=<value> name of the workspace to destroy the packages for --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode --deploy destroy deployment companion packages
DESCRIPTION Destroy all packages in the project.
EXAMPLES $ hereya downhereya env [NAME]
Section titled “hereya env [NAME]”Print project environment variables.
USAGE $ hereya env [NAME] [--chdir <value>] [-l] [-w <value>]
ARGUMENTS NAME name of the env to display
FLAGS -l, --list list only the env vars without values -w, --workspace=<value> name of the workspace to print the env vars for --chdir=<value> project root directory
DESCRIPTION Print project environment variables.
EXAMPLES $ hereya env
$ hereya env myEnv
$ hereya env -w dev
$ hereya env -w dev -lhereya env set [NAME]
Section titled “hereya env set [NAME]”Set an user-defined environment variable for the project
USAGE $ hereya env set [NAME] -v <value> [--chdir <value>] [-w <value>]
ARGUMENTS NAME name of the environment variable to set
FLAGS -v, --value=<value> (required) value of the environment variable -w, --workspace=<value> name of the workspace to print the env vars for --chdir=<value> project root directory
DESCRIPTION Set an user-defined environment variable for the project
EXAMPLES $ hereya env set FOO -v bar
$ hereya env set FOO -v bar -w devhereya flow add PACKAGE
Section titled “hereya flow add PACKAGE”Add a package to the project in a git branch-based workspace
USAGE $ hereya flow add PACKAGE [--chdir <value>] [--debug] [-p <value>...] [--profile <value>]
ARGUMENTS PACKAGE The package to add, specified as a GitHub repository in the format owner/repository. To change the registry URL, set the HEREYA_REGISTRY_URL environment variable, so that it points to $HEREYA_REGISTRY_URL/owner/repository. For local packages, use the format local/path/to/package where path/to/package is the path to the package on your local machine.
FLAGS -p, --parameter=<value>... [default: ] parameter for the package, in the form of 'key=value'. Can be specified multiple times. --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode --profile=<value> profile to use for the workspace (will be appended to workspace name)
DESCRIPTION Add a package to the project in a git branch-based workspace
EXAMPLES $ hereya flow add cloudy/docker_postgres
$ hereya flow add cloudy/docker_postgres --profile staging
$ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=adminhereya flow down
Section titled “hereya flow down”Create a git branch-based workspace and destroy all packages
USAGE $ hereya flow down [--chdir <value>] [--debug] [--deploy] [--pin] [--profile <value>] [-s <value>...]
FLAGS -s, --select=<value>... [default: ] select the packages to destroy --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode --deploy destroy deployment companion packages --pin append git commit SHA to workspace name for commit-specific isolation --profile=<value> profile to use for the workspace (will be appended to workspace name)
DESCRIPTION Create a git branch-based workspace and destroy all packages
EXAMPLES $ hereya flow down
$ hereya flow down --debug
$ hereya flow down --profile staging
$ hereya flow down --pinhereya flow env [NAME]
Section titled “hereya flow env [NAME]”Print project environment variables for a git branch-based workspace
USAGE $ hereya flow env [NAME] [--chdir <value>] [-l] [--pin] [--profile <value>]
ARGUMENTS NAME name of the env to display
FLAGS -l, --list list only the env vars without values --chdir=<value> project root directory --pin append git commit SHA to workspace name for commit-specific isolation --profile=<value> profile to use for the workspace (will be appended to workspace name)
DESCRIPTION Print project environment variables for a git branch-based workspace
EXAMPLES $ hereya flow env
$ hereya flow env myEnv
$ hereya flow env --profile staging
$ hereya flow env --pin
$ hereya flow env -lhereya flow remove PACKAGE
Section titled “hereya flow remove PACKAGE”Remove a package from the project in a git branch-based workspace
USAGE $ hereya flow remove PACKAGE [--chdir <value>] [--debug] [--profile <value>]
ARGUMENTS PACKAGE Remove a previously added package.
FLAGS --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode --profile=<value> profile to use for the workspace (will be appended to workspace name)
DESCRIPTION Remove a package from the project in a git branch-based workspace
EXAMPLES $ hereya flow remove cloudy/docker_postgres
$ hereya flow remove cloudy/docker_postgres --profile staginghereya flow run CMD
Section titled “hereya flow run CMD”Run a command with hereya env vars in a git branch-based workspace
USAGE $ hereya flow run CMD... [--chdir <value>] [--pin] [--profile <value>]
ARGUMENTS CMD... command to run
FLAGS --chdir=<value> directory to run command in --pin append git commit SHA to workspace name for commit-specific isolation --profile=<value> profile to use for the workspace (will be appended to workspace name)
DESCRIPTION Run a command with hereya env vars in a git branch-based workspace
EXAMPLES $ hereya flow run -- npm run dev
$ hereya flow run --profile staging -- node index.js
$ hereya flow run --pin -- npm testhereya flow up
Section titled “hereya flow up”Create a git branch-based workspace and provision all packages
USAGE $ hereya flow up [--chdir <value>] [--debug] [--deploy] [--pin] [--profile <value>] [-s <value>...]
FLAGS -s, --select=<value>... [default: ] select the packages to provision --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode --deploy provision deployment companion packages --pin append git commit SHA to workspace name for commit-specific isolation --profile=<value> profile to use for the workspace (will be appended to workspace name)
DESCRIPTION Create a git branch-based workspace and provision all packages
EXAMPLES $ hereya flow up
$ hereya flow up --debug
$ hereya flow up --profile staging
$ hereya flow up --pinhereya help [COMMAND]
Section titled “hereya help [COMMAND]”Display help for hereya.
USAGE $ hereya help [COMMAND...] [-n]
ARGUMENTS COMMAND... Command to show help for.
FLAGS -n, --nested-commands Include all nested commands in the output.
DESCRIPTION Display help for hereya.hereya import PACKAGE
Section titled “hereya import PACKAGE”Import a package resource into your project
USAGE $ hereya import PACKAGE -f <value> [--chdir <value>] [--debug] [-p <value>...] [-w <value>]
ARGUMENTS PACKAGE The package to import, specified as a GitHub repository in the format owner/repository. To change the registry URL, set the HEREYA_REGISTRY_URL environment variable, so that it points to $HEREYA_REGISTRY_URL/owner/repository. For local packages, use the format local/path/to/package where path/to/package is the path to the package on your local machine.
FLAGS -f, --stateFile=<value> (required) state file to use -p, --parameter=<value>... [default: ] parameters for the package, in the form of 'key=value'. Can be specified multiple times. -w, --workspace=<value> workspace to import into --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode
DESCRIPTION Import a package resource into your project
EXAMPLES $ hereya import hereya/my-package -f state.tfstate
$ hereya import org/my-package -f state.tfstate -w my-workspacehereya init PROJECT
Section titled “hereya init PROJECT”Initialize hereya in a project directory.
USAGE $ hereya init PROJECT -w <value> [--chdir <value>]
ARGUMENTS PROJECT project name
FLAGS -w, --workspace=<value> (required) workspace to set as default --chdir=<value> directory to run command in
DESCRIPTION Initialize hereya in a project directory.
EXAMPLES $ hereya init myProject -w=defaultWorkspace
$ hereya init myProject -w=defaultWorkspace --chdir=./myProjecthereya login [URL]
Section titled “hereya login [URL]”Login to Hereya Cloud
USAGE $ hereya login [URL] [-t <value>]
ARGUMENTS URL [default: https://cloud.hereya.dev] URL of the Hereya Cloud instance
FLAGS -t, --token=<value> Token to use for login
DESCRIPTION Login to Hereya Cloud
EXAMPLES $ hereya login
$ hereya login https://cloud.hereya.dev
$ hereya login --token=your-token
$ hereya login --token=your-token https://cloud.hereya.devhereya logout
Section titled “hereya logout”Logout from Hereya Cloud
USAGE $ hereya logout
DESCRIPTION Logout from Hereya Cloud
EXAMPLES $ hereya logouthereya publish
Section titled “hereya publish”Publish a package to the Hereya registry
USAGE $ hereya publish [--chdir <value>]
FLAGS --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory.
DESCRIPTION Publish a package to the Hereya registry
EXAMPLES $ hereya publish
$ hereya publish --chdir=/path/to/packagehereya remove PACKAGE
Section titled “hereya remove PACKAGE”Remove a package from the project.
USAGE $ hereya remove PACKAGE [--chdir <value>] [--debug] [-w <value>]
ARGUMENTS PACKAGE Remove a previously added package.
FLAGS -w, --workspace=<value> name of the workspace to remove the package from (defaults to current workspace) --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode
DESCRIPTION Remove a package from the project.
EXAMPLES $ hereya remove cloudy/docker_postgreshereya run CMD
Section titled “hereya run CMD”Run a command with hereya env vars.
USAGE $ hereya run CMD... [--chdir <value>] [-w <value>]
ARGUMENTS CMD... command to run
FLAGS -w, --workspace=<value> name of the workspace to run the command in --chdir=<value> directory to run command in
DESCRIPTION Run a command with hereya env vars.
EXAMPLES $ hereya run -- npm run dev
$ hereya run -w uat -- node index.jshereya unbootstrap INFRASTRUCTURETYPE
Section titled “hereya unbootstrap INFRASTRUCTURETYPE”Uninstall hereya resources deployed with bootstrap command.
USAGE $ hereya unbootstrap INFRASTRUCTURETYPE [-f]
ARGUMENTS INFRASTRUCTURETYPE infrastructure to unbootstrap. Options are local, aws
FLAGS -f, --force try to delete hereya resources even if not deployed
DESCRIPTION Uninstall hereya resources deployed with bootstrap command.
EXAMPLES $ hereya unbootstrap aws
$ hereya unbootstrap localhereya undeploy
Section titled “hereya undeploy”Undeploy a hereya project by removing all resources.
USAGE $ hereya undeploy -w <value> [--chdir <value>] [--debug]
FLAGS -w, --workspace=<value> (required) name of the workspace to undeploy the packages for --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode
DESCRIPTION Undeploy a hereya project by removing all resources.
EXAMPLES $ hereya undeployhereya up
Section titled “hereya up”Provision all packages in the project.
USAGE $ hereya up [--chdir <value>] [--debug] [--deploy] [-s <value>...] [-w <value>]
FLAGS -s, --select=<value>... [default: ] select the packages to provision -w, --workspace=<value> name of the workspace to install the packages for --chdir=<value> Directory where the command will be executed. If not specified, it defaults to the current working directory. Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable. --debug enable debug mode --deploy provision deployment companion packages
DESCRIPTION Provision all packages in the project.
EXAMPLES $ hereya uphereya workspace create NAME
Section titled “hereya workspace create NAME”Create a new workspace if it does not exist.
USAGE $ hereya workspace create NAME [-d] [--mirror <value>] [--profile <value>]
ARGUMENTS NAME name of the workspace to create
FLAGS -d, --deployment mark workspace as a deployment workspace --mirror=<value> workspace to mirror --profile=<value> workspace profile to set (cloud backend only)
DESCRIPTION Create a new workspace if it does not exist.
EXAMPLES $ hereya workspace create devhereya workspace delete NAME
Section titled “hereya workspace delete NAME”Delete a workspace if it exists.
USAGE $ hereya workspace delete NAME
ARGUMENTS NAME name of the workspace to delete
DESCRIPTION Delete a workspace if it exists.
EXAMPLES $ hereya workspace delete devhereya workspace env [NAME]
Section titled “hereya workspace env [NAME]”Print workspace env vars.
USAGE $ hereya workspace env [NAME] -w <value> [-l]
ARGUMENTS NAME name of the env to display
FLAGS -l, --list list only the env vars without values -w, --workspace=<value> (required) name of the workspace to print env vars for
DESCRIPTION Print workspace env vars.
EXAMPLES $ hereya workspace env -w dev
$ hereya workspace env myEnv -w devhereya workspace env set
Section titled “hereya workspace env set”set an env var for a workspace
USAGE $ hereya workspace env set -i <value> -n <value> -v <value> -w <value> [-s]
FLAGS -i, --infra=<value> (required) the infrastructure to store the env var in -n, --name=<value> (required) name of the env var to set -s, --sensitive whether the env var is sensitive -v, --value=<value> (required) value of the env var to set -w, --workspace=<value> (required) name of the workspace to set an env var for
DESCRIPTION set an env var for a workspace
EXAMPLES $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -shereya workspace env unset
Section titled “hereya workspace env unset”unset an env var for a workspace
USAGE $ hereya workspace env unset -n <value> -w <value>
FLAGS -n, --name=<value> (required) name of the env var to unset -w, --workspace=<value> (required) name of the workspace to unset an env var for
DESCRIPTION unset an env var for a workspace
EXAMPLES $ hereya workspace env unset -w my-workspace -n myVarhereya workspace install PACKAGE
Section titled “hereya workspace install PACKAGE”Add a package to the workspace.
USAGE $ hereya workspace install PACKAGE -w <value> [--debug] [-p <value>...] [-f <value>]
ARGUMENTS PACKAGE The package to add. Packages are gitHub repositories. Use the format owner/repository
FLAGS -f, --parameter-file=<value> path to a file containing parameters for the package -p, --parameter=<value>... [default: ] parameter for the package, in the form of 'key=value'. Can be specified multiple times. -w, --workspace=<value> (required) name of the workspace to add the package to --debug enable debug mode
DESCRIPTION Add a package to the workspace.
EXAMPLES $ hereya workspace install hereya/aws-cognitohereya workspace list
Section titled “hereya workspace list”List workspaces.
USAGE $ hereya workspace list
DESCRIPTION List workspaces.
EXAMPLES $ hereya workspace listhereya workspace set-profile PROFILE
Section titled “hereya workspace set-profile PROFILE”Set AWS profile and deployment status for a workspace (cloud backend only).
USAGE $ hereya workspace set-profile PROFILE -w <value> [-d]
ARGUMENTS PROFILE AWS profile name to set for the workspace
FLAGS -d, --[no-]deployment mark workspace as a deployment workspace (use --no-deployment to unset) -w, --workspace=<value> (required) workspace name
DESCRIPTION Set AWS profile and deployment status for a workspace (cloud backend only).
EXAMPLES $ hereya workspace set-profile prod-profile -w productionhereya workspace uninstall PACKAGE
Section titled “hereya workspace uninstall PACKAGE”Remove a package from a workspace.
USAGE $ hereya workspace uninstall PACKAGE -w <value> [--debug] [-p <value>...] [-f <value>]
ARGUMENTS PACKAGE The package to remove. Packages are gitHub repositories. Use the format owner/repository
FLAGS -f, --parameter-file=<value> path to a file containing parameters for the package -p, --parameter=<value>... [default: ] parameter for the package, in the form of 'key=value'. Can be specified multiple times. -w, --workspace=<value> (required) name of the workspace to remove the package from --debug enable debug mode
DESCRIPTION Remove a package from a workspace.
EXAMPLES $ hereya workspace uninstall hereya/aws-cognito