Atlassian Command Line Interface

Installation | Usage | Examples | Help text | Error handling | Release history
Name Atlassian CLI
Vendor Bob Swift and other contributors
Authors Bob Swift
Homepage http://confluence.atlassian.com/display/CODEGEIST/Atlassian+Command+Line+Interface
Issue Management http://developer.atlassian.com/jira/browse/JCLI
Continuous Integration n/a
Categories Remote Access
Most Recent Version 1.0.0
Availability Confluence v2.0 to v2.10
State Beta
Support Unsupported Plugins
License Freeware / Open Source (BSD)
Price Free
Release Docs http://confluence.atlassian.com/display/CODEGEIST/Atlassian+Command+Line+Interface
Java API Docs n/a
Download Source http://svn.atlassian.com/svn/public/contrib/common/tools/atlassian-cli/
Download JAR atlassian-cli-1.0.0-distribution.zip

Additional support information

JVM requirements
for client
Java 1.5

Additional information

Download statistics

Date 2008-Jun 2008-Jul 2008-Aug 2008-Sep 2008-Oct 2008-Nov 2008-Dec
Hits 10 7 12 5 6 3 1

Command line interface for Atlassian products

This is a command line interface (CLI) for remotely accessing Atlassian products. This provides a convenient way to automate administration tasks and content for Atlassian products. Examples are build and test automation or other business processes. This is a working command line client that can be used directly with your installation. This distribution makes it convenient to have a single installation to access all your Atlassian products. For each product, it is functionally equivalent to the individual product (at the same release level) as it is derived from the built individual products. If you only have one Atlassian product, you should just use the product specific CLI download.

All CLI tools have standard interfaces and implementations. They share common components that can be used to build additional CLI-like tools.

Product dependency

All tools are dependent on the products implementing remote interfaces for the capabilities needed remotely. Atlassian product enhancements may be needed before a specific capability can be exposed in the CLI. Raise product issues or vote for existing remote API enhancement requests.

Product Product CLI page Type CLI coverage
of available APIs
Remote API coverage
of product capability
Confluence Confluence Command Line Interface SOAP good good
JIRA JIRA Command Line Interface SOAP limited good
Bamboo Bamboo Command Line Interface REST good limited
Fisheye FishEye Command Line Interface REST good limited
Crucible Crucible Command Line Interface REST limited minimal
Crowd   SOAP none minimal
Crowd

The Crowd remote interfaces are primarily for authorization. Once the remote API is expanded to provide operational actions and information, Crowd CLI will be included in the suite of CLI products.

Installation

  • Unzip the distribution package and put the enclosed directory in a convenient location
  • Ensure the Remote API capability is enabled for any product you wish to access with the client.

Usage

  • On a command line, cd to the directory where you installed the client
  • On Windows
    • Run the product specific (confluence, jira, bamboo, fisheye) bat file
  • On Linux (or Windows)
    • Run java -jar release/<product>-cli-1.x.x.jar
  • This will show help text for the command line interface client
  • The client defaults to use a user of automation. Either add this user with all the authorities required to do the actions you want or specify a different user parameter
  • It is recommended that you open each product bat file with an editor and customize it for your environment by adding server, user, and password parameters. Follow the example in the comments and make sure you do not remove the %* at the end of the line.

Examples

Each CLI client had documented examples:

Help text

Each client comes with standard elp text displayed by the default command or using --help. This gives the precise definition of parameters. The product specific CLI pages have a copy of the online help. All follow standards and all have consistent parameters for cross product functions like action, server, user, password, file, ...

Tips
  • Use single dash for single letter parameters - example: -v
  • Use double dash for multi-letter parameter - example: --help
  • When parameters are specified, most need a value - example: --action addPage
  • Some parameters are flags (boolean) and must not be followed by a value - example: --verbose
  • Parameter names are case sensitive, but, action values are not - example: --userid is invalid but --action addpage is equivalent to --action addPage
  • Some parameters become required once a specific action is chosen. This is indicated in the help text for each value.
  • Some parameters have both short (one letter) and long (more than one letter) parameter names - example: -a or --action are the same
  • Some parameters have default values, if so, they are indicated below - example: (default: automation)
  • Some parameters are required - indicated by (...) - example: (-a|--action) <action>
  • Some parameters are optional - indicated by [CODEGEIST:...] - example: [(-f|CODEGEIST:--file) <file>]
  • Values that have more than one word must be enclosed by double quotes - example: --title "this is my title"

Error handling

Care is taken to return the appropriate exit codes to the command processor. This makes it possible do error handling in automation scripts. Error and error logging output is directed to standard error.

Error type Exit code Description
SUCCESS 0 Normal exit
CLIENT_EXCEPTION -1 The client has found a problem with the request and is reporting an error with a message.
PARAMETER_PROBLEM -2 The client processed the command parameters and found a syntax error or missing required parameters according to the parameter definition
REMOTE_EXCEPTION -3 The remote system has reported an error. The error message comes from the server.
FAILURE -99 The client program failed in an unexpected way.;

Release history

Version Date State License Price
Show description 1.0.0 (#1) 08 May 2008 Beta Freeware / Open Source (BSD) Free

Release Notes

Contributors

  • Bob Swift — Developer

Labels

codegeist_2008_bamboo codegeist_2008_bamboo Delete
codegeist_2008_fisheye codegeist_2008_fisheye Delete
codegeist_2008_jira codegeist_2008_jira Delete
codegeist_2008_crucible codegeist_2008_crucible Delete
codegeist_2008_confluence codegeist_2008_confluence Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 31

    Paul Csapo says:

    Hi Bob, is this now obsolete and replaced with this one? http://confluence.atlas...

    Hi Bob, is this now obsolete and replaced with this one? http://confluence.atlassian.com/display/CONFEXT/Confluence+Command+Line+Interface

    1. Jul 31

      Bob Swift says:

      No, it is included in this. This is a bundle of the others.

      No, it is included in this. This is a bundle of the others.

  2. Sep 19

    Dale Miller says:

    I have downloaded the crucible-cli-1.0.0-distribution.zip file and installed it....

    I have downloaded the crucible-cli-1.0.0-distribution.zip file and installed it.  I have it working but the documentation at http://confluence.atlassian.com/display/CODEGEIST/Crucible+Command+Line+Interfaceshows [--attribute <attribute>]
    Review attribute (comment, reviewitems, ...)
    The Review attribute of "comment" does not work, however, "comments" does. You should correct the page listed above.
    I would also like to know what other Review attribute values are available. (comments, reviewitems, ...). Please expand on the ... 
    What values are permitted for state in -a listReviews --state "open"
    I have tried open, closed, and draft each separately and they each return all of the Closed, Draft, and Review records.
    Is there a way of getting replies to comments? This CLI and the crucible plugin to export to a PDF file do not show replies. 


    1. Sep 20

      Bob Swift says:

      Dale, sorry, you are on your own for Crucible for a while - I will not be able t...

      Dale, sorry, you are on your own for Crucible for a while - I will not be able to get back to this support for a few months. Atlassian has been gradually making more Crucible interfaces available especially in the upcoming 1.6, but I don't know all the details.