nitrodeploy
v1.0.13
Published
Command line interface for NitroDeploy
Readme
NitroDeploy CLI
Command line interface for deploying Nuxt and Nitro applications to NitroDeploy.
Installation
npm install -g nitrodeploy-cliQuick Start
Initialize your project
nitrodeploy initDeploy your project
nitrodeploy deployCheck deployment status
nitrodeploy status
Commands
nitrodeploy init
Initialize NitroDeploy configuration for your project. This will:
- Auto-detect your framework (Nuxt 3/4, Nitro 2/3)
- Prompt for your project ID and API key
- Create a
.nitro.jsonconfiguration file
nitrodeploy initnitrodeploy deploy
Deploy your project to NitroDeploy.
# Deploy main branch
nitrodeploy deploy
# Deploy specific branch
nitrodeploy deploy --branch developnitrodeploy status
Check the status of your deployments and project information.
nitrodeploy statusnitrodeploy login
Update your API key.
nitrodeploy loginConfiguration
The CLI creates a .nitro.json file in your project root:
{
"projectId": "proj_abc123",
"apiKey": "ndp_xyz789...",
"framework": "NUXT4",
"buildCommand": "npm run build",
"outputDirectory": ".output",
"baseUrl": "http://localhost:3000"
}Configuration Options
projectId: Your NitroDeploy project IDapiKey: Your project's API keyframework: Detected framework (NUXT3, NUXT4, NITRO2, NITRO3)buildCommand: Command to build your projectoutputDirectory: Build output directorybaseUrl: NitroDeploy API base URLexcludeFiles: Additional files to exclude from deployment (optional)
Getting Your API Key
- Go to your NitroDeploy dashboard
- Navigate to your project settings
- Find the "API Key" section
- Copy your API key (starts with
ndp_)
Supported Frameworks
- Nuxt 3 - Full-stack Vue.js framework
- Nuxt 4 - Latest Nuxt with enhanced features
- Nitro 2 - Universal web server
- Nitro 3 - Next generation web server
File Exclusions
The CLI automatically excludes these files/directories:
node_modules/.git/.nitro.json*.log.env*dist/.output/.nuxt/coverage/tmp/.DS_Store
Examples
Basic Usage
# Initialize project
cd my-nuxt-app
nitrodeploy init
# Deploy to production
nitrodeploy deploy
# Check status
nitrodeploy statusCustom Branch Deployment
# Deploy feature branch
nitrodeploy deploy --branch feature/new-ui
# Deploy staging branch
nitrodeploy deploy --branch stagingTroubleshooting
"Invalid API key" Error
- Make sure your API key starts with
ndp_ - Check that the API key belongs to the correct project
- Run
nitrodeploy loginto update your API key
"Project not found" Error
- Verify your project ID starts with
proj_ - Make sure the project exists in your NitroDeploy dashboard
- Check that you have access to the project
Build Errors
- Ensure your project builds locally with
npm run build - Check that all dependencies are listed in
package.json - Verify your build command is correct in
.nitro.json
Support
For help and support:
- Check the NitroDeploy documentation
- Report issues on GitHub
- Contact support at [email protected]
