Command Reference

Environment Management

state activate

Activate a project

Usage

state activate [flags] <ORG/PROJECT>

Arguments

  • <ORG/PROJECT> (optional) The namespace of the project that you wish to activate

Flags

  • --path Where to install the project
  • --command, -c Run given command in the activated shell
  • --replace Replace project url for this project.
  • --default Configures the project to be the global default project
  • --branch Defines the branch to be used

state deploy

Deploys the given runtime environment on the local system. Deploy sets up the language so you can run it from any shell environment that matches the current shell, overriding any conflicting installations. You can run individual deploy steps by running the sub-commands, which is useful if you’re preparing docker images, CI environments, or the like. If you’re setting up a local development environment you probably won’t need the sub-commands.

Usage

state deploy [flags] <ORG/PROJECT>

Arguments

  • <ORG/PROJECT> The namespace of the project that you wish to deploy

Flags

  • --path The path to deploy the runtime installation files to. This directory will not be affected by ‘state clean’
  • --force Overwrites any existing files / configurations.

state deploy configure

Configure the runtime environment for your current shell (must have ran install first or this will err)

Usage

state deploy configure [flags] <ORG/PROJECT>

Arguments

  • <ORG/PROJECT> The namespace of the project that you wish to deploy

Flags

  • --path The path to deploy the runtime installation files to. This directory will not be affected by ‘state clean’

state deploy install

Only install the runtime environment files, but do not configure it in any way (effectively caches the runtime environment)

Usage

state deploy install [flags] <ORG/PROJECT>

Arguments

  • <ORG/PROJECT> The namespace of the project that you wish to deploy

Flags

  • --path The path to deploy the runtime installation files to. This directory will not be affected by ‘state clean’

state deploy report

Reports information about the deployed runtime environment, useful for further manual setup (must have ran install first or this will err)

Usage

state deploy report [flags] <ORG/PROJECT>

Arguments

  • <ORG/PROJECT> The namespace of the project that you wish to deploy

Flags

  • --path The path to deploy the runtime installation files to. This directory will not be affected by ‘state clean’

Symlink the executables to your PATH and to the target directory (must have ran install first or this will err)

Usage

state deploy symlink [flags] <ORG/PROJECT>

Arguments

  • <ORG/PROJECT> The namespace of the project that you wish to deploy

Flags

  • --path The path to deploy the runtime installation files to. This directory will not be affected by ‘state clean’
  • --force Overwrites any existing files / configurations.

state init

Initialize a new project

Usage

state init [flags] <ORG/PROJECT> <Language[@version]>

Arguments

  • <ORG/PROJECT> The namespace for the project that you wish to initialize
  • <Language[@version]> (optional) The language that this project should use, and optionally the version of that language

Flags

  • --path Where to initialize the project
  • --skeleton The activestate.yaml template to use with project file creation. Accepts: base, editor
  • --language
  • --private Create a private project

state projects

Manage your projects

Usage

state projects 

state projects remote

Manage all projects, including ones you have not checked out locally

Usage

state projects remote 

state run

Run your project scripts

Usage

state run  <script>

Arguments

  • <script> (optional) Name of script to run

state show

Show information about a project

Usage

state show  <remote>

Arguments

  • <remote> (optional) Namespace of remote project

Package Management

state bundles

Manage bundles used in your project

Usage

state bundles [flags]

Flags

  • --commit The commit that the listing should be based on
  • --bundle The filter for the bundles names to include in the listing
  • --namespace The namespace bundles should be listed from

state bundles install

Add a new bundle to your project

Usage

state bundles install  <name[@version]>

Arguments

  • <name[@version]> Bundle name and optionally the desired version

Search for all available bundles that can be added to your project

Usage

state bundles search [flags] <name>

Arguments

  • <name> Bundle name

Flags

  • --language The language used to constrain search results
  • --exact-term Ensure that search results match search term exactly

state bundles uninstall

Remove bundle from your project

Usage

state bundles uninstall  <name>

Arguments

  • <name> Bundle name

state import

Import packages from a list of dependencies

Usage

state import [flags] <File>

Arguments

  • <File> The file to import

Flags

  • --force Run import operation without prompts

state info

Display information for the specified package

Usage

state info [flags] <name[@version]>

Arguments

  • <name[@version]> Package name and optionally the desired version

Flags

  • --language The language used to constrain package information selection

state install

Add a new package to your project

Usage

state install  <name[@version]>

Arguments

  • <name[@version]> Package name and optionally the desired version

state packages

Manage packages used in your project

Usage

state packages [flags]

Flags

  • --commit The commit that the listing should be based on
  • --package The filter for package names to include in the listing
  • --namespace The namespace packages should be listed from

Search for available packages that can be added to your project

Usage

state search [flags] <name>

Arguments

  • <name> Package name

Flags

  • --language The language used to constrain search results
  • --exact-term Ensures that search results match search term exactly

state uninstall

Remove a package from your project

Usage

state uninstall  <name>

Arguments

  • <name> Package name

Platform

state auth

Authenticate against the ActiveState Platform

Usage

state auth [flags]

Flags

state auth logout

Logout

Usage

state auth logout 

state auth signup

Signup a new account

Usage

state auth signup 

state branch

Manage your project’s branches

Usage

state branch 

state branch switch

Switch to the given branch name

Usage

state branch switch  <switch>

Arguments

  • <switch> Branch to switch to

state cve

Show a summary of project vulnerabilities

Usage

state cve 

state cve report

