Command Reference

Table of Contents

Environment Usage

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
  • --default Configures the project to always be available for use
  • --branch Defines the branch to be used

state exec

Intercept and run a script via a project runtime environment

Usage

state exec [flags]

Flags

  • --path The path of the project that you want to use the runtime environment of. If no path is given the current working directory is used.

state auth logout

Logout

Usage

state auth logout 

state auth signup

Signup a new account

Usage

state auth signup [flags]

Flags

  • --prompt Sign up via your terminal, rather than your web browser.

Project Usage

state projects

List your projects

Usage

state projects 

state projects remote

List 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> Name of script to run

Package Management

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 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

List 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

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 update unlock

Unlock the State Tool version for the current project.

Usage

state update unlock [flags]

Flags

  • --force Automatically confirm that you would like to remove the lock.

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 

state pull

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

Usage

state pull [flags]

Flags

  • --set-project Pull from the specified project instead of the checked out one

state push

Push your latest changes to the platform

Usage

state push  <org/project>

Arguments

  • <org/project> (optional) The project to push to (uses project under current dir otherwise).

state reset

Reset local checkout to a particular commit.

Usage

state reset  <CommitID>

Arguments

  • <CommitID> (optional) Reset to the given commit. If not specified, resets local checkout to be equal to the project on the platform

state clean cache

Removes cached Runtime Environments

Usage

state clean cache  <org/project>

Arguments

  • <org/project> (optional) The project to be removed from the local cache.

state clean config

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

Usage

state clean config [flags]

Flags

  • --force, -f Run clean config operation without prompts and ignoring any errors stopping running services

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 and ignoring any errors stopping running services

state revert

Revert a commit

Usage

state revert  <commit-id>

Arguments

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

Utilities

state clean

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

Usage

state clean 

state config

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

Usage

state config 

state config get

Print config values to the terminal

Usage

state config get  <key>

Arguments

  • <key> Config key

state export jwt

Print jwt credentials

Usage

state export jwt 

state export

Print information based on the provided subcommand

Usage

state export 

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.

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 config set

Set config values using the terminal

Usage

state config set  <key> <value>

Arguments

  • <key> Config key
  • <value> Config value

state learn

Read the State Tool cheat sheet to learn about common commands

Usage

state learn 

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’.

Environment Setup

state checkout (unstable)

Checkout the given project and setup its runtime

Usage

state checkout [flags] <org/project> <path>

Arguments

  • <org/project> The namespace of the project that you wish to checkout
  • <path> (optional) Where to checkout the project. If not given, the project is checked out to a sub-folder in the current working directory

Flags

  • --branch Defines the branch to checkout

state init (unstable)

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 switch (unstable)

Switch to a branch, commit, or tag

Usage

state switch  <identifier>

Arguments

  • <identifier> The commit or branch to switch to

Environment Usage

state use (unstable)

Use the given project runtime

Usage

state use  <org/project or project>

Arguments

  • <org/project or project> (optional) The fully qualified namespace (org/project) or just the project name (project) of the project to use. Must have been previously checked out using state checkout.

state scripts edit (unstable)

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

state bundles install (unstable)

Add a new bundle to your project

Usage

state bundles install  <name[@version]>

Arguments

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

state shell (unstable)

Starts a shell/prompt in a virtual environment for the given project runtime

Usage

state shell [flags] <org/project>

Arguments

  • <org/project> (optional) The namespace of the project you wish to start a virtual environment shell/prompt for, or just the project name if previously used

Flags

  • --cd Change to the project directory after starting virtual environment shell/prompt

state use reset (unstable)

Stop using your project runtime

Usage

state use reset 

state bundles search (unstable)

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 use show (unstable)

Show the project runtime you are using

Usage

state use show 

state branch switch (unstable)

Switch to the given branch name

Usage

state branch switch  <identifier>

Arguments

  • <identifier> The commit or branch to switch to

state bundles uninstall (unstable)

Remove bundle from your project

Usage

state bundles uninstall  <name>

Arguments

  • <name> Bundle name

Project Usage

state show (unstable)

Show information about a project

Usage

state show  <remote>

Arguments

  • <remote> (optional) Namespace of remote project

Package Management

state bundles (unstable)

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 info (unstable)

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 search (unstable)

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

Platform

state branch (unstable)

Manage your project’s branches

Usage

state branch 

state invite (unstable)

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 (unstable)

View the languages of a project

Usage

state languages 

state organizations (unstable)

List member organizations on the ActiveState Platform

Usage

state organizations 

state platforms add (unstable)

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 secrets get (unstable)

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 languages install (unstable)

Update the language of a project

Usage

state languages install  <language>

Arguments

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

state platforms (unstable)

Manage platforms used in your project

Usage

state platforms 

state secrets (unstable)

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 security (unstable)

Show a summary of project vulnerabilities

Usage

state security 

state events log (unstable)

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.

Automation

state events (unstable)

Manage project events

Usage

state events 

state scripts (unstable)

Show project scripts

Usage

state scripts 

state security open (unstable)

Open the given vulnerability details in your browser

Usage

state security open  <ID>

Arguments

  • <ID> (optional) The vulnerablility to open in your browser

state platforms remove (unstable)

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)

state security report (unstable)

Show a detailed report of project vulnerabilities

Usage

state security report  <org/project>

Arguments

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

state platforms search (unstable)

Search for available platforms that can be added to your project

Usage

state platforms search 

state secrets set (unstable)

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 (unstable)

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

Usage

state secrets sync