Skip to content

CLI Docs ​

TIP

To install and configure the Nullstone CLI, visit the setup documentation here.

Cheat sheet and reference for the Nullstone CLI.

This document contains a list of all the commands available in the Nullstone CLI along with:

  • descriptions
  • when to use them
  • examples
  • options

apply ​

Runs a Terraform apply on the given block and environment. This is useful for making ad-hoc changes to your infrastructure. This plan will be executed by the Nullstone system. In order to run a plan locally, check out the nullstone workspaces select command. Be sure to run nullstone plan first to see what changes will be made.

Usage ​

shell
$ nullstone apply [--stack=<stack-name>] --block=<block-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--blockName of the block to use for this operationrequired
--envName of the environment to use for this operationrequired
--wait, -wWait for the apply to complete and stream the Terraform logs to the console.
--auto-approveSkip any approvals and apply the changes immediately. This requires proper permissions in the stack.
--varSet variables values for the apply. This can be used to override variables defined in the module.
--module-versionThe version of the module to apply. When used with --publish, this specifies the version to publish (supports semver, next-patch, and next-build).
--publishPackage and publish the module in the current directory before running the apply. Uses next-build for the version by default, or the value of --module-version if specified.
--ifOnly create the run when the condition is met. Supported: any-changes (skip if there are no unapplied workspace changes).

apps list ​

Shows a list of the applications that you have access to. Set the --detail flag to show more details about each application.

Usage ​

shell
$ nullstone apps list

Options ​

OptionDescription
--detail, -dUse this flag to show the details for each application

apps capabilities ​

Usage ​

shell
$ nullstone apps capabilities [subcommand]

apps capabilities list ​

Shows a list of capabilities for the given app. If --env is specified, lists capabilities for the app workspace. Otherwise, lists capabilities from the app's workspace template.

Usage ​

shell
$ nullstone apps capabilities list --stack=<stack> --app=<app> [--env=<env>]

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--appName of the app to use for this operationrequired
--envName of the environment to use for this operation
--detail, -dUse this flag to show more details about each capability

apps capabilities create ​

Adds a capability to an app. If --env is specified, adds the capability to that environment workspace. Otherwise, adds the capability to the app's workspace template.

Usage ​

shell
$ nullstone apps capabilities create --stack=<stack> --app=<app> [--env=<env>] --module=<module> [--connection=<connection>...]

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--appName of the app to use for this operationrequired
--envName of the environment to use for this operation
--nameSpecify the name of the capability to create.required
--moduleSpecify the unique name of the module to use for this capability. Example: nullstone/aws-s3-accessrequired
--connectionSpecify any connections that this capability will have to other blocks. Use the connection name as the key, and the connected block name as the value. Example: --connection network=network0

apps capabilities remove ​

Removes a capability from an app. If --env is specified, removes the capability from that environment workspace. Otherwise, removes the capability from the app's workspace template.

Usage ​

shell
$ nullstone apps capabilities remove --stack=<stack> --app=<app> [--env=<env>] --name=<capability-name>

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--appName of the app to use for this operationrequired
--envName of the environment to use for this operation
--nameThe name of the capability to removerequired

blocks list ​

Shows a list of the blocks for the given stack. Set the --detail flag to show more details about each block.

Usage ​

shell
$ nullstone blocks list --stack=<stack>

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--detail, -dUse this flag to show more details about each block

blocks new ​

Creates a new block with the given name and module. If the module has any connections, you can specify them using the --connection parameter.

Usage ​

shell
$ nullstone blocks new --name=<name> --stack=<stack> --module=<module> [--connection=<connection>...]

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--nameProvide a name for this new blockrequired
--moduleSpecify the unique name of the module to use for this block. Example: nullstone/aws-networkrequired
--connectionSpecify any connections that this block will have to other blocks. Use the connection name as the key, and the connected block name as the value. Example: --connection network=network0
--dns-templateSpecify a template for the dns name portion of the subdomain.This is a template that allows you to add "{{ NULLSTONE_ENV }}" and "{{ NULLSTONE_ORG }}" in template.In production, the "{{ NULLSTONE_ENV }}" will be omitted to create a vanity subdomain.Nullstone will interpolate the template to create a subdomain: "dns-name.domain-name".If you want to create a ".nullstone.app" subdomain using an "autogen" or "nullstone-subdomain" module, set this to "{{ random() }}".For a subdomain on your custom domain, set this to something like "api.{{ NULLSTONE_ENV }}".- "dev" env = api.dev.example.com- "prod" env = api.example.com

