Tool for performing Liferay Client Extension related operations from the command line.
- Download the binary using curl
- Apple Silicon
curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-darwin-arm64 -O
- Intel
curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-darwin-amd64 -O
- Apple Silicon
- Validate the binary (optional)
Download the checksum file
Validate the binary against the checksum file
curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt
- Apple Silicon
shasum -c <(grep liferay-darwin-arm64 checksum.txt)
- Intel
shasum -c <(grep liferay-darwin-amd64 checksum.txt)
If the check fails,<binary>: OK
shasum
exits with nonzero status and prints output similar to:<binary>: FAILED shasum: WARNING: 1 computed checksum did NOT match
- Apple Silicon
- Make the binary executable.
chmod +x ./liferay-darwin-*
- Move the binary to a file location on your system
PATH
and rename it toliferay
for convenience.Make suresudo mv ./liferay-darwin-* /usr/local/bin/liferay sudo chown root: /usr/local/bin/liferay
/usr/local/bin
is in yourPATH
environment variable. - Test to ensure the version you installed is up-to-date:
liferay --version
- 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.
- Download the binary using curl
curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-linux-amd64 -O
- Validate the binary (optional)
Download the checksum file
Validate the binary against the checksum file
curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt
If valid, the output is:shasum -c <(grep liferay-linux-amd64 checksum.txt)
If the check fails,<binary>: OK
shasum
exits with nonzero status and prints output similar to:<binary>: FAILED shasum: WARNING: 1 computed checksum did NOT match
- Make the binary executable.
chmod +x ./liferay-linux-amd64
- Move the binary to a file location on your system
PATH
and rename it toliferay
for convenience.Make suresudo mv ./liferay-linux-amd64 /usr/local/bin/liferay sudo chown root: /usr/local/bin/liferay
/usr/local/bin
is in yourPATH
environment variable. - Test to ensure the version you installed is up-to-date:
liferay --version
- Download the binary using curl
- ARM
curl.exe -fsSL "https://github.com/liferay/liferay-cli/releases/latest/download/liferay-windows-arm64.exe" -O
- Intel
curl.exe -fsSL "https://github.com/liferay/liferay-cli/releases/latest/download/liferay-windows-amd64.exe" -O
- ARM
- Validate the binary (optional)
Download the checksum file
Validate the binary against the checksum file
curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt
- Using Command Prompt to manually compare
CertUtil
's output to the checksum file downloaded:- ARM
CertUtil -hashfile liferay-windows-arm64.exe SHA256 findstr liferay-windows-arm64.exe checksum.txt
- Intel
CertUtil -hashfile liferay-windows-amd64.exe SHA256 findstr liferay-windows-amd64.exe checksum.txt
- ARM
- Using Command Prompt to manually compare
- Rename it to
liferay
for convenience and move the binary to a location which can be added to your systemPATH
.- ARM
ren "liferay-windows-arm64.exe" "liferay.exe" & move /Y "liferay.exe" "%USERPROFILE%\AppData\Local\Programs\Common"
- Intel
ren "liferay-windows-amd64.exe" "liferay.exe" & move /Y "liferay.exe" "%USERPROFILE%\AppData\Local\Programs\Common"
- ARM
- Add
%USERPROFILE%\AppData\Local\Programs\Common
to yourPATH
system variable.- Press the Windows ⊞ key and type
env
. - In the result pane select Edit the system environment variables to open the System Properites widget.
- Click |Environment Variables...| button.
- Under User variables for
%user%
click thePath
entry and select |Edit|. - Click |New| and paste
%USERPROFILE%\AppData\Local\Programs\Common
- Click |OK| and close all the windows.
- Logout and back in.
- Press the Windows ⊞ key and type
- Test to ensure the version you installed is up-to-date open a terminal and execute:
liferay --version
See Known Issues above for some issues with Linux.
- Execute:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/liferay/liferay-cli/HEAD/install.sh)"
- Test to ensure the version you installed is up-to-date open a terminal and execute:
liferay --version
- Docker (Desktop)
- the
liferay
platform specific binary
We have a new Getting Started
guide available here.
- 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
- Run
- If localdev runtime is not already started
- Run
liferay ext start
- Run
- show logs
- refreshing resources
- disabling resources
- status bars
- ...
- linux/mac:
rm -rf ~/.lcect*
- windows:
del /q /s %USERPROFILE%\.liferay/cli.yaml rd /q /s %USERPROFILE%\.liferay/cli