Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

liferay/liferay-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

liferay - Liferay Client Extension Control CLI

Tool for performing Liferay Client Extension related operations from the command line.

Manuall Installation

Manuall Installation On MacOS using curl

  1. Download the binary using curl
    1. Apple Silicon
      curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-darwin-arm64 -O
    2. Intel
      curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-darwin-amd64 -O
  2. Validate the binary (optional) Download the checksum file
    curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt
    Validate the binary against the checksum file
    1. Apple Silicon
      shasum -c <(grep liferay-darwin-arm64 checksum.txt)
    2. Intel
      shasum -c <(grep liferay-darwin-amd64 checksum.txt)
    If valid, the output is:
    <binary>: OK
    If the check fails, shasum exits with nonzero status and prints output similar to:
    <binary>: FAILED
    shasum: WARNING: 1 computed checksum did NOT match
  3. Make the binary executable.
    chmod +x ./liferay-darwin-*
  4. Move the binary to a file location on your system PATH and rename it to liferay for convenience.
    sudo mv ./liferay-darwin-* /usr/local/bin/liferay
    sudo chown root: /usr/local/bin/liferay
    Make sure /usr/local/bin is in your PATH environment variable.
  5. Test to ensure the version you installed is up-to-date:
    liferay --version

Manuall Installation On Linux using curl

Known Issues

  • If you have less than 5% of disk space available on your system, the runtime environment will be unstable.
  • With very new versions of the Linux kernel (e.g. 6.0.8), you may encounter stability issues with the runtime environment. One method of verifying your kernel is compatible is documented here.
  1. Download the binary using curl
    curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-linux-amd64 -O
  2. Validate the binary (optional) Download the checksum file
    curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt
    Validate the binary against the checksum file
    shasum -c <(grep liferay-linux-amd64 checksum.txt)
    If valid, the output is:
    <binary>: OK
    If the check fails, shasum exits with nonzero status and prints output similar to:
    <binary>: FAILED
    shasum: WARNING: 1 computed checksum did NOT match
  3. Make the binary executable.
    chmod +x ./liferay-linux-amd64
  4. Move the binary to a file location on your system PATH and rename it to liferay for convenience.
    sudo mv ./liferay-linux-amd64 /usr/local/bin/liferay
    sudo chown root: /usr/local/bin/liferay
    Make sure /usr/local/bin is in your PATH environment variable.
  5. Test to ensure the version you installed is up-to-date:
    liferay --version

Manuall Installation On Windows using curl

  1. Download the binary using curl
    1. ARM
      curl.exe -fsSL "https://github.com/liferay/liferay-cli/releases/latest/download/liferay-windows-arm64.exe" -O
    2. Intel
      curl.exe -fsSL "https://github.com/liferay/liferay-cli/releases/latest/download/liferay-windows-amd64.exe" -O
  2. Validate the binary (optional) Download the checksum file
    curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt
    Validate the binary against the checksum file
    1. Using Command Prompt to manually compare CertUtil's output to the checksum file downloaded:
      1. ARM
        CertUtil -hashfile liferay-windows-arm64.exe SHA256
        findstr liferay-windows-arm64.exe checksum.txt
      2. Intel
        CertUtil -hashfile liferay-windows-amd64.exe SHA256
        findstr liferay-windows-amd64.exe checksum.txt
  3. Rename it to liferay for convenience and move the binary to a location which can be added to your system PATH.
    1. ARM
      ren "liferay-windows-arm64.exe" "liferay.exe" & move /Y "liferay.exe" "%USERPROFILE%\AppData\Local\Programs\Common"
    2. Intel
      ren "liferay-windows-amd64.exe" "liferay.exe" & move /Y "liferay.exe" "%USERPROFILE%\AppData\Local\Programs\Common"
  4. Add %USERPROFILE%\AppData\Local\Programs\Common to your PATH system variable.
    1. Press the Windows key and type env.
    2. In the result pane select Edit the system environment variables to open the System Properites widget.
    3. Click |Environment Variables...| button.
    4. Under User variables for %user% click the Path entry and select |Edit|.
    5. Click |New| and paste %USERPROFILE%\AppData\Local\Programs\Common
    6. Click |OK| and close all the windows.
    7. Logout and back in.
  5. Test to ensure the version you installed is up-to-date open a terminal and execute:
    liferay --version

Automated Installation

Installation on Mac or Linux using the install.sh script

See Known Issues above for some issues with Linux.

  1. Execute:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/liferay/liferay-cli/HEAD/install.sh)"
  2. Test to ensure the version you installed is up-to-date open a terminal and execute:
    liferay --version

Run Prerequisites

  • Docker (Desktop)
  • the liferay platform specific binary

Getting Started / Onboarding steps

We have a new Getting Started guide available here.

Advanced: How to customize the DXP Image used in localdev

  • Run LOCALDEV_RESOURCES_DIR=$(liferay config get localdev.resources.dir) to obtain the path where localdev resources are synced
  • Edit ${LOCALDEV_RESOURCES_DIR}/docker/images/localdev-server/workspace/gradle.properties file to set the the docker image or product key.
  • If localdev runtime is already started
    • Run liferay ext refresh
  • If localdev runtime is not already started
    • Run liferay ext start

Getting productive with Tilt

  • show logs
  • refreshing resources
  • disabling resources
  • status bars
  • ...

Cleanup liferay/cli

  • linux/mac:
    rm -rf ~/.lcect*
    
  • windows:
    del /q /s %USERPROFILE%\.liferay/cli.yaml
    rd /q /s %USERPROFILE%\.liferay/cli