Getting started


Getting started

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.1.0
Manage XP instances, home folders and projects

   enonic [global options] command [command options] [arguments...]

     snapshot  Create and restore snapshots
     dump      Dump and load complete repositories
     export    Export data from a given repository, branch and content path.
     import    Import data from a named export.
     app       Install, stop and start applications
     repo      Tune and manage repositories
     cms       CMS commands
     system    System commands
     latest    Check for latest version
     vacuum    Removes unused blobs and binaries from blobstore
     help, h   Shows a list of commands or help for one command

     sandbox  Manage XP development instances
     project  Manage XP development projects

   --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

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

     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.

   --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": [

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.

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

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