atlas-cli

FastDev and atlas-cli have been deprecated and are no longer available in Atlassian Plugin SDK 8.x and later versions. Please use Automatic Plugin Reinstallation with QuickReload instead.

This page describes the shell script atlas-cli, part of the Atlassian Plugin SDK.

Along with the plugin install (pi) command, this command allows you to install a plugin into a running Atlassian application, without having to restart the application. At the CLI prompt, you enter pi to install a plugin whenever you change its code.

Note that this mechanism is now incorporated in the user interface of Atlassian application as one of the developer tools. For more information, see Automatic Plugin Reinstallation with FastDev. If you want to avoid using FastDev but do want to use the command line mode as described here, add the following to the AMPS configuration in your project POM:

<useFastdevCli>false</useFastdevCli>

Basic usage

atlas-cli [options] - Starts up a command line interface to your plugin running in the host application. After you change the plugin code, enter pi at the CLI prompt to install the updated plugin in the Atlassian application. (Runs mvn amps:cli.) Interpreted parameters: http-port, context-path, server, cli-port.Available CLI commands:

  • pi -- Plugin install. Installs your updated plugin into the application.
  • quit, exit or bye -- Exits from the CLI.

Parameters

This shell script supports some interpreted parameters, specified below. All other parameters are passed straight through to Maven.

Explaining the table columns:

  • 'Full Parameter' and 'Shortened' - Some parameters allow you to choose a full or a shortened version of the parameter, others just support the full version.
  • 'Accepts a Value?' - 'Yes' means that you should specify a value in addition to the parameter, e.g. for the 'version' parameter you should specify the version number. 'No' means that the parameter does not accept a value.

Interpreted parameters:

Full Parameter

Description

--http-port

HTTP port for the servlet container, e.g. 1990. The defaults are as described in the SDK overview. You may need to change this if you already have a process listed for the default port, such as when you want to bring up two instances of Confluence.

Shortened: -p

--context-path

The application context path. You will need to include the leading forward slash. For example, if your application is running at localhost:1990/confluence then you should enter /confluence.

To run your application in the root web application context (eg. localhost:1990), then you should enter ROOT.

--server

Host name of the application server. The default is localhost.

--cli-port

The port the CLI will listen to for commands. The default is 4330. You may need to change this if you already have a process listed for this port.

All above accepts a value.

Getting help

The shell script will display some help text if you enter one of the following as the first argument:

  • -?
  • -h
  • help
  • -help
  • --help

For example:

1
2
atlas-cli -?
atlas-cli -help

Examples

Once you have done the initial atlas-create-APPLICATION-plugin and atlas-run, you can keep the application running in one command window and use the CLI (command line interface) to dynamically reinstall your plugin after each change.

  1. Make your changes in your IDE.
  2. Open a command window and go to the plugin's root folder (where the pom.xml is located).
  3. Run atlas-cli to start the CLI.
  4. Wait until you see a message, Waiting for commands.
  5. Run pi (plugin install) to compile, package and install the plugin.
  6. Go back to your browser. The updated plugin will have been installed into the application, and you can test your changes. (You may need to refresh the browser page first.)

Working with the SDK

Rate this page: