arrow-down

Enonic Command Line Interface

Contents

Enonic Command Line Interface

The Enonic Command Line Interface (CLI) automates tasks related to development, as well as common management tasks for both local and remote instances of Enonic XP.

This documentation is currently under construction, and will be completed with the release of XP 7.

1. Installation

The CLI is available for Mac, Linux and Windows. To install the CLI on your local device, visit our downloads page or follow the instructions below

1.1. MacOS

  1. Enonic CLI is available from the Homebrew package service. With Homebrew installed, run the following command in your terminal app to add enonic to homebrew known repositories:

    brew tap enonic/cli
  2. Now you can install CLI by running:

    brew install enonic
  3. If you later want to update the CLI, simply run:

    brew upgrade enonic

1.2. Linux

If you know exact version you need you can download CLI archive directly from our repository:

curl -O http://repo.enonic.com/public/com/enonic/cli/enonic/1.0.2/enonic_1.0.2_Linux_64-bit.tar.gz

1.3. Windows

There are two ways to install CLI on windows

1.3.1. Install using Scoop

  1. After having Scoop command-line installer installed, open command prompt and add CLI github repo to scoop known repositories with the following command:

    scoop bucket add enonic https://github.com/enonic/cli-scoop.git
  2. Now you can install CLI by running:

    scoop install enonic
  3. Updating CLI is done with the following comand:

    scoop update enonic

1.3.2. Windows native installer

To download the latest available CLI and install it on your PC with native installer:

  1. Download windows installer.

  2. Run it and follow the wizard instructions.

  3. If you need to update the CLI later, just run the installer once again to fetch the latest version.

2. Configuration

CLI acts as an interface to a running enonic XP instance.

It saves the session after first successful authentication and uses it for all future ones so you don’t have to specify credentials every time.

Sessions expire after some time of inactivity or enonic XP restart. When this happens CLI will first search for the auth environment variables and then will prompt for auth token if there are none.

You can customize connection settings with following environment variables:

Option Description

ENONIC_CLI_REMOTE_URL

URL of the running enonic XP instance ( Default is localhost:4848 )

ENONIC_CLI_REMOTE_USER

User name for authentication in enonic XP

ENONIC_CLI_REMOTE_PASS

User password for authentication in enonic XP

Authentication credentials passed to CLI command override environment settings and active session.

3. Getting started

Enonic XP should be started and running to use CLI.

Once installed, the CLI includes standard CLI help functions for listing available commands and options. To get a list of commands, simply type the following in your terminal:

$ enonic

Enonic CLI v.1.0.9
Manage XP instances, home folders and projects

USAGE:
   enonic.exe [global options] command [command options] [arguments...]

COMMANDS:
     snapshot  Create and restore snapshots
     dump      Dump and load complete repositories
     export    Export and load repository structures
     app       Install, stop and start applications
     repo      Tune and manage repositories
     cms       CMS commands
     system    System commands
     latest    Check for latest version
     help, h   Shows a list of commands or help for one command

PROJECT COMMANDS:
     sandbox  Manage XP development instances
     project  Manage XP development projects

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

Most of the top-level commands contain sub-commands that can be printed out by typing the command name:

$ enonic snapshot

Create and restore snapshots

USAGE:
   Enonic CLI snapshot command [command options] [arguments...]

COMMANDS:
     list, ls     Returns a list of existing snapshots with name and status.
     create       Stores a snapshot of the current state of the repository.
     restore      Restores a snapshot of a previous state of the repository.
     delete, del  Deletes snapshots, either before a given timestamp or by name.

OPTIONS:
   --help, -h  show help
some commands have aliases for convenience like ls for list

To execute a sub-command you need to type full path to that command:

$ enonic snapshot list

Loading snapshots...Done
{
    "Results": [
        {
            "Name": "2019-04-05t11-31-26.184z",
            "Reason": "",
            "State": "SUCCESS",
            "Timestamp": "2019-04-05T11:31:26.47Z",
            "Indices": [
                "search-com.enonic.cms.default",
                "storage-com.enonic.cms.default",
                "search-system-repo",
                "storage-system-repo"
            ]
        }
    ]
}

To get help for any command at any level type its name followed by -h or --help:

$ enonic snapshot list -h

Returns a list of existing snapshots with name and status.

USAGE:
   Enonic CLI snapshot list [command options] [arguments...]

OPTIONS:
   --auth value, -a value  Authentication token for basic authentication (user:password)

4. Sandboxes

Developers may use the CLI to run different instances of XP locally. These instances are called sandboxes. Each sandbox will be associated with a specific distribution (version) of Enonic XP and will have its own Enonic XP home folder.

The CLI automates setting up, starting, stopping and upgrading sandboxes. Sandbox commands list is available by running following command:

$ enonic sandbox

Manage XP development instances

USAGE:
   Enonic CLI sandbox command [command options] [arguments...]

COMMANDS:
     list, ls         List all sandboxes
     start            Start the sandbox.
     stop             Stop the sandbox started in detached mode.
     create           Create a new sandbox.
     delete, del, rm  Delete a sandbox
     upgrade, up      Upgrades the distribution version.

OPTIONS:
   --help, -h  show help

4.1. Create

Starts a new sandbox wizard asking for a name and an enonic distribution version:

$ enonic sandbox create [name] [-v <value>]

Options:

Option Description

name

sandbox name

-v, --version

enonic distribution version

If all params are present and correct, sandbox is created immediately without wizard allowing usage in script files.
Example creating a 'myBox' sandbox using 'mac-sdk-7.0.0-B5' enonic distribution:
$ enonic sandbox create myBox mac-sdk-7.0.0-B5

4.2. List

Lists all sandboxes previously created by user:

$ enonic sandbox list
Example output:
$ enonic sandbox ls

* Sandbox1 ( windows-sdk-7.0.0-B1 )
  Sandbox2 ( windows-sdk-7.0.0-B1 )
  Sandbox3 ( windows-sdk-7.0.0-B4 )
  Sandbox4 ( windows-sdk-7.0.0-B5 )
Asterisk marks currently running sandbox

4.3. Start

Starts a sandbox and ensures that only one is started at a time:

$ enonic sandbox start [name] [-d]

Options:

Option Description

name

sandbox name

--dev

Run enonic XP distribution in development mode

-d, --detach

flag to start sandbox in detached mode (background process)

Example starting 'myBox' sandbox in a dev mode:
$ enonic sandbox start myBox --dev

4.4. Stop

Stops a running sandbox:

$ enonic sandbox stop
only sandboxes started with CLI can be stopped using this command.
Example stopping sandbox:
$ enonic sandbox stop

4.5. Upgrade

Upgrades enonic distribution used for a sandbox:

$ enonic sandbox upgrade [name] [-v <value>]

Options:

Option Description

name

sandbox name

-v, --version

enonic distribution version

Downgrades are not permitted.
Example upgrading enonic distribution for 'myBox' sandbox to 'windows-sdk-7.0.0-B5':
$ enonic sandbox upgrade myBox -v windows-sdk-7.0.0-B5

4.6. Delete

Deletes a sandbox:

$ enonic sandbox delete [name] [-f]

Options:

Option Description

name

sandbox name

-f, --force

assume “Yes” as answer to all prompts and run non-interactively

All data that may have been created in this sandbox will be deleted.
Example deleting 'myBox' sandbox:
$ enonic sandbox delete myBox -f

5. Project

By projects, we generally refer to the set of code and configuration required to build applications or libraries for XP. Projects are commonly hosted in a Git repo and need to follow a set of principles to work with Enonic XP. Each project is associated with a sandbox to be run in.

All project commands should be run from the project root folder.

Command list is available by running following command:

$ enonic project

Manage XP development projects

USAGE:
   Enonic CLI project command [command options] [arguments...]

COMMANDS:
     create             Create new project
     sandbox, sbox, sb  Set the default sandbox associated with the current project
     clean              Clean current project
     build              Build current project
     deploy             Deploy current project to a sandbox
     install, i         Build current project and install it to Enonic XP
     shell              Creates a new shell with project environment variables
     env                Exports project environment variables as string to be used in any third-party shell
     gradle             Run arbitrary gradle task in current project

OPTIONS:
   --help, -h  show help

5.1. Create

Navigate to the folder you wish to place your project in and run the following command:

$ enonic project create [name] [-b <value>] [-c <value>] [-d <value>] [-r <value>] [-v <value>]

Follow wizard instructions that will set everything up for you.

Options:

Option Description

name

name of the project. Default value is com.example.myapp

-r, --repo,
--repository

repository path. Format: <enonic repo> or <organisation>/<repo> on github or <full repo url>

-b, --branch

repository branch to use. master is used if none specified

-c, --checkout

commit hash to use (mutually exclusive with branch option, used if both are present)

-d, --dest,
--destination

destination folder name. Defaults to last word of the project name, i.e. myapp

-v, --ver, --version

version number to assign to new project. Default value 1.0.0-SNAPSHOT

name, repository, destination and version params are sufficient to create a project without a wizard allowing it to be used in script files.
Example creating 'myProject' project in 'myFolder' folder from vanilla starter and setting '1.0.0-SNAPSHOT' version:
$ enonic project create myProject -d myFolder -r starter-vanilla -v 1.0.0-SHAPSHOT

5.2. Sandbox

Project create will configure the default sandbox for your project. To change it later run this command inside the project folder:

$ enonic project sandbox [name]

Options:

Option Description

name

sandbox name

If name is not provided or does not exist, you will be asked for it.
Example setting 'myOtherBox' as default sandbox for current project:
$ enonic project sandbox myOtherBox

5.3. Build

You can build your project by running following command inside the project folder:

$ enonic project build

The build command helps you with:

  • Compiling code

  • Running tests

  • Creating artifacts (executables)

The build system is based on Gradle and the XP Gradle plugin.

The "project build" command is an alias for the Gradle Wrapper, which must be located in your project through a file called .gradlew (linux/mac) or gradlew.bat (windows). The Gradle Wrapper is by default available with all Starter Kits on Enonic Market.

You may also use the Gradle Wrapper directly by running ./gradlew build (linux/mac) or gradlew build (windows) from your projects directory.

5.4. Clean

Alias for the gradlew clean command

$ enonic project clean

5.5. Deploy

As developers, we continuously need to deploy and test our code. Following command will build current project and deploy it to associated sandbox:

$ enonic project deploy [name]

Options:

Option Description

--dev

Run enonic XP distribution in development mode

name

sandbox name to deploy to (overrides associated sandbox)

If sandbox name is provided, it overrides the sandbox associated with the project for this time only.
Example deploying current project to 'otherSandbox' sandbox:
$ enonic project deploy otherSandbox

5.6. Gradle

In case you want to run arbitrary gradle task or group multiple ones in one command you can use following command:

$ enonic project gradle [tasks...]

Options:

Option Description

tasks

a space delimited list of gradle tasks to invoke

The difference between enonic project gradle clean build deploy and gradlew clean build deploy is that the former uses sandbox and enonic XP distribution configured for the project, while latter uses system wide settings.
Example running gradle clean build deploy:
$ enonic project gradle clean build deploy

5.7. Install

To install current project to running enonic instance

$ enonic project install
Enonic XP instance must be running when executing this command !

Install command does 2 things:

  • Builds the project

  • Installs built project to a running enonic XP instance using XP API

Options:

Option Description

-a, --auth

Authentication token for basic authentication in the following format <user:password>

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.

5.8. Shell

This is an advanced command to export project JAVA_HOME and XP_HOME variables to a new shell. Following command starts a new shell bound to project sandbox and enonic XP distribution

$ enonic project shell
Run quit command to exit enonic shell. Parent shell environment is not modified.

5.9. Env

This command is currently not available on Windows.

If you are an expert user loving your shell you can export project JAVA_HOME and XP_HOME environment variables as strings to be used there

$ eval $(enonic project env)
Unlike enonic project shell command, this one will modify your current shell environment varialbes. Shell restart is needed to undo the changes.

6. Snapshots

List of commands for manipulating repository snapshots can be seen by typing:

$ enonic snapshot

Create and restore snapshots

USAGE:
   Enonic CLI snapshot command [command options] [arguments...]

COMMANDS:
     list, ls     Returns a list of existing snapshots with name and status.
     create       Stores a snapshot of the current state of the repository.
     restore      Restores a snapshot of a previous state of the repository.
     delete, del  Deletes snapshots, either before a given timestamp or by name.

OPTIONS:
   --help, -h  show help

6.1. Create

Create a snapshot of all or a single repository while running. The snapshots will be stored in the directory given in snapshots.dir option in the Repo Configuration (default $xp_home/snapshots). Note that the first snapshot only stores markers in the repository for the current state. Subsequent snapshots stores the changes since the last snapshot. See Backup and Restore for more information on snapshots.

For a clustered installation, the snapshot-location must be on a shared file-system.
$ enonic snapshot create [-r <value>] [-a <value>]

Options:

Option Description

-a, --auth

authentication token for basic authentication (user:password).

-r, --repo

the name of the repository to snapshot.

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example creating new snapshot from 'cms-repo':
$ enonic snapshot create -a su:password -r cms-repo

6.2. List

List all the snapshots for the installation. See Backup and Restore for more information on snapshots.

$ enonic snapshot ls

Options:

Option Description

-a, --auth

authentication token for basic authentication (user:password).

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.

6.3. Restore

Restore a named snapshot. See Backup and Restore for more information on snapshots.

$ enonic snapshot restore [--snap <value>] [--repo <value>] [--a <value>]

Options:

Option Description

--snap, --snapshot

snapshot name to restore

-r, --repo

the name of the repository to restore

-a, --auth

authentication token for basic authentication (user:password).

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.

6.4. Delete

Deletes a snapshot by name or date:

$ enonic snapshot delete [-before <value>] [--snap <value>] [-a <value>]

Options:

Option Description

-b, --before

"2 Jan 06" formatted date to delete snapshots up to

--snap, --snapshot

snapshot name to delete

-a, --auth

authentication token for basic authentication (user:password).

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.

7. Dumps

List of command for manipulating all repositories can be seen by typing:

$ enonic dump

Dump and load complete repositories

USAGE:
   Enonic CLI dump command [command options] [arguments...]

COMMANDS:
     create       Export data from every repository.
     upgrade, up  Upgrade a dump.
     load         Import data from a dump.
     list, ls     List available dumps

OPTIONS:
   --help, -h  show help

7.1. Create

Export data from every repository. The result will be stored in the $XP_HOME/data/dump directory.

$ enonic dump create [-d <value>] [--skip-versions <value>] [--max-version-age <value>] [--max-versions <value>] [-a <value>]

Options:

Option Description

-d

dump name

--skip-versions

don’t dump version-history, only current versions included

--max-version-age

max age of versions to include, in days, in addition to current version

--max-versions

max number of versions to dump in addition to current version

-a, --auth

authentication token for basic authentication (user:password).

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example creating new dump named 'myDump':
$ enonic dump create -a su:password -d myDump

7.2. Upgrade

Upgrade a data dump from a previous version to the current version. The output of the upgrade will be placed alongside the dump that is being upgraded and will have the name <dump-name>_upgraded_<new-version>.

The current version XP installation must be running with the upgraded app deployed.
$ enonic dump upgrade [-d <value>] [-a <value>]

Options:

Option Description

-d

dump name

-a, --auth

authentication token for basic authentication (user:password).

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example upgrading dump named 'myDump' to current version:
$ enonic dump upgrade -a su:password -d myDump

