Before you begin your first quest, you'll need to make sure you've got all the tools required for the journey.
To get ready to use Forge, you’ll
For setup instructions, select your platform from the list below:
Install the Forge CLI using npm. You’ll install the CLI globally so that the commands can be run across your system.
Install the Forge CLI globally by running:
1 2npm install -g @forge/cli
Verify that the CLI is installed correctly by running:
1 2forge --version
You should see a version number reported in the terminal. If a version number is not shown then the installation failed. Repeat step 1 and look for errors reported in the terminal.
With the CLI installed, view the complete list of Forge commands by running forge --help
.
Create or use an existing Atlassian API token to log in to the CLI. The CLI uses your token when running commands.
Log in to the Forge CLI to start using Forge commands.
Do not use sudo
or root user when running forge
. Doing so may cause issues with file permissions and ownership,
potentially leading Forge CLI not functioning properly when run by a non-privileged user.
Start the process by running:
1 2forge login
You'll be asked whether to allow Forge to collect usage analytics data:
1 2Allow Forge to collect CLI usage and error reporting information?
Answering Yes
will allow Forge to collect data about your app's deployments and installations
(including error data). This, in turn, helps us monitor Forge's overall performance and reliability.
The collected data also helps us make better decisions on improving Forge's feature set and performance.
For information about how Atlassian collects and handles your data, read our Privacy Policy.
Enter the email address associated with your Atlassian account.
Enter your Atlassian API token. You copied this to the clipboard in step 5.
You will see a message similar to this confirming you are logged in:
1 2✔ Logged in as Adventurer Charlie
The Forge CLI uses your operating system's keychain to securely store your login details.
Any command after forge login
that requires authentication will read your credentials
from the keychain. When this occurs, your keychain may prompt you for access; approve it to allow the
CLI to run the command.
On Linux, you'll need libsecret
installed to perform this step.
To install and test your app, you'll need to create a test site for it. For Confluence and Jira apps, you need an Atlassian cloud developer site; for Bitbucket apps, you'll need a shared Bitbucket team space.
The Atlassian Marketplace doesn't currently support cross-product apps. If your app supports multiple products, you can publish two separate listings on the Marketplace, but your app won't be able to make API calls across different products and instances/installations.
Creating an Atlassian cloud developer site allows you to install and test your app with Confluence and Jira products set up for you. You can install your app to multiple Atlassian sites however, app data won't be shared between separate Atlassian sites, products, or Forge environments.
The limits on the numbers of users you can create are as follows:
Tunneling runs your app code locally on your machine via the Forge CLI and ngrok.
Forge tunnel uses ngrok to tunnel invocations. As ngrok does not support anonymous users, you need to set up your credentials before using tunnel command. If you don't have an ngrok account, sign up for one.
Once you have an ngrok account:
1 2version: 2 log_level: debug region: us authtoken: <your-ngrok-authtoken>
forge settings set ngrok-config-path <file>
.Now that you've set up your development environment, and a test site, it's time to review essential Forge knowledge.
Rate this page: