A Capistrano-style deployment tool for Node.js applications, static sites, binaries, and containers. Catapult deploys over SSH with versioned releases, shared directories, a composable task pipeline, and rollback. It requires no Catapult agent on the server.
Full documentation at https://catapultjs.com/
- SSH-based: transfer files with tar over SSH, Git, or rsync
- Versioned releases: each release lives in
releases/<release>and is activated through thecurrentsymlink. Catapult can restore the previous release if deployment fails after publication - Composable pipeline: insert, remove or replace any task with a single function call, or rewrite the whole sequence
- Drop-in recipes: import once, tasks register themselves and wire into the pipeline
- Multi-host: deploy to one server or several, with per-host configuration
- Healthcheck: configure an HTTP check to verify the app responds after publication
Run init at the root of your project. It lets you choose TypeScript, JavaScript or JSON, creates the matching deploy.config.* file, and installs @catapultjs/deploy as a dev dependency:
npx @catapultjs/deploy initEdit the generated config to describe your hosts and pick your recipes. This TypeScript example deploys the main branch with the Git recipe:
import { defineConfig } from '@catapultjs/deploy'
import '@catapultjs/deploy/recipes/git'
export default defineConfig({
hosts: [
{
name: 'production',
ssh: 'deploy@example.com',
deployPath: '/home/deploy/myapp',
branch: 'main',
},
],
})For a fully declarative config, choose JSON. Catapult validates it against the schema shipped with the package and supports built-in recipes, store values, custom task steps and declarative pipeline controls:
{
"$schema": "https://catapultjs.com/schema/deploy.schema.json",
"version": 1,
"recipes": ["git"],
"config": {
"hosts": [
{
"name": "production",
"ssh": "deploy@example.com",
"deployPath": "/home/deploy/myapp",
"branch": "main"
}
]
}
}See the JSON configuration guide for tasks, pipeline customization, supported recipes and the cases that still require TypeScript or JavaScript.
The Git recipe uses the local repository's origin by default. Both machines need access to that repository. Add the build and service recipes your application needs before deploying. See the deployment examples for complete configurations.
Validate the configuration locally, prepare the server once per host, then deploy:
npx cata config:validate
npx cata deploy:setup
npx cata deploy/home/deploy/myapp/
current/ → symlink to releases/<release>
previous → symlink to the release replaced by the last publication
releases/
2024-01-15T.../ ← active release
2024-01-14T.../
shared/
.env
logs/
.catapult/
repo/ ← bare git mirror (git recipe)
revisions.log ← JSON deployment history
deploy.lock ← present during a deployment
- Node.js servers.
adonisjsandnextjssupport remote, local, and local container builds.astro,nestjs,nuxt, andtanstackcover other server frameworks. Usepm2orsystemdto manage processes. - Static sites.
astro_static,nextjs_static,nuxt_static, andvitepressbuild locally and deploy the generated output. - Container workloads (experimental).
composedeploys a Compose stack,containerruns services from one image with Docker or Podman, andquadletruns Podman containers through systemd. Images can be streamed over SSH, transferred through a registry, or built on the server. - Compiled binaries (experimental).
laravel_goandlaravel_rustdeploy compiled applications and run migrations before publication. - Infrastructure.
gitandrsyncprovide alternative file transfers.caddy,directus, andredisadd service-specific tasks.
See the recipe catalog and the container build guide for build and runtime requirements. For upgrades, see the changelog. The adonisjs_local and nextjs_local recipes are deprecated. Use the main recipes with build.location: 'local'.
- Node.js 24 or newer and OpenSSH tools (
sshandscp) on the machine running Catapult - SSH access to a remote Bash shell with write access to the deployment path
tarwith gzip support on both machines for directory uploads- Git, rsync, the application runtime, and service tools as required by the selected recipes
The package ships a catapultjs agent skill for Claude Code and SKILL.md-compatible agents, with references covering the deploy config, recipe writing and the programmatic API.
npx skills add catapultjs/deployIf you've written a recipe that could be useful to others, open a pull request that adds it to the recipes/ directory, with its tests and a documentation page in docs/guide/recipes/.
Inspired by Deployer PHP and Capistrano.