7.3. List

Lists all the dumps

$ enonic dump ls

Options:

Option Description

-a, --auth

authentication token for basic authentication (user:password).

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.

7.4. Load

Load data from a named system dump into Enonic XP. The dump read has to be stored in the $XP_HOME/data/dump directory. See Export and Import for more information on system dump/load.

A load will delete all existing repositories before loading the repositories present in the system-dump
$ enonic dump load [--d <value>] [-f] [--upgrade] [--a <value>]

Options:

Option Description

-d

dump name to load

-f, --force

assume “Yes” as answer to all prompts and run non-interactively

--upgrade

upgrade the dump if necessary (default is false)

-a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example loading dump 'newDump' in a non-interactive mode and upgrade if necessary:
$ enonic dump load -a su:password --na newSu:newPassword -d newDump -f --upgrade

8. Export

Export and import data from a given repository, branch and content path. To list available commands type:

$ enonic export

Export and load repository structures

USAGE:
   Enonic CLI export command [command options] [arguments...]

COMMANDS:
     create  Export data from given repository, branch and content path.
     import  Import data from a named export.

OPTIONS:
   --help, -h  show help

8.1. Create

Extract data from a given repository, branch and content path. The result will be stored in the $XP_HOME/data/export directory. This is useful to move a part of a site from one installation to another. See Export and Import for more information on content export/import.

Exporting content will not include the version history of the content, just the current version.
$ enonic export create [-t <value>] [--path <value>] [--skip-ids] [--skip-versions] [--dry] [-a <value>]

Options:

Option Description

-t

target name to save export

--path

path of data to export. Format: <repo-name>:<branch-name>:<node-path> e.g. cms-repo:draft:/some-content

--skip-ids

Flag to skip ids in data when exporting.

--skip-versions

Flag to skip versions in data when exporting.

--dry

Show the result without making actual changes.

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example exporting data from 'cms-repo' repo, branch 'draft' and path '/some-content' to 'myExport' dump:
$ enonic export create -a su:password -t myExport --path cms-repo:draft:/some-content

8.2. Import

Import data from a named export into Enonic XP at the desired content path. The export read has to be stored in the $XP_HOME/data/export directory. See Export and Import for more information on content export/import.

$ enonic export import [-t <value>] [--path <value>] [--xsl-source <value>] [--xsl-param <value>] [--skip-ids] [--skip-permissions] [--dry] [-a <value>]

Options:

Option Description

-t

a named export to import

--path

target path for import. Format: <repo-name>:<branch-name>:<node-path> e.g. cms-repo:draft:/some-content

--xsl-source

path to xsl file (relative to <XP_HOME>/data/export) for applying transformations to node.xml before importing

--xsl-param

parameters to pass to the XSL transformations before importing nodes. Format: <parameter-name>=<parameter-value> e.g. applicationId=com.enonic.myapp

--skip-ids

flag to skip ids when importing

--skip-permissions

flag to skip permissions when importing

--dry

show the result without making actual changes.

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example:
$ enonic export import -a su:password -t myExport --path cms-repo:draft:/some-content

An XSL file and a set of name=value parameters can be optionally passed for applying transformations to each node.xml file, before importing it.

This option could for example be used for renaming types or fields. The .xsl file must be located in the $XP_HOME/data/export directory.

9. Applications

Commands to install applications to the running enonic XP instance. Currently only one command is available here:

$ enonic app

Install, stop and start applications

USAGE:
   Enonic CLI app command [command options] [arguments...]

COMMANDS:
     install, i  Install an application from URL or file

OPTIONS:
   --help, -h  show help

9.1. Install

Installs an application on all nodes.

$ enonic app install [-u <value>] [-f <value>] [-a <value>]

Options:

Option Description

-u, --url

the URL of the application

-f, --file

path to an application file (mutually exclusive with url, used if both are present)

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example installing app from URL:
$ enonic app install -a su:password -u http://repo.enonic.com/public/com/enonic/app/superhero/1.2.0/superhero-1.2.0.jar
Example installing app from file:
$ enonic app install -a su:password -f /Users/rmy/Dev/apps/superhero/build/libs/superhero-1.2.0-SNAPSHOT.jar

10. CMS

Content metadata commands. Currently only one command present here:

$ enonic cms

CMS commands

USAGE:
   Enonic CLI cms command [command options] [arguments...]

COMMANDS:
     reprocess  Reprocesses content in the repository.

OPTIONS:
   --help, -h  show help

10.1. Reprocess

Reprocesses content in the repository and regenerates metadata for the media attachments. Only content of a media type (super-type = base:media) are processed.

Unless the –skip-children flag is specified, it processes all descendants of the specified content path.

This command should be used after migrating content from Enonic CMS using the cms2xp tool.
$ enonic cms reprocess [--path <value>] [--skip-children] [-a <value>]

Options:

Option Description

--path

target content path to be reprocessed. Format: <branch-name>:<content-path>. e.g draft:/

--skip-children

flag to skip processing of content children

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example reprocessing media in branch 'draft' and content path '/some-content':
$ enonic reprocess -a su:password -s draft:/some-content

11. Repository

Commands for configuring and managing repositories. Full list is available by typing:

$ enonic repo

Tune and manage repositories

USAGE:
   Enonic CLI repo command [command options] [arguments...]

COMMANDS:
     reindex   Reindex content in search indices for the given repository and branches.
     readonly  Toggle read-only mode for server or single repository
     replicas  Set the number of replicas in the cluster.
     list, ls  List available repos

OPTIONS:
   --help, -h  show help

11.1. Reindex

Reindex the content in the search indices for the given repository and branches. This is usually required after upgrades, and may be useful in many other situation.

$ enonic repo reindex [--b <value, value...>] [-r <value>] [-i] [-a <value>]

Options:

Option Description

-b

a comma-separated list of branches to be reindexed

-r

the name of the repository to reindex

-i

if true, the indices will be deleted before recreated

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example reindexing content in branches 'draft' and 'master' of 'cms-repo' repository:
$ enonic repo reindex -a su:password -b draft,master -i -r cms-repo

11.2. Readonly

Toggle read-only mode. In read-only mode, no changes can be made on the server, or a single repo if specified

$ enonic repo readonly [readOnly] [-r <value>] [-a <value>]

Options:

Option Description

readOnly

boolean value to set

-r

single repository to toggle read-only mode for

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example setting 'cms-repo' repository to read-only mode:
$ enonic repo readonly true -a su:password -r cms-repo

11.3. Replicas

Set the number of replicas in the cluster. For more information on how replicas work and recommended values, see: Replica setup.

$ enonic repo replicas [replicasNum] [-a <value>]

Options:

Option Description

replicasNum

whole number between 1 and 99 to set

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example setting number of replicas to 3:
$ enonic repo replicas 3 -a su:password

11.4. List

List available repositories.

$ enonic repo list [-a <value>]

Options:

Option Description

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example listing repositories:
$ enonic repo list -a su:password

12. System tasks

System tasks show info about currently running enonic XP instance. Currently there is only one command as can be seen by running:

$ enonic system

System commands

USAGE:
   Enonic CLI system command [command options] [arguments...]

COMMANDS:
     info, i  XP distribution info

OPTIONS:
   --help, -h  show help

12.1. Info

Shows info about currently running enonic XP instance.

$ enonic system info

{
    "Version": "7.0.0-B1",
    "Installation": "demo",
    "RunMode": "PROD",
    "Build": {
        "Hash": "934a05d947a8ab238295f74b9c1a5ab2b9f13794",
        "ShortHash": "934a05d",
        "Branch": "master",
        "Timestamp": "2019-02-26T21:03:13+0100"
    }
}

13. Latest

Checks the latest available version of CLI.

$ enonic latest

Loading...
Latest version: 1.0.7
Local version: 1.0.7

Contents