Overview

This page describes how to use JFrog CLI with JFrog Mission Control.

Read more about JFrog CLI here.

Syntax

$ jfrog mc command-name arguments global-options command-options

Where:

command-name
The command to execute. Note that you can use either the full command name or its abbreviation.
global-options

A set of global options that may be used for all commands:

--url: (Mandatory) The Mission Control URL.

--user: (Optional) The Mission Control user.

--password: (Optional) The Mission Control password.

To avoid having to set these for every command, you may set them once using the config command and then omit them for every following command.

command-options
A set of options corresponding to the command
arguments
A set of arguments corresponding to the command


 


Commands

The following sections describe the commands available in the JFrog CLI for use with JFrog Mission Control.

We strongly recommend running the config command right after installing the JFrog CLI to avoid having to pass in the Mission Control URL and login credentials for every command.

Artifactory Service Actions

This command performs different actions on Artifactory services. The specific action is determined by a secondary command and its corresponding arguments and options as described in the following sections. 
Keep in mind non-Artifactory services can be added as well.
Command name
services
Abbreviation
s

Adding a service

Command name
add
Description
Adds a service in Mission Control
Command arguments
 
Service typeThe type of the service to be added in Mission Control. Can be one of the following:

ARTIFACTORY, EDGE, XRAY or DISTRIBUTION

Service name

The name of the service.

Command options
 
--service-url

[Mandatory]

Service URL
--service-user

[Mandatory]

Service username
--service-password

[Mandatory]

Service password
--desc

[Optional]

A description for the service.
--site-name

[Optional]

 Service site name, e.g. US.

Example

jfrog mc s add ARTIFACTORY my-arti --service-url=http://10.100.1.127 --service-user=admin --service-password=password

Removing a service

Command name
remove
Description
Removes a service from Mission Control
Command arguments
 
Service nameThe name of the service (as defined in Mission Control) to remove.
 
Command options
 

--quiet

[Default: false]
When true, skips the default confirmation message.

Example

jfrog mc s remove my-arti --quiet=true

Attaching a License

Command name
attach-lic
Description
Attaches (and optionally installs) a license to the specified service and removes it from the specified license-bucket.
Command arguments
 
Artifactory service nameThe name of the service to which the license should be attached.
 
Command options
 

--bucket-id

[Mandatory]
The id or name of the bucket from which the license should be provisioned.

--license-path

[Optional]

Specifies the full path to the license file. If not specified, the license is printed to standard output.
--override

[Default: false]

When true, overrides any license file currently existing in the path specified in the --license-path parameter.
--deploy

[Default: false]

When true, installs the license in the Artifactory service

Example

Assign a license from the specified bucket to the specified Artifactory service (my-arti). The license is displayed on standard output.

jfrog mc s attach-lic my-arti --bucket-id=abcdefg

Detaching a License

Command name
detach-lic
Description
Detaches a license from the specified service and returns it to the specified license-bucket.
Command arguments
 
Service nameThe name of the service from which the license should be detached
 
Command options
 

--bucket-id

[Mandatory]
The id of the license-bucket from which the license should be provisioned.

Example

jfrog mc s detach-lic my-arti --bucket-id=license-bucket-1

Configuration

This command is used to configure the JFrog CLI with the default Mission Control URL and login credentials which should be used in the other commands so that you don't have to pass them in each time. These values are defaults for each command and can be overridden per command by passing in alternative values for the Mission Control URL and login credentials. The values configured are saved in ~/.jfrog/jfrog-cli.conf.

Command name
config
Abbreviation
c
Command options

 

--url[Optional] The default Mission Control URL to be used for the other commands.
--user[Optional] The default user to be used for the other commands.
--password

[Optional] The default password to be used for the other commands.

Command arguments
If no arguments are passed in, the command will configure the Mission Control URL, user and password through the command options or through the interactive prompt
show

Shows the stored configuration.

clearClears the stored configuration.

 

Examples

Example 1

Configure the Mission Control URL, user and password using the interactive prompt.

$ jfrog mc c
Example 2

Configure the Mission Control URL, user and password by passing them in as command options.

$ jfrog mc c --url=http://<mission-control-domain> --user=admin --password=password
Example 3

Show, and then clear the configuration details.

$ jfrog mc c show
$ jfrog mc c clear