| Crates.io | xbp |
| lib.rs | xbp |
| version | 10.6.1 |
| created_at | 2025-03-31 15:37:56.375557+00 |
| updated_at | 2026-01-19 01:16:52.836489+00 |
| description | XBP is a zero-config build pack that can also interact with proxies, kafka, sockets, synthetic monitors. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1613547 |
| size | 765,074 |
xbp helps you build deploy and manage rust nextjs nodejs python expressjs and more integrates tightly with nginx and modern cloud devops workflows modular scriptable and built with extensibility in mind
# install rust cargo required
cargo install xbp-cli
# or build from source
cargo build --release
# list all running network ports
xbp ports
# filter by port number
xbp ports -p 3000
# list all services in current project
xbp services
# build a service
xbp service build zeus
# redeploy a service
xbp redeploy zeus
git clone https://github.com/your-org/xbp.git
cd xbp
cargo build --release
./target/release/xbp --help
xbp uses xbp.json configuration files located in .xbp/xbp.json or xbp.json in the project root
{
"project_name": "my-app",
"port": 3000,
"build_dir": "/path/to/project",
"target": "nextjs",
"branch": "main",
"npm_script": "start"
}
{
"project_name": "my-project",
"port": 3040,
"build_dir": "/path/to/project",
"services": [
{
"name": "api",
"target": "expressjs",
"branch": "main",
"port": 3000,
"root_directory": "apps/api",
"url": "https://api.example.com",
"healthcheck_path": "/",
"restart_policy": "on_failure",
"restart_policy_max_failure_count": 10,
"start_wrapper": "pm2",
"force_run_from_root": false,
"commands": {
"pre": "npm install -g pnpm",
"install": "pnpm install",
"build": "pnpm run build",
"start": "pnpm run start",
"dev": "pnpm run dev"
}
}
]
}
xbp validates service configurations and will error if
xbp services list all services from current xbp.json configxbp service <command> <service-name> run command for a service
xbp service build zeusxbp service --help <service-name> show help for a specific servicexbp redeploy <service-name> redeploy a specific service via pm2xbp redeploy [<service-name>] redeploy using redeploy.sh legacy or specific servicexbp redeploy_v2 [-p <password>] [-u <username>] [-h <host>] [-d <project-dir>] remotely redeploy using redeploy.shxbp ports [-p <port>] [--kill] [-n] list active ports and processes optionally search nginx configsxbp setup run initial setup commandsxbp config display xbp.json contentsxbp install <package> install a packagexbp logs [<project>] view pm2 logsxbp list list pm2 processesxbp -l list pm2 processes shortcutxbp curl [<url>] fetch url and display responsewhen you run xbp redeploy <service-name> the following happens
service commands respect the root_directory and force_run_from_root settings
start commands are automatically wrapped with pm2 when start_wrapper is set to pm2
the start command will be executed as pm2 start "{start_command}" --name {name} -- --port {port}
xbp integrates with pm2 for process management
xbp integrates with the xbp version api for version tracking
xbp writes logs to multiple locations
logs are rotated when they exceed 10mb
/src/main.rs cli entrypoint command parsing and dispatch/src/lib.rs core library module exports/src/commands/ cli subcommand implementations
service.rs service management commandsredeploy_service.rs service redeployment logicpm2.rs pm2 process managementconfig_cmd.rs configuration display/src/strategies/ deployment strategies and config management
deployment_config.rs config loading validation and service managementproject_detector.rs project type detectiondeployment_executor.rs deployment execution/src/utils/ utility functions
version.rs version api integration/src/logging.rs structured async logging/src/config.rs ssh and yaml config managementxbp maintains backward compatibility with legacy single service configurations if no services array is found in xbp.json the top level config is treated as a single service this allows existing projects to continue working without modification
list all services
xbp services
build a service
xbp service build zeus
install dependencies for a service
xbp service install zeus
start a service with pm2
xbp service start zeus
run dev mode for a service
xbp service dev zeus
redeploy a service
xbp redeploy zeus
show help for a service
xbp service --help zeus
prs welcome please document new modules and keep interfaces generic and reusable see src/lib.rs for api docs all code must follow rust conventions documentation should be lowercase with minimal punctuation
mit