The Modus CLI is a command-line tool for interacting with your Modus app and running it locally.

Install

Install Modus CLI via npm.

npm install -g @hypermode/modus-cli

The Modus CLI automatically downloads various files and dependencies to the following directory:

  • Linux/macOS: $HOME/.modus
  • Windows: %USERPROFILE%/.modus

If you would like to override the location of this directory, you can set the MODUS_HOME environment variable to the desired path.

For example, if your local permissions on Windows don’t allow creating a directory in the root of your user profile, you can try a different location. You can use the AppData directory, or any other directory where you have write permissions.

setx MODUS_HOME %APPDATA%\Modus

Note, the Windows setx command makes the environment variable setting permanent.

Commands

new

Initialize a new Modus app. The Modus CLI prompts you to enter the app name and language of choice.

dev

Run your Modus app locally. The Modus CLI starts a local server and provides a URL to access the app.

When using Hyp CLI alongside the Modus CLI, users get access to Hypermode-hosted models for local development.

build

Build your Modus app. The Modus CLI compiles your app and generates a .build folder for the artifacts.

uninstall

Uninstall the Modus CLI from your system.