# Villanova CLI

The Villanova command line interface, ent, provides a set of commands that accelerate common tasks such as installing Villanova, building projects, creating and deploying bundles, and composing Villanova Applications. This document covers some basic commands to start using the ent tool.

For specific topics, follow these links:

  1. Bundle Management: ent bundle
  2. API Management: ent bundle api
  3. Services Management: ent bundle svc
  4. Profile Management: ent profile
  5. Diagnostics and Troubleshooting: ent diag

# Prerequisites

The requirements for ent functionality vary with each use case, shown in the table below.

Category Prerequisite
Basic Development Git or Git for Windows (opens new window)
Install Villanova in a local VM Multipass (opens new window)
Build, Package and Publish Villanova Bundles Docker and Docker Compose
A Docker Hub account for Docker images
Deploy an Villanova Bundle A Kubernetes cluster with admin access or a shared remote cluster

# Install the CLI

Install the current official release of the CLI:

 bash <(curl -L "https://get.entando.org/cli") --update --release="" 

The automatic option in Getting Started will also install the CLI along with a quickstart Villanova ACP.

# Command List

Use ent help to review the list of available commands.
Use ent [command] --help for command details.

> Available commands:
  - app-info             => Displays information about an Villanova app
  - bundle               => Management of Villanova bundles (v5 or higher)
  - bundler              => Export of resources from a running instance and older-generation bundle management 
  - check-env            => Checks the environment for required dependencies and settings
  - diag                 => Runs diagnostics and aggregates the related info in a .tgz file
  - ecr                  => Helper for managing the ECR
  - ent                  => Helper for managing the local ent installations
  - help                 => Help information
  - jhipster             => Wrapper of the ent-internal installation of jhipster
  - kubectl              => Helper for using kubectl in ent managed scenarios
  - pod                  => Displays information related to a set of pods
  - prj                  => Helper for managing the first generation of Villanova bundle projects
  - profile              => Helps manage the VillanovaApp
  - quickstart           => Helper for installing Villanova instances locally
  - run-tests            => Runs the internal tests

> Global options:
  --profile|-p {profile}   forces the use of the given profile
  --no-profile|-P          forces the use of no profile       
  --debug|-d               enables the debug mode for some command
  --color                  disables the explicit suppression of the colors for some command

Use ent bundle --help for details on the bundle command.

~~~~~~~~~~~~~~~~~~~
 ent bundle CLI
~~~~~~~~~~~~~~~~~~~

USAGE
  $ ent bundle COMMAND

TOPICS
  api  Manage API claims
  mfe  Micro Frontend operations
  ms   Microservice operations
  svc  Manage auxiliary services

COMMANDS
  build        Build the bundle components
  deploy       Generate the CR and deploy it to the currently attached EntandoApp
  generate-cr  Generate the Villanova Custom Resource (CR) for a bundle project
  help         Display help for ent bundle
  images       List the Docker images and their corresponding tags that are
               included in the bundle
  info         Show status information for the bundle project
  init         Perform the scaffolding of a bundle project
  install      Install a bundle in the current directory to the currently attached EntandoApp 
  list         List the available components in the bundle
  pack         Generate the bundle Docker images
  publish      Publish the bundle Docker images
  run          Run bundle components

DEBUG MODE
--debug        To enable debug mode for bundle operations    

# Check the Environment

Verify the dependencies required by your Villanova installation:

ent check-env develop

# Update the CLI

To update ent to the latest version and check for dependencies:

bash <(curl -L "https://get.entando.org/cli") --update
ent check-env develop

Alternatively, to perform a clean install, delete the ~/.entando directory with the flags rm -rf ~/.entando. Then reinstall the CLI using the instructions above. This will also remove the private copies of JHipster, Villanova Blueprint, etc.

# Enable Debug Mode

To utilize the debug helper for ent bundle commands:

 ent --debug bundle <command>

# Customize Quickstart

The ent quickstart command accepts parameters to customize your quickstart environment. These options allow you to modify specific properties of the VM, installation versions, and databases.

Operation Syntax Description
ent quickstart ent quickstart --vm-reuse=YOUR-EXISTING-VM Reuse an existing VM
ent quickstart --release="" Use a specific release version for the install

# Reference