CLI Commands
Complete reference for the bp command-line tool.
Installation
bash
curl -fsSL https://pod.base.al/cli | bashGlobal Options
-h, --help Show help
-v, --version Show versionAuthentication
login
Login to a Basepod server.
bash
bp login <server>Arguments:
server- Server URL (e.g.,myserver.comorhttps://myserver.com)
Example:
bash
bp login pod.example.com
# Enter password when promptedlogout
Logout from the current server.
bash
bp logout [name]Arguments:
name- (Optional) Context name to logout from
context
List or switch server contexts.
bash
bp context [name]Arguments:
name- (Optional) Context to switch to
Examples:
bash
# List all contexts
bp context
# Switch to a context
bp context productionApp Management
apps
List all apps on the current server.
bash
bp appsAliases: app, list, ls
create
Create a new app.
bash
bp create <name> [options]Arguments:
name- App name
Options:
--domain, -d- Custom domain--port, -p- Container port--image, -i- Docker image
Examples:
bash
bp create myapp
bp create myapp --domain myapp.example.com
bp create myapp --image nginx:latest --port 80delete
Delete an app.
bash
bp delete <name>Aliases: rm
Deployment
init
Initialize a basepod.yaml config file.
bash
bp init [path]Arguments:
path- (Optional) Directory path, defaults to current directory
push
Deploy from local source.
bash
bp push [path]Arguments:
path- (Optional) Source directory, defaults to current directory
Example:
bash
# Deploy current directory
bp push
# Deploy specific path
bp push ./myappdeploy
Deploy with a Docker image or Git URL.
bash
bp deploy <name> [options]Arguments:
name- App name
Options:
--image, -i- Docker image--git, -g- Git repository URL--branch, -b- Git branch
Examples:
bash
bp deploy myapp --image nginx:latest
bp deploy myapp --git https://github.com/user/repo.git
bp deploy myapp --git https://github.com/user/repo.git --branch developApp Operations
start
Start a stopped app.
bash
bp start <name>stop
Stop a running app.
bash
bp stop <name>restart
Restart an app.
bash
bp restart <name>logs
View app logs.
bash
bp logs <name> [options]Options:
--tail, -n- Number of lines (default: 100)
Examples:
bash
bp logs myapp
bp logs myapp --tail 500
bp logs myapp -n 50Server Info
info
Show server information.
bash
bp infoConfiguration File
The basepod.yaml file in your project root:
yaml
name: myapp
server: pod.example.com # Optional: specific server context
domain: custom.example.com # Optional: custom domain
port: 3000 # Container port
build:
dockerfile: Dockerfile
context: .
env:
NODE_ENV: production
API_KEY: secret
volumes:
- data:/app/dataEnvironment Variables
BASEPOD_SERVER- Default server URLBASEPOD_TOKEN- Authentication token
Exit Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid arguments |
| 3 | Authentication error |
| 4 | Network error |