NitroStack Logo
/cli
/pack

Pack Command

Overview

The pack command packages your NitroStack project into an optimized zip file suitable for deployment, container image building, or distribution to NitroCloud.

It automatically excludes build artifacts, dependencies, and environment secrets, while enforcing canonical .gitignore rules.


Usage

Bash
npx @nitrostack/cli pack [options]
# or:
nitrostack-cli pack [options]
# or standalone:
nitrostack-pack [options]

Options

OptionShorthandDescriptionDefault
--output <path>-oOutput zip filename (saved to project root)<project-name>.zip
--dry-runPreview files included/excluded without creating the zipfalse
--include-envInclude .env files in the zip (use with caution!)false
--no-sync-gitignoreSkip merging canonical NitroStack ignore rules into .gitignorefalse
--cwd <dir>Specify target project directoryCurrent directory

What Gets Excluded

To keep archive sizes small and protect credentials, pack automatically excludes:

  • Dependencies: node_modules/
  • Build Artifacts: dist/, .next/, build/, out/
  • Secrets & Credentials: .env, .env.local, .env.production (unless --include-env is passed)
  • Version Control: .git/, .github/
  • Logs & OS Temp: *.log, .DS_Store, Thumbs.db

Examples

1. Standard Pack

Create a clean deployment archive:

Bash
nitrostack-cli pack

Output: my-mcp-server.zip in project root.

2. Preview with Dry Run

Inspect what files will be included before packing:

Bash
nitrostack-cli pack --dry-run

3. Custom Output Name

Bash
nitrostack-cli pack -o production-build.zip

Next Steps