Nitrocloud LogoNitroStack
/cli
/installation

CLI Installation Guide

Overview

The NitroStack CLI (@nitrostack/cli) is a separate package that provides commands for creating, developing, and building MCP server projects.

Global Installation

Install the CLI globally for easy access:

Bash
npm install -g @nitrostack/cli

Verify Installation

Bash
nitrostack-cli --version

Expected output:

@nitrostack/cli/1.0.3

Alternative: Using npx

You can use npx without global installation:

Bash
# Create a new project
npx @nitrostack/cli init my-project

# Run commands in existing project
npx @nitrostack/cli dev

Requirements

  • Node.js: 18.x or 20.x (LTS recommended)
  • npm: 8.x or newer
  • OS: Windows, macOS, or Linux

Package Architecture

NitroStack uses a monorepo structure with separate packages:

PackagePurposeInstall Method
@nitrostack/cliCLI toolsnpm install -g
nitrostackCore SDKAuto-installed in projects
@nitrostack/widgetsWidget SDKAuto-installed in widget projects

Available Commands

After installation, you have access to:

CommandDescription
nitrostack-cli initCreate new project
nitrostack-cli devStart development mode
nitrostack-cli buildBuild for production
nitrostack-cli startStart production server
nitrostack-cli installInstall all dependencies
nitrostack-cli upgradeUpgrade packages
nitrostack-cli generateGenerate code scaffolds

Quick Start

Bash
# 1. Install CLI
npm install -g @nitrostack/cli

# 2. Create project
nitrostack-cli init my-project

# 3. Enter project
cd my-project

# 4. Start development
npm run dev

Updating the CLI

To update to the latest version:

Bash
npm install -g @nitrostack/cli@latest

Check for updates:

Bash
npm outdated -g @nitrostack/cli

Troubleshooting

Permission Errors (Linux/macOS)

If you get EACCES errors:

Bash
# Option 1: Fix npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

# Option 2: Use nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20
nvm use 20

Command Not Found

If nitrostack-cli is not found:

Bash
# Check npm global bin directory
npm bin -g

# Add to PATH if needed
export PATH="$(npm bin -g):$PATH"

Version Mismatch

Ensure CLI version matches your project:

Bash
# Check CLI version
nitrostack-cli --version

# Check project dependencies
cat package.json | grep nitrostack

Uninstalling

To remove the CLI:

Bash
npm uninstall -g @nitrostack/cli

Next Steps