CLI Installation

Install the MoroJS CLI globally to access powerful development tools for project scaffolding, module generation, and deployment automation.

Prerequisites

  • Node.js 18+ installed
  • npm, yarn, or pnpm package manager
  • Git (for version control)
  • TypeScript knowledge (recommended)

Installation

Global Installation (Recommended)

npm

bash

1npm install -g @morojs/cli

yarn

bash

1yarn global add @morojs/cli

pnpm

bash

1pnpm add -g @morojs/cli

Using npx (No Installation)

Run without installing

bash

1npx @morojs/cli init my-project

Use npx to run CLI commands without global installation. This is useful for one-time usage or CI/CD environments.

Verify Installation

Check version

bash

1morojs-cli --version

View help

bash

1morojs-cli --help

Success!

If you see the version number and help output, the CLI is successfully installed and ready to use.

Updating the CLI

Keep your CLI up to date to access the latest features and improvements:

npm

bash

1npm update -g @morojs/cli

yarn

bash

1yarn global upgrade @morojs/cli

pnpm

bash

1pnpm update -g @morojs/cli

Troubleshooting

Common Issues

Permission errors on macOS/Linux

If you get permission errors, you may need to use sudo or configure npm to use a different directory:

Fix permissions

bash

1sudo npm install -g @morojs/cli
Command not found

If the command is not found after installation, check that your global npm bin directory is in your PATH:

Check npm path

bash

1npm config get prefix
Node.js version issues

Ensure you're using Node.js 18 or higher. Check your version with:

Check Node version

bash

1node --version

Next Steps