Show a detailed report of project vulnerabilities

Usage

state cve report  <Organization/Project>

Arguments

  • <Organization/Project> (optional) The project for which the report is created

state invite

Invite new members to an organization

Usage

state invite [flags] <email1,[email2,..]>

Arguments

  • <email1,[email2,..]> Email addresses to send the invitations to

Flags

  • --organization Organization to invite to. If not set, invite to current project’s organization
  • --role Set user role to ‘member’ or ‘owner’. If not set, prompt for the role

state languages

View the languages of a project

Usage

state languages 

state languages install

Update the language of a project

Usage

state languages install  <language>

Arguments

  • <language> The language to update in the form of @

state organizations

List member organizations on the ActiveState Platform

Usage

state organizations 

state platforms

Manage platforms used in your project

Usage

state platforms 

state platforms add

Add a new platform to your project

Usage

state platforms add [flags] <name>

Arguments

  • <name> Name[@]

Flags

  • --bit-width Platform architecture word size/width in bits (32,64)

state platforms remove

Remove a platform from your project

Usage

state platforms remove [flags] <name>

Arguments

  • <name> Name[@]

Flags

  • --bit-width Platform architecture word size/width in bits (32,64)

Search for available platforms that can be added to your project

Usage

state platforms search 

state secrets

Manage your secrets

Usage

state secrets [flags]

Flags

  • --filter-usedby Show only secrets that match the given filter. The filter value is the config path that you want to see secrets for, eg. constants.foo, scripts.foo, secrets.project.foo, etc.

state secrets get

Get the value of a secret

Usage

state secrets get  <namespace>

Arguments

  • <namespace> Namespace of secret is ‘SCOPE.NAME’. eg. ‘user.mySecret’ or ‘project.ourSecret’

state secrets set

Set the value of a secret

Usage

state secrets set  <namespace> <secret-value>

Arguments

  • <namespace> Namespace of secret is ‘SCOPE.NAME. eg. ‘user.mySecret’ or ‘project.ourSecret’
  • <secret-value> Value of unencrypted Secret

state secrets sync

Synchronize your shareable secrets to everyone in the organization for the current project

Usage

state secrets sync 

Version Control

state fork

Fork an existing ActiveState Platform project

Usage

state fork [flags] <ORG/PROJECT>

Arguments

  • <ORG/PROJECT> The namespace of the project to be forked

Flags

  • --org The organization to fork the project to
  • --name The name of the new project to be created
  • --private Denotes if the forked project will be private

state history

View history of the active or given project

Usage

state history [flags]

Flags

  • --namespace The namespace to view the history for (owner/name)

state pull

Pull in the latest version of your project from the ActiveState Platform

Usage

state pull [flags]

Flags

  • --force Force pulling specified project even if it is unrelated to checked out one
  • --set-project project even if it is unrelated to checked out one

state push

Push your latest changes to the platform

Usage

state push  <name>

Arguments

  • <name> (optional) The project name to push a headless commit to.

state revert

Revert a commit

Usage

state revert  <commit-id>

Arguments

  • <commit-id> The commit ID to revert to

Automation

state events

Manage project events

Usage

state events 

state events log

View a log of events

Usage

state events log [flags]

Flags

  • --follow, -f Don’t stop when end of file is reached, wait for additional data.

state scripts

Show project scripts

Usage

state scripts 

state scripts edit

Edit a given script

Usage

state scripts edit [flags] <name>

Arguments

  • <name> The name of the script to be edited

Flags

  • --expand, -e Whether or not to expand constants within the script

Utilities

state clean

Clean caches, configuration files, or completely remove the state tool

Usage

state clean 

state clean cache

Removes cached Runtime Environments

Usage

state clean cache [flags] <project>

Arguments

  • <project> (optional) The project to be removed from the local cache. Must be in the format of /

Flags

  • --force, -f Run clean cache operation without prompts

state clean config

Removes global State Tool configuration. Project configuration will not be affected.

Usage

state clean config [flags]

Flags

  • --force, -f flag_state_config_cache_force_description

state clean uninstall

Remove the State Tool, installed languages, and any configuration files

Usage

state clean uninstall [flags]

Flags

  • --force, -f Run uninstall operation without prompts

state export

Print information based on the provided subcommand

Usage

state export 

state export config

Export state tool configurations

Usage

state export config [flags]

Flags

  • --filter Filter configuration output. Accepts: dir

state export github-actions

Create a github action workflow for your project

Usage

state export github-actions 

state export jwt

Print jwt credentials

Usage

state export jwt 

state export new-api-key

Create and print new API key

Usage

state export new-api-key  <name>

Arguments

  • <name> API key name

state export private-key

Exports the private key, useful if you want to set it via environment variable (ACTIVESTATE_PRIVATE_KEY)

Usage

state export private-key 

state export recipe

Print json formatted recipe data

Usage

state export recipe [flags] <commitID>

Arguments

  • <commitID> (optional) Sets target commit by ID (default: current commit)

Flags

  • --pretty Enables export format beautification
  • --platform, -p Sets target platform

state update

Updates the State Tool to the latest available version

Usage

state update [flags]

Flags

  • --set-channel Switches to the given update channel, eg. ‘release’.

state update lock

Lock the State Tool at the current version, this disables automatic updates.

Usage

state update lock [flags]

Flags

  • --set-channel Switches to the given update channel, eg. ‘release’.
  • --force Automatically confirm that you would like to update the State Tool version that your project is locked to.