New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@deployit/cli

Package Overview
Dependencies
Maintainers
0
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deployit/cli

A powerful CLI tool to deploy multiple apps with one command, using PM2 and Git.

latest
npmnpm
Version
1.0.42
Version published
Maintainers
0
Created
Source

🚀 Deployit CLI Tool

NPM

A powerful CLI tool to deploy multiple apps with one command, using Git, PM2, and Node.js.

✨ Features

  • Multi-App Deployment: Deploy multiple apps at once by selecting apps and ports.
  • Git Sync: Optionally sync the latest remote repo before deploying.
  • PM2 Process Manager: Restart or reload apps with zero downtime.
  • Dry Run Mode: Simulate the entire deployment without making changes.
  • Config File Support: Use .deployrc.json for easy setups.
  • Interactive Mode: Automatically prompts for missing options.
  • Rollback on Failure: Automatically reverts to the previous working Git commit if a deployment fails.
  • App Health Check: Pings the app after deployment to verify it's running.
  • CI/CD Friendly: Usable in GitHub Actions or any CI pipeline.

📦 Installation

Use directly with npx (no install needed):

npx deployit --project MyProject --app app1,app2 --port 3000,3001 --env dev --sync true

Or install globally:

pnpm add -g @deployit/cli

Then:

deployit --project MyProject --app app1,app2 --port 3000,3001 --env prod

⚙️ Usage

One-Line Command

npx deployit --project MyProject --app web,public --port 1440,1441 --env dev --sync true --dry-run false --health-check
OptionDescription
--projectName of the project
--appComma-separated list of apps
--portComma-separated list of ports
--envEnvironment: dev or prod
--syncGit sync before deployment: true or false
--dry-runSimulate deployment without executing
--health-checkPerform a health check after app deployment

🛠️ Interactive Mode

If you run without enough arguments, the CLI will ask interactively:

npx deployit

You'll be prompted to enter project name, apps, ports, and environment.

🛠️ .deployrc.json Config (Optional)

Create a .deployrc.json in your project root:

{
  "project": "MyProject",
  "app": ["web", "public"],
  "env": "dev",
  "ports": {
    "web": 1440,
    "public": 1441
  }
}

Then simply run:

npx deployit

✅ It will auto-read .deployrc.json!

🔄 How It Works

  • (Optional) Git Sync
  • Save current Git commit hash
  • Cleanup old PM2 apps
  • Build your apps
  • Start apps using PM2
  • Health check the apps (optional)
  • If any step fails, automatically rollback to the saved Git commit

🚨 Exit Codes

SituationExit Code
Success0
App Build Failure1
Invalid Arguments/Config2
Git Sync Failure3

📜 License

MIT © [Deployit]

Keywords

deploy

FAQs

Package last updated on 22 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts