JHipster Lite CLI is a command-line interface tool that helps you apply and manage JHipster Lite modules. It provides a modular approach to application generation, allowing you to select specific modules and features for your project. Visit JHipster Lite to learn more about it.
You need to clone this project and go into the folder:
git clone https://github.com/jhipster/jhipster-lite-cli
cd jhipster-lite-cli
Install jhlite
command in your bin folder:
./mvnw clean package && echo "java -jar \"/usr/local/bin/jhlite.jar\" \"\$@\"" | sudo tee /usr/local/bin/jhlite > /dev/null && sudo chmod +x /usr/local/bin/jhlite && JAR_SOURCE=$(ls target/jhlite-cli-*.jar | head -n 1) && [ -n "$JAR_SOURCE" ] && sudo mv "$JAR_SOURCE" /usr/local/bin/jhlite.jar || echo "No JAR file found in target directory"
Then you can follow the Commands Guide
You need to have Java 21:
Before you can build this project, you must install and configure the following dependencies on your machine:
Node.js: We use Node to run a development web server and build the project. Depending on your system, you can install Node either from source or as a pre-packaged bundle.
After installing Node, you should be able to run the following command to install development tools. You will only need to run this command when dependencies change in package.json.
npm install
./mvnw
./mvnw clean package
echo "java -jar \"/usr/local/bin/jhlite.jar\" \"\$@\"" | sudo tee /usr/local/bin/jhlite > /dev/null
# Make the script executable
sudo chmod +x /usr/local/bin/jhlite
# Find the JAR file in the target directory and move it as jhlite.jar
JAR_SOURCE=$(ls target/jhlite-cli-*.jar | head -n 1)
if [ -n "$JAR_SOURCE" ]; then
sudo mv "$JAR_SOURCE" /usr/local/bin/jhlite.jar
else
echo "No JAR file found in target directory"
fi
Copy and paste the above script into a terminal to install the jhlite command.
You can use a single command:
./mvnw clean package && echo "java -jar \"/usr/local/bin/jhlite.jar\" \"\$@\"" | sudo tee /usr/local/bin/jhlite > /dev/null && sudo chmod +x /usr/local/bin/jhlite && JAR_SOURCE=$(ls target/jhlite-cli-*.jar | head -n 1) && [ -n "$JAR_SOURCE" ] && sudo mv "$JAR_SOURCE" /usr/local/bin/jhlite.jar || echo "No JAR file found in target directory"
After the installation, you can use the jhlite
with help command to know the options:
jhlite --help