Commands Reference
Complete reference for all Bantam CLI commands and options.
Global Options
Section titled “Global Options”These options work with all commands:
--help, -h
- Show help for any command--version, -v
- Display CLI version
Commands
Section titled “Commands”bantam deploy
Section titled “bantam deploy”Deploy a file or directory to Bantam.
bantam deploy [path] [options]
Arguments
Section titled “Arguments”path
- File or directory to deploy (default: current directory)
Options
Section titled “Options”Option | Alias | Description | Default |
---|---|---|---|
--subdomain | -s | Custom subdomain (e.g., my-project.bantam.site ) | Random |
--domain | -d | Deploy to custom domain | - |
--permanent | -p | Never expires (requires login) | false |
--expiry-days | -e | Days until expiration | 30 |
--yes | -y | Skip confirmation prompts | false |
Examples
Section titled “Examples”# Deploy current directorybantam deploy
# Deploy specific folderbantam deploy ./dist
# Deploy single filebantam deploy index.html
# Choose your subdomainbantam deploy -s my-awesome-site# Creates: my-awesome-site.bantam.site
# With specific folderbantam deploy ./build -s production
# Deploy to your domainbantam deploy -d example.com
# Deploy to subdomainbantam deploy -d app.example.com
# Permanent deployment (requires login)bantam deploy -p
# 7-day temporary linkbantam deploy -e 7
# 30-day deploymentbantam deploy -e 30
bantam login
Section titled “bantam login”Authenticate with your Bantam account to unlock premium features.
bantam login
This command will:
- Prompt for your personal access token
- Validate the token
- Save it securely for future use
Getting a Token
Section titled “Getting a Token”- Sign up at bantam.host
- Go to your dashboard
- Generate a personal access token
- Copy and paste when prompted
Features Unlocked
Section titled “Features Unlocked”- ✅ Permanent deployments
- ✅ Custom domains
- ✅ Project management
- ✅ Extended file size limits
bantam logout
Section titled “bantam logout”Remove stored authentication.
bantam logout
bantam list
Section titled “bantam list”View your deployments.
bantam list [options]
Options
Section titled “Options”Option | Alias | Description |
---|---|---|
--long | -l | Show detailed information |
--limit | -n | Number of projects to show |
Examples
Section titled “Examples”# List all projectsbantam list
# Show with full detailsbantam list --long
# Show last 10 projectsbantam list --limit 10
Output Format
Section titled “Output Format”Basic view shows:
- Project ID
- URL
- Created date
- Expiration status
Long format adds:
- File size
- View count
- Custom domain (if set)
bantam delete
Section titled “bantam delete”Remove a deployment permanently.
bantam delete <project-id>
Arguments
Section titled “Arguments”project-id
- The ID of the project to delete (frombantam list
)
Examples
Section titled “Examples”# Delete specific projectbantam delete 7c3d6f2a-8b9e-4f5d-a1c3
# Get ID from list firstbantam listbantam delete <copy-id-from-list>
bantam domains
Section titled “bantam domains”Manage your custom domains.
bantam domains [options]
Options
Section titled “Options”Option | Alias | Description |
---|---|---|
--verbose | -v | Show detailed domain information |
Examples
Section titled “Examples”# List all domainsbantam domains
# Show with DNS detailsbantam domains --verbose
Domain Setup
Section titled “Domain Setup”- Add domain at bantam.host/domains
- Complete DNS verification
- Deploy with
-d
flag
bantam config
Section titled “bantam config”View or set configuration options.
bantam config [key] [value]
Available Settings
Section titled “Available Settings”default-expiry
- Default expiration in daysauto-open
- Open browser after deploy (true/false)
Examples
Section titled “Examples”# View all configbantam config
# Set default expiry to 7 daysbantam config default-expiry 7
# Disable auto-open browserbantam config auto-open false
bantam help
Section titled “bantam help”Get help for any command.
bantam help [command]
Examples
Section titled “Examples”# General helpbantam help
# Command-specific helpbantam help deploybantam help domains
Exit Codes
Section titled “Exit Codes”The CLI uses standard exit codes:
0
- Success1
- General error2
- Misuse of command127
- Command not found
Common Workflows
Section titled “Common Workflows”Deploy and Share
Section titled “Deploy and Share”# Quick share for feedbackbantam deploy ./demo -e 1
Production Deploy
Section titled “Production Deploy”# Build and deploy permanentlynpm run buildbantam deploy ./dist -p -s production
Domain Management
Section titled “Domain Management”# Check domain statusbantam domains -v
# Deploy to domainbantam deploy -d mysite.com