Loading Audio...
Setting Up Clarity's CLI Tools
Liferay provides two powerful CLI tools to streamline your development and cloud management workflows: Blade CLI and Liferay Cloud CLI. Clarity Vision Solutions recognizes the value of both these tools. They'll leverage Blade CLI to enhance their local development processes and Liferay Cloud CLI to efficiently deploy and manage client extensions within their Liferay SaaS project. In the following exercises, you'll install these tools and familiarize yourself with some basic commands.
Exercise: Installing Blade CLI
Blade CLI simplifies local development tasks, such as creating workspaces, generating projects, and deploying to local servers. Here, you'll install Blade using Liferay’s graphical installer.
- Go to the Liferay IDE Github Repo release page.
- Download the most recent LiferayWorkspace executable for your operating system (Windows, MacOS, or Linux).
- Run the installer.
- Click Next to step through the installer’s introduction.
- Select Don’t initialize Liferay Workspace directory and click Next.
- Select Skip proxy configuration and click Next.
If you're behind a proxy server, please see Creating a Liferay Workspace for how to configure your proxy. - Click Next to begin installing Liferay Workspace on your machine.
- Click Finish when completed.
Once finished, run the following commands to verify Blade is ready to use and up to date.
Validating Your Blade Installation
-
Open a terminal window and run this command to check your Blade version:
blade version
NOTE
When using macOS or Linux, the installer may not add the blade command to your $PATH. You can add it manually by running the following command and restarting your terminal:macOS:
echo 'export PATH="$PATH:$HOME/Library/PackageManager/bin"' >> ~/.bash_profile
Linux:
echo 'export PATH="$PATH:$HOME/jpm/bin"' >> ~/.bash_profile
-
Run this command to ensure Blade is up to date:
blade update
Updating Blade ensures you’re able to initiate workspaces for the latest Liferay releases, updated quarterly. Blade should begin updating automatically if an update is available.
-
Run this command to view available Blade commands:
blade help
When you run this command within a Liferay workspace, it includes additional commands.
While you can run many Blade CLI commands from anywhere, some require you to be within a Liferay Workspace. To ensure commands execute as expected, navigate to the desired workspace directory.
Exercise: Installing Liferay Cloud CLI
Liferay Cloud CLI focuses on managing your cloud environments and deployments, particularly for Liferay's PaaS and SaaS offerings. Here, you’ll install Liferay Cloud CLI.
- For *nix Systems
Open your terminal, and run this command:
If you get a permissions error, replacecurl https://cdn.liferay.cloud/lcp/stable/latest/install.sh -fsSL | bash
bash
withsudo bash
and run it again. - For Windows Systems
Download the latest version of the Windows installer, and follow the steps in the wizard. After the installation completes, Liferay Cloud CLI should be ready to use!
Once finished, run the following commands to verify Liferay Cloud CLI is ready to use and up to date.
Validating Your Installation
-
Open a terminal window and run this command to check your Liferay Cloud CLI version:
lcp version
-
Run this command to ensure Liferay Cloud CLI is up to date:
lcp update
-
Run this command to view available Liferay Cloud CLI commands:
lcp help
To use the core Liferay Cloud CLI features, you must have a Liferay PaaS or SaaS project. You’ll learn more about this tool in Module 7: Working with Liferay Cloud.
Conclusion
Congratulations! You’ve installed the Liferay CLI tools that Clarity’s developers need to streamline their development workflows, efficiently building, deploying, and managing solutions both locally and in the cloud. Next, you’ll learn about available IDE tools that Clarity can use to further accelerate development.
Capabilities
Product
Education
Contact Us