XBP
XBP is the XYLEX Build Pack: a build, deployment, and operations toolkit for modern applications and multi-service projects.
current version: 10.13.0
What It Does
- Builds and deploys Rust, Node.js, Next.js, Python, Express, and mixed-service projects
- Manages PM2 processes, snapshots, resurrection, logs, and runtime inspection
- Works with nginx, ports, secrets, diagnostics, and deployment configuration
- Tracks versions across manifests and git tags
- Supports local workflows and server-side operations from one CLI
Install
Release binaries can be used directly, or build from source with Rust.
To install from Cargo:
Quick Start
Configuration
XBP looks for configuration in this order:
.xbp/xbp.yaml.xbp/xbp.yml.xbp/xbp.jsonxbp.yamlxbp.ymlxbp.json
Both JSON and YAML are supported. A project version defaults to 0.1.0.
Minimal YAML
project_name: my-app
version: 0.1.0
port: 3000
build_dir: /path/to/project
Multi-Service Example
project_name: my-stack
version: 0.1.0
port: 3000
build_dir: /srv/my-stack
services:
- name: api
target: rust
branch: main
port: 3000
root_directory: apps/api
url: https://api.example.com
commands:
install: cargo fetch
build: cargo build --release
start: ./target/release/api
- name: web
target: nextjs
branch: main
port: 3001
root_directory: apps/web
commands:
install: pnpm install
build: pnpm run build
start: pnpm run start
Core Fields
project_name: project nameversion: semantic version for the projectport: primary project portbuild_dir: absolute project pathservices: optional service list for multi-service projectsenvironment: optional environment variables
Service Fields
name: service nametarget:rust,nextjs,nodejs,python, orexpressjsbranch: deployment branchport: service portroot_directory: optional service working directoryurl: optional public URLhealthcheck_path: optional health pathcommands: optionalpre,install,build,start, anddevcommands
Common Commands
Project And Services
xbp servicesxbp service build <name>xbp service install <name>xbp service start <name>xbp service dev <name>xbp redeploy <name>
Runtime And Operations
xbp listxbp logs [project]xbp portsxbp ports --nginxxbp ports --fullxbp diagxbp nginx listxbp nginx show <domain>xbp nginx edit <domain>xbp curl <domain>
PM2 Shortcuts
xbp snapshotxbp resurrectxbp stop <target>xbp flush [target]xbp monitorxbp env <pm2-name>
Config, Setup, And Secrets
xbp setupxbp configxbp config --projectxbp secrets pullxbp secrets verify
Versioning
xbp versionxbp version --gitxbp version majorxbp version minorxbp version patchxbp version <x.y.z>
Version Management
xbp version reads and writes versions across common project files and git tags. It normalizes v1.2.3 and 1.2.3 as the same version and can bump or set versions across supported manifests from one command.
Default tracked files include:
README.mdopenapi.yamlCargo.tomlCargo.lockpackage.jsonpackage-lock.jsonxbp.yamlxbp.json.xbp/xbp.yaml.xbp/xbp.json
The tracked file registry is synced into the global XBP config directory through versioning-files.yaml. Missing defaults are restored automatically without removing user-added entries.
PM2 Behavior
XBP uses PM2 as an execution layer for many runtime workflows.
- Deployments can start or restart services under PM2
xbp snapshotstores PM2 state for later restorexbp resurrectfirst tries native PM2 restore, then falls back to the latest XBP snapshotxbp env <name>resolves a PM2 name to its PM2 id and prints the PM2 environment
Ports And Diagnostics
xbp ports reconciles listening ports, nginx upstreams, and configured XBP project ports. xbp diag checks known service ports and highlights ports owned by recognized XBP projects.
Repository Layout
src/main.rs: CLI entrypointsrc/lib.rs: library exportssrc/cli/: argument parsing and command dispatchsrc/commands/: command implementationssrc/strategies/: deployment and project strategy logicsrc/sdk/: integrations such as PM2 and nginxsrc/utils/: shared helpers
Development
License
MIT