Last updatedNov 18, 2019

Rate this page:


When you call forge create, we automatically create three environments for you:

  • development
  • staging
  • production

Environments are where you deploy your app. Once an app is running in an environment, you can install it from that environment on to an Atlassian site with forge install.

We recommend using the development environment for testing your changes, staging for a stable version of your app, and production as the version of your app that’s ready for use. For the rest of this tutorial you’ll only use the development environment.

By default, the CLI will run commands for the development environment unless you specify another with the --environment flag.

Environment variables

Environment variables are key-value pairs you can set in each of your app environments (development, staging, production).

  • List your environment variables by running:
    forge variables:list
  • Set a variable with key my-key and value my-value by running:
    forge variables:set my-key my-value
    You can choose to encrypt the value. An encrypted value will not be shown when you list the variables.
  • Unset a variable with key my-key by running:
    forge variables:unset my-key
  • Read a variable with key my-key in your code as below:

Note, when tunneling you will need to set your environment variables locally with a prefix of FORGE_USER_VAR_.

Rate this page: