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

xp-deploy

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xp-deploy

Universal automation and deployment tool written in JavaScript.

latest
Source
npmnpm
Version
1.3.1
Version published
Maintainers
1
Created
Source

version

Init

Create an xpd_config.json file in the project root or execute npx xp-deploy init

{
  "default": {
    "user": "dev",
    "deployTo": "/home/dev/www/test",
    "deployFrom": "./dist",
    "keepReleases": 2,
    "copy": false
  },
  "test": {
    "servers": "test.example.com",
    "preDeploy": {
      "local": ["echo 1", "echo 2"],
      "remote": "echo 3"
    },
    "postDeploy": {
      "local": "echo 1",
      "remote": "echo 2"
    }
  },
  "production": {
    "servers": ["example-01.com", "example-02.com"],
    "preDeploy": {
      "local": ["echo 1", "echo 2"],
      "remote": "echo 3"
    },
    "postDeploy": {
      "local": "echo 1",
      "remote": "echo 2"
    }
  }
}

The root key of the configuration is the name of the environment. In `default' you can specify parameters that will be applied to all default environments. Further use of the parameters overwrites the defaults.

Options

user Username for connection.

servers The address of the server to connect. If there are several servers, an array is used.

deployTo Directory to deploy on server.

deployFrom Local directory with dist.

keepReleases The number of releases to be left on the server.

preDeploy An object that contains commands to run before uploading files to the server. local to execute local commands, remote to execute on the server.

postDeploy Similarly to preDeploy only commands are executed after files are loaded.

copy Indicates whether to copy the previous release before updating the files.

Run

Deploy

npx xp-deploy deploy to:test

Rollback

Rollback to a previous release. This command is only available when keepReleases is configured.

By default, rollback to the previous release (1 release back):

npx xp-deploy rollback to:test

Rollback to N releases back:

npx xp-deploy rollback to:test 3

If the specified count exceeds the available number of releases on the server, an error will be thrown.

Keywords

automation

FAQs

Package last updated on 23 Jan 2026

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