Installation
Package Overview
NitroStack consists of three separate packages:
| Package | Purpose | When to Install |
|---|---|---|
@nitrostack/cli | CLI tools for project management | Install globally once |
nitrostack | Core SDK for MCP servers | Included in projects |
@nitrostack/widgets | Widget development SDK | Included in widget projects |
Install CLI (Required)
Install the NitroStack CLI globally:
Bash
npm install -g @nitrostack/cli
Verify Installation
Bash
nitrostack-cli --version
Alternative: Use npx
You can also use npx without global installation:
Bash
npx @nitrostack/cli init my-project
Project Dependencies
When you create a new project, dependencies are automatically added:
Root Project (package.json)
JSON
{
"dependencies": {
"nitrostack": "^1",
"zod": "^3.22.4",
"dotenv": "^16.3.1"
},
"devDependencies": {
"@nitrostack/cli": "^1",
"@types/node": "^22.10.0",
"typescript": "^5.3.3"
}
}
Widgets Project (src/widgets/package.json)
JSON
{
"dependencies": {
"@nitrostack/widgets": "^1",
"next": "^14",
"react": "^18",
"react-dom": "^18"
}
}
System Requirements
- Node.js: 18.x or 20.x (LTS recommended)
- npm: 8.x or newer
- OS: Windows, macOS, or Linux
Install in Existing Projects
Installing Root Dependencies
Bash
# Install all dependencies in root and widgets
nitrostack-cli install
This runs npm install in both the root directory and src/widgets.
Manual Installation
Bash
# Root dependencies
npm install nitrostack zod dotenv
npm install -D @nitrostack/cli @types/node typescript
# Widget dependencies (if using widgets)
cd src/widgets
npm install @nitrostack/widgets next react react-dom
Upgrading Packages
Upgrade NitroStack packages to the latest version:
Bash
nitrostack-cli upgrade
This updates nitrostack in both root and widgets directories.
See Upgrade Command for more options.
NitroStudio Setup
NitroStudio is now a standalone application:
- Download NitroStudio from nitrostack.ai/studio
- Start your project:
npm run dev - Connect Studio to your project directory
Studio connects to your MCP server and widget server automatically.