configure ​

Establishes a profile and configures authentication for the CLI to use.

Usage ​

shell
$ nullstone configure --api-key=<api-key>

Options ​

OptionDescription
--addressSpecify the url for the Nullstone API.
--api-keyConfigure your personal API key that will be used to authenticate with the Nullstone API. You can generate an API key from your profile page.

deploy ​

Deploy a new version of your code for this application. This command works in tandem with the nullstone push command. This command deploys the artifacts that were uploaded during the push command.

Usage ​

shell
$ nullstone deploy [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operation
--versionProvide a label for your deployment. If not provided, it will default to the commit sha of the repo for the current directory.
--env-var, -eSet an additional environment variable on the app for this deployment in the form KEY=VALUE. Can be specified multiple times. Values may reference other --env-var values or standard env vars (e.g. NULLSTONE_VERSION) using {{ VAR }}, but cannot reference secrets. These env vars apply to this deployment only; a subsequent infra run or deploy may overwrite them.
--wait, -wWait for the deploy to complete and stream the logs to the console.

envs list ​

Shows a list of the environments for the given stack. Set the --detail flag to show more details about each environment. Filters are applied by the API. They can be combined: an environment must satisfy every flag given, and repeating --type widens the match.

Usage ​

shell
$ nullstone envs list --stack=<stack-name> [--type=<type>] [--tag KEY=VALUE] [--status=<status>] [--prod|--non-prod] [--name=<pattern>]

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--detail, -dUse this flag to show more details about each environment
--typeOnly show environments of this type: pipeline, preview, previews-shared, or global. Can be specified multiple times to show more than one type.
--tagOnly show environments whose tags match KEY=VALUE. Can be specified multiple times; an environment must match every tag given. An empty value (--tag claim=) matches environments where the tag is unset, absent, or empty, which is how you find environments that haven't been tagged yet. A bare key (--tag claim) matches environments that have the tag with any value.
--statusOnly show environments with this status: active (the default) or archived.
--prodOnly show production environments. Cannot be combined with --non-prod.
--non-prodOnly show non-production environments. Cannot be combined with --prod.
--nameOnly show environments matching this name, case-insensitively. A pattern containing * or ? is matched against the whole name (--name='pr-*'); anything else matches as a substring.

envs new ​

Creates a new environment in the given stack. If the --preview parameter is set, a preview environment will be created and the --provider parameter will not be used. Otherwise, a standard environment will be created as the last environment in the pipeline. Specify the provider, region, and zone to determine where infrastructure will be provisioned for this environment.

Usage ​

shell
$ nullstone envs new --name=<name> --stack=<stack> [--provider=<provider>] [--preview]

Options ​

OptionDescription
--nameProvide a name for this new environment. If creating a preview environment, we recommend branch`-`pull_request_id.required
--stackName of the stack to use for this operationrequired
--previewUse this flag to create a preview environment. If not set, a standard environment will be created.
--providerSelect the name of the provider to use for this environment. When creating a preview environment, this parameter will not be used.
--regionSelect which region to launch infrastructure for this environment. Defaults to us-east-1 for AWS and us-east1 for GCP.
--zoneFor GCP, select the zone to launch infrastructure for this environment. Defaults to us-east1b
--descriptionDescribe what this environment is for.
--tagSet a tag on the environment in the form KEY=VALUE. Can be specified multiple times. An empty value (--tag claim=) sets the tag to an empty string, which is not the same as removing it -- use --remove-tag for that.

envs update ​

Updates an existing environment. Only the attributes you pass are changed; everything else is left alone.

Tags are applied as a per-key patch, so --tag adds or updates a single key and --remove-tag deletes one, both without disturbing the environment's other tags. Setting a tag to an empty value (--tag claim=) keeps the key with an empty value, which is not the same as removing it.

Usage ​

shell
$ nullstone envs update --stack=<stack> --env=<env> [--name=<name>] [--description=<text>] [--tag KEY=VALUE] [--remove-tag KEY]

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired
--nameRename the environment.
--descriptionDescribe what this environment is for. Pass an empty value to clear it.
--prodMark this environment as production. Cannot be combined with --non-prod.
--non-prodMark this environment as non-production. Cannot be combined with --prod.
--tagSet a tag on the environment in the form KEY=VALUE. Can be specified multiple times. An empty value (--tag claim=) sets the tag to an empty string, which is not the same as removing it -- use --remove-tag for that.
--remove-tagRemove a tag from the environment by key. Can be specified multiple times. Removing a key that isn't set is not an error.

envs delete ​

Deletes the given environment. Before issuing this command, make sure you have destroyed all infrastructure in the environment. If you are deleting a preview environment, you can use the --force flag to skip the confirmation prompt.

Usage ​

shell
$ nullstone envs delete --stack=<stack> --env=<env>	[--force]

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired
--forceUse this flag to skip the confirmation prompt when deleting an environment.

envs up ​

Launches an entire environment including all of its apps. This command can be used to stand up an entire preview environment. This will only build/deploy apps that have auto-deploy enabled.

Usage ​

shell
$ nullstone envs up --stack=<stack> --env=<env>

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired

envs down ​

Destroys all infrastructure in an environment. This command is useful for tearing down preview environments once you are finished with them.

Usage ​

shell
$ nullstone envs down --stack=<stack> --env=<env>

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired

envs apps ​

View and modify the apps configured in a preview environment.

In a preview environment an app is "enabled" by being present in the environment's preview app set, so --disabled removes an app from the environment rather than writing a field.

Usage ​

shell
$ nullstone envs apps [subcommand]

envs apps list ​

Shows each app configured in the given preview environment, with the repo and the branch or pull request it tracks.

Usage ​

shell
$ nullstone envs apps list --stack=<stack> --env=<env>

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired

envs apps set ​

Updates every app already in the given preview environment that comes from --repo. Use --app to narrow to a single app. Apps from other repos are left untouched, and a --repo that matches nothing in the environment is an error rather than a no-op write.

Usage ​

shell
$ nullstone envs apps set --stack=<stack> --env=<env> --repo=<owner/name> [--branch=<branch>|--pull-request=<number>|--disabled]

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired
--repoSelect every app in this environment that comes from this repo, e.g. --repo=nullstone-io/nullstonerequired
--appName of the app to use for this operation
--branchTrack this branch. Cannot be combined with --pull-request; setting it clears any pull request.
--disabledRemove the matched apps from this environment instead of updating them.

exec ​

Executes a command on a container or the virtual machine for the given application. Defaults command to '/bin/sh' which acts as opening a shell to the running container or virtual machine.

Usage ​

shell
$ nullstone exec [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options] [command]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operationrequired
--instanceSelect a specific instance to execute the command against. This allows the user to decide which instance to connect. This is optional and by default will connect to a random instance. This is only used for workspaces that use VMs (e.g. Elastic Beanstalk, EC2 Instances, GCP VMs, Azure VMs, etc.).
--taskSelect a specific task to execute the command against. This is optional and by default will connect to a random task. This is only used by ECS and determines which task to connect.
--podSelect a pod to execute the command against. When specified, allows you to connect to a specific pod within a replica set. This is optional and will connect to a random pod by default. This is only used by Kubernetes clusters and determines which pod in the replica to connect.
--containerSelect a specific container within a task or pod. If using sidecars, this allows you to connect to other containers besides the primary application container.

iac test ​

Test the current repository's IaC files against a Nullstone stack.

Usage ​

shell
$ nullstone iac test --stack=<stack> --env=<env>

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--envName of the environment to use for this operationrequired

iac generate ​

Generate IaC from a Nullstone stack for apps

Usage ​

shell
$ nullstone iac --stack=<stack> --env=<env> --app=<app>

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--envName of the environment to use for this operationrequired
--blockName of the block to use for this operation

iac sync ​

Sync IaC configuration to a Nullstone environment and optionally trigger infra updates.

Usage ​

shell
$ nullstone iac sync --stack=<stack> --env=<env> [--repo=<owner/name>] [--auto-plan] [--auto-apply] [--from-git] [--wait[=<dur>]]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--envName of the environment to use for this operationrequired
--repoSource repository that owns the synced blocks, as owner/name or a repository URL (e.g. --repo=nullstone-io/nullstone). Defaults to the origin remote of the current git repository.
--auto-planQueue an infra-update Run on each workspace where IaC changes are detected. The Run is left pending approval.
--auto-applyAuto-approve any infra-update Run created by the sync. Implies --auto-plan.
--from-gitForce the server to fetch IaC files from the connected GitHub repo at the resolved commit SHA. By default the local files (already discovered by this command) are submitted in the request payload.

launch ​

This command will first upload (push) an artifact containing the source for your application. Then it will deploy it to the given environment and tail the logs for the deployment.This command is the same as running nullstone push followed by nullstone deploy -w.

Usage ​

shell
$ nullstone launch [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operation
--sourceThe source artifact to push that contains your application's build. For a container, specify the name of the docker image to push. This follows the same syntax as 'docker push NAME[:TAG]'. For a serverless zip application, specify the .zip archive to push. For a static site, specify the directory to push.required
--versionProvide a label for your deployment. If not provided, it will default to the commit sha of the repo for the current directory.
--env-var, -eSet an additional environment variable on the app for this deployment in the form KEY=VALUE. Can be specified multiple times. Values may reference other --env-var values or standard env vars (e.g. NULLSTONE_VERSION) using {{ VAR }}, but cannot reference secrets. These env vars apply to this deployment only; a subsequent infra run or deploy may overwrite them.

logs ​

Streams an application's logs to the console for the given environment. Use the start-time -s and end-time -e flags to only show logs for a given time period. Use the tail flag -t to stream the logs in real time.

Usage ​

shell
$ nullstone logs [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operation
--start-time, -sEmit log events that occur after the specified start-time. This is a golang duration relative to the time the command is issued. Examples: '5s' (5 seconds ago), '1m' (1 minute ago), '24h' (24 hours ago)
--end-time, -eEmit log events that occur before the specified end-time. This is a golang duration relative to the time the command is issued. Examples: '5s' (5 seconds ago), '1m' (1 minute ago), '24h' (24 hours ago)
--intervalSet --interval to a golang duration to control how often to pull new log events. This will do nothing unless --tail is set. The default is '1s' (1 second).
--tail, -tSet tail to watch log events and emit as they are reported. Use --interval to control how often to query log events. This is off by default. Unless this option is provided, this command will exit as soon as current log events are emitted.
--podRestrict logs to a single pod by name (Kubernetes only).
--jobRestrict logs to a single Kubernetes job by name (adds job-name=value`` to the selector) or a single ECS task by ID.
--pod-template-hashRestrict logs to a single ReplicaSet revision (adds pod-template-hash=value`` to the selector).
--taskRestrict logs to a single ECS task by ID.
--deploymentRestrict logs to a single ECS deployment by ID; logs from all tasks under the deployment are included.

mcp-server ​

Start an MCP (Model Context Protocol) server that exposes Nullstone CLI commands as tools for AI assistants. Communicates over stdio.

Usage ​

shell
$ nullstone mcp-server

modules generate ​

Generates a nullstone manifest file for your module in the current directory. You will be asked a series of questions in order to collect the information needed to describe a Nullstone module. Optionally, you can also register the module in the Nullstone registry by passing the --register flag.

Usage ​

shell
$ nullstone modules generate [--register] [--manifest-only]

Options ​

OptionDescription
--registerRegister the module in the Nullstone registry after generating the manifest file.
--manifest-onlyOnly generate the module manifest file, do not register or generate Terraform.

modules list ​

Lists the modules owned by the current organization. Intended for module contributors managing their org's registry. To search the entire Nullstone registry (Nullstone-official, community, etc.), use nullstone modules find.

Usage ​

shell
$ nullstone modules list

Options ​

OptionDescription
--detailedUse this flag to show detailed information for each module
--nameFilter modules whose name contains this value
--categoryFilter modules by category. Known values: app, capability, datastore, ingress, subdomain, domain, cluster, cluster-namespace, network, block
--subcategoryFilter modules by subcategory. Known values — app: container, serverless, static-site, server; capability: ingress, datastores, secrets, sidecars, events, telemetry
--app-typeFilter app modules by app type. Known values: generic, packaged
--providerFilter modules by provider type. Known values: aws, gcp, azure
--platformFilter modules by platform
--subplatformFilter modules by subplatform

modules find ​

Search the entire Nullstone module registry across Nullstone-official, your org, and community modules. To list modules owned by your organization, use nullstone modules list. When --contributor is not specified, results include Nullstone-official and your organization's modules.

Usage ​

shell
$ nullstone modules find [--category=<category>] [--subcategory=<subcategory>] [--app-type=<app-type>] [--provider=<provider>] [--platform=<platform>] [--subplatform=<subplatform>] [--name=<name>] [--contributor=<contributor>]... [--format=table|json]

Options ​

OptionDescription
--categoryFilter modules by category. Known values: app, capability, datastore, ingress, subdomain, domain, cluster, cluster-namespace, network, block
--subcategoryFilter modules by subcategory. Requires --category. Known values — app: container, serverless, static-site, server; capability: ingress, datastores, secrets, sidecars, events, telemetry
--app-typeFilter app modules by app type. Known values: generic, packaged
--providerFilter modules by provider type. Known values: aws, gcp, azure
--platformFilter modules by platform
--subplatformFilter modules by subplatform. Requires --platform.
--nameFuzzy match modules by name
--contributorFilter by contributor. Repeat the flag to include multiple. Allowed values: nullstone-official, my-org, community. Defaults to nullstone-official,my-org.
--formatOutput format. One of: table (default), json

modules describe ​

Fetches metadata for a module and one of its versions. The positional argument accepts [<org>/]<name>[@<version>]. If the organization is omitted, the current organization is used. If a version is specified via @<version>, the --version flag must not also be set. When no version is provided, the latest published version is described.

Usage ​

shell
$ nullstone modules describe [<org>/]<name>[@<version>] [--version=<version>] [--format=json|pretty]

Options ​

OptionDescription
--version, -vModule version to describe. Defaults to the latest published version. Cannot be combined with @version`` in the positional argument.
--formatOutput format. One of: json (default), pretty

modules register ​

Registers a module in the Nullstone registry. The information in .nullstone/module.yml will be used as the details for the new module.

Usage ​

shell
$ nullstone modules register [--if=missing]

Options ​

OptionDescription
--ifOnly register when the condition is met. Supported: missing (skip when the module already exists).

modules publish ​

Publishes a new version for a module in the Nullstone registry. Provide a specific semver version using the --version parameter.

Usage ​

shell
$ nullstone modules publish --version=<version> [--if=checksum-changed]

Options ​

OptionDescription
--version, -vSpecify a semver version for the module.'next-patch': Uses a version that bumps the patch component of the latest module version.'next-build': Uses the latest version and appends +build using the short Git commit SHA. (Fails if not in a Git repository)required
--ifOnly publish when the condition is met. Supported: checksum-changed (skip when the packaged tarball matches the latest published version).
--includeSpecify additional file patterns to package. By default, this command includes *.tf, *.tf.tmpl, and 'README.md'. Use this flag to package additional modules and files needed for applies. This supports file globbing detailed at https://pkg.go.dev/path/filepath#Glob

modules package ​

Package all the module contents for a Nullstone module into a tarball but do not publish to the registry.

Usage ​

shell
$ nullstone modules package

Options ​

OptionDescription
--includeSpecify additional file patterns to package. By default, this command includes *.tf, *.tf.tmpl, and 'README.md'. Use this flag to package additional modules and files needed for applies. This supports file globbing detailed at https://pkg.go.dev/path/filepath#Glob

outputs ​

Print all the module outputs for a given block and environment. Provide the --sensitive flag to include sensitive outputs in the results. You must have proper permissions in order to use the --sensitive flag. For less information in an easier to read format, use the --plain flag. Use the --field flag to emit a single output value suitable for command substitution in scripts.

Usage ​

shell
$ nullstone outputs [--stack=<stack-name>] --block=<block-name> --env=<env-name> [--field=<expression>] [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--blockName of the block to use for this operationrequired
--envName of the environment to use for this operationrequired
--sensitiveInclude sensitive outputs in the results
--plainPrint less information about the outputs in a more readable format
--fieldPrint a single output value using Terraform-style syntax (e.g. instance_id, endpoint.host, hosts[0], hosts["item1"]). Strings print raw; other values print as compact JSON. Takes precedence over --plain.

plan ​

Run a plan for a given block and environment. This will automatically disapprove the plan and is useful for testing what a plan will do.

Usage ​

shell
$ nullstone plan [--stack=<stack-name>] --block=<block-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--blockName of the block to use for this operationrequired
--envName of the environment to use for this operationrequired
--wait, -wWait for the plan to complete and stream the Terraform logs to the console.
--varSet variables values for the plan. This can be used to override variables defined in the module.
--module-versionRun a plan with a specific version of the module.

preview-apps find ​

Searches a stack for preview apps matching a repo and pull request. This is used in CI to discover the preview environment created for a pull request without knowing the environment name up front. The results report the stack, environment, and application names, which can be fed into other commands such as nullstone wait and nullstone run. If no preview apps match, this command writes a message to stderr and exits with a non-zero status so CI can branch on the result.

Usage ​

shell
$ nullstone preview-apps find --stack=<stack-name> --repo=<repo> [--pull-request=<pull-request>] [--format=table|json]

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--repoFilter preview apps by repository. Accepts either the repo name (e.g. acme/widgets) or the full repo URL.required
--pull-requestFilter preview apps by pull request. Accepts either the pull request number (e.g. 123) or the Nullstone pull request id.
--formatOutput format. One of: table (default), json

profile ​

Usage ​

shell
$ nullstone profile

pull ​

Download (pull) an artifact containing the source for your application. --version is required to identify which artifact to pull.

Usage ​

shell
$ nullstone pull [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operationrequired
--versionProvide a label for your deployment. If not provided, it will default to the commit sha of the repo for the current directory.required

push ​

Upload (push) an artifact containing the source for your application. Specify a semver version to associate with the artifact. The version specified can be used in the deploy command to select this artifact. By default, this command does nothing if an artifact with the same version already exists. Use --unique to force push with a unique version.

Usage ​

shell
$ nullstone push [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operation
--sourceThe source artifact to push that contains your application's build. For a container, specify the name of the docker image to push. This follows the same syntax as 'docker push NAME[:TAG]'. For a serverless zip application, specify the .zip archive to push. For a static site, specify the directory to push.required
--versionProvide a label for your deployment. If not provided, it will default to the commit sha of the repo for the current directory.
--uniqueUse this to always push the artifact with a unique version. If the input version already exists, an incrementing -count`` suffix is added.

release ​

Make your infra and app code live through a single workflow. Nullstone runs an infra-update when there are outstanding workspace changes and a deploy for the resolved app version, picking the optimal, most reliable path.

Usage ​

shell
$ nullstone release [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operation
--versionProvide a label for your deployment. If not provided, it will default to the commit sha of the repo for the current directory.
--env-var, -eSet an additional environment variable on the app for this deployment in the form KEY=VALUE. Can be specified multiple times. Values may reference other --env-var values or standard env vars (e.g. NULLSTONE_VERSION) using {{ VAR }}, but cannot reference secrets. These env vars apply to this deployment only; a subsequent infra run or deploy may overwrite them.
--auto-approveSkip any approvals on the infra-update. This requires proper permissions in the stack.
--wait, -wWait for the release to complete and stream the logs to the console.

run ​

Starts a new container/serverless for the given Nullstone job/task.

Usage ​

shell
$ nullstone run [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options] [-- command [args...]]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operationrequired
--containerSelect a specific container within a task or pod. If using sidecars, this allows you to connect to other containers besides the primary application container.
--env-var, -ePass environment variables to the job/task. You can use this flag multiple times to specify multiple environment variables. For each environment variable, use NAME=value.This is supported for AWS ECS/Fargate jobs, GCP Cloud Run jobs, and Kubernetes jobs.This is not supported for AWS Lambda; a lambda function's environment variables are configured at deploy time.Use --payload to send input to a lambda function.
--payloadPass an input event to the function.Use '@filename' to read the payload from a file, or '-' to read the payload from stdin.The payload must be a valid JSON document.This is supported for AWS Lambda functions.

secrets list ​

Shows a list of secrets in the cloud platform that is configured for the given stack and environment.

Usage ​

shell
$ nullstone secrets list --stack=<stack-name> --env=<env-name>

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired

secrets create ​

Creates a new secret in the given stack and environment.

Usage ​

shell
$ nullstone secrets create --stack=<stack-name> --env=<env-name> --name=<secret-name> --value=<secret-value>

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired
--nameThe name of the secret to createrequired
--valueThe value of the secretrequired

secrets update ​

Updates an existing secret in the given stack and environment.

Usage ​

shell
$ nullstone secrets update --stack=<stack-name> --env=<env-name> --name=<secret-name> --value=<secret-value>

Use --value=- to read the secret value from stdin.

Options ​

OptionDescription
--stackName of the stack to use for this operationrequired
--envName of the environment to use for this operationrequired
--nameThe name of the secret to updaterequired
--valueThe new value of the secret. Use - to read from stdin.required

set-org ​

Most Nullstone CLI commands require a configured nullstone organization to operate. This command will set the organization for the current profile. If you wish to set the organization per command, use the global --org flag instead.

Usage ​

shell
$ nullstone set-org <org-name>

ssh ​

SSH into a running app container or virtual machine. Use the --forward, L option to forward ports from remote service or hosts.

Usage ​

shell
$ nullstone ssh [--stack=<stack-name>] --app=<app-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operationrequired
--instanceSelect a specific instance to execute the command against. This allows the user to decide which instance to connect. This is optional and by default will connect to a random instance. This is only used for workspaces that use VMs (e.g. Elastic Beanstalk, EC2 Instances, GCP VMs, Azure VMs, etc.).
--taskSelect a specific task to execute the command against. This is optional and by default will connect to a random task. This is only used by ECS and determines which task to connect.
--podSelect a pod to execute the command against. When specified, allows you to connect to a specific pod within a replica set. This is optional and will connect to a random pod by default. This is only used by Kubernetes clusters and determines which pod in the replica to connect.
--containerSelect a specific container within a task or pod. If using sidecars, this allows you to connect to other containers besides the primary application container.
--forward, -LUse this to forward ports from host to local machine. Format: local-port:[remote-host]:remote-port

stacks list ​

Shows a list of the stacks that you have access to. Set the --detail flag to show more details about each stack.

Usage ​

shell
$ nullstone stacks list

Options ​

OptionDescription
--detail, -dUse this flag to show more details about each stack

stacks new ​

Creates a new stack with the given name and in the organization configured for the CLI.

Usage ​

shell
$ nullstone stacks new --name=<name> --description=<description>

Options ​

OptionDescription
--nameThe name of the stack to create. This name must be unique within the organization.required
--descriptionThe description of the stack to create.required

status ​

View the status of your application and whether it is starting up, running, stopped, etc. This command shows the status of an application's tasks as well as the health of the load balancer.

Usage ​

shell
$ nullstone status [--stack=<stack-name>] --app=<app-name> [--env=<env-name>] [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--appName of the app to use for this operation
--envName of the environment to use for this operation
--versionProvide a label for your deployment. If not provided, it will default to the commit sha of the repo for the current directory.
--watch, -wPass this flag in order to watch status updates in real time. Changes will be automatically displayed as they occur.

up ​

Launches the infrastructure for the given block/environment and its dependencies.

Usage ​

shell
$ nullstone up [--stack=<stack-name>] --block=<block-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--blockName of the block to use for this operationrequired
--envName of the environment to use for this operationrequired
--wait, -wWait for the launch to complete and stream the Terraform logs to the console.
--varSet variables values for the plan. This can be used to override variables defined in the module.

version ​

Prints the version of the CLI.

Usage ​

shell
nullstone -v

wait ​

Waits for a workspace to reach a specific status. This is helpful to wait for infrastructure to provision or an app to deploy. Currently, this supports --for=launched to wait for a workspace to provision and --for=deployed to wait for an app to deploy successfully. In the future, we will add --for=destroyed.

Usage ​

shell
$ nullstone wait [--stack=<stack-name>] --block=<block-name> --env=<env-name> [options]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--blockName of the block to use for this operationrequired
--envName of the environment to use for this operationrequired
--forConfigure the wait command to reach a specific status. Currently this supports --for=launched and --for=deployed. In the future, we will support --for=destroyed
--timeoutSet --timeout to a golang duration to control how long to wait for a status before cancelling. The default is '1h' (1 hour).
--approval-timeoutSet --approval-timeout to a golang duration to control how long to wait for approval before cancelling. If the workspace run never reaches "needs-approval", this has no effect. The default is '15m' (15 minutes).

workspaces select ​

Sync a given workspace's state with the current directory. Running this command will allow you to run terraform plans/applies locally against the selected workspace.

Usage ​

shell
$ nullstone workspaces select [--stack=<stack>] --block=<block> --env=<env> [--config=<effective|latest|current>]

Options ​

OptionDescription
--stackScope this operation to a specific stack. This is only required if there are multiple blocks/apps with the same name.
--blockName of the block to use for this operationrequired
--envName of the environment to use for this operationrequired
--configWhich workspace configuration to sync locally. effective (default) is the latest configuration including unapplied changes queued in the Nullstone UI. latest is the last applied configuration; its run may still be in progress. current is the configuration from the last finished run.