Skip to content

Commands Reference

Complete reference for all Bantam CLI commands and options.

These options work with all commands:

  • --help, -h - Show help for any command
  • --version, -v - Display CLI version

Deploy a file or directory to Bantam.

Terminal window
bantam deploy [path] [options]
  • path - File or directory to deploy (default: current directory)
OptionAliasDescriptionDefault
--subdomain-sCustom subdomain (e.g., my-project.bantam.site)Random
--domain-dDeploy to custom domain-
--permanent-pNever expires (requires login)false
--expiry-days-eDays until expiration30
--yes-ySkip confirmation promptsfalse
Terminal window
# Deploy current directory
bantam deploy
# Deploy specific folder
bantam deploy ./dist
# Deploy single file
bantam deploy index.html

Authenticate with your Bantam account to unlock premium features.

Terminal window
bantam login

This command will:

  1. Prompt for your personal access token
  2. Validate the token
  3. Save it securely for future use
  1. Sign up at bantam.host
  2. Go to your dashboard
  3. Generate a personal access token
  4. Copy and paste when prompted
  • ✅ Permanent deployments
  • ✅ Custom domains
  • ✅ Project management
  • ✅ Extended file size limits

Remove stored authentication.

Terminal window
bantam logout

View your deployments.

Terminal window
bantam list [options]
OptionAliasDescription
--long-lShow detailed information
--limit-nNumber of projects to show
Terminal window
# List all projects
bantam list
# Show with full details
bantam list --long
# Show last 10 projects
bantam list --limit 10

Basic view shows:

  • Project ID
  • URL
  • Created date
  • Expiration status

Long format adds:

  • File size
  • View count
  • Custom domain (if set)

Remove a deployment permanently.

Terminal window
bantam delete <project-id>
  • project-id - The ID of the project to delete (from bantam list)
Terminal window
# Delete specific project
bantam delete 7c3d6f2a-8b9e-4f5d-a1c3
# Get ID from list first
bantam list
bantam delete <copy-id-from-list>

Manage your custom domains.

Terminal window
bantam domains [options]
OptionAliasDescription
--verbose-vShow detailed domain information
Terminal window
# List all domains
bantam domains
# Show with DNS details
bantam domains --verbose
  1. Add domain at bantam.host/domains
  2. Complete DNS verification
  3. Deploy with -d flag

View or set configuration options.

Terminal window
bantam config [key] [value]
  • default-expiry - Default expiration in days
  • auto-open - Open browser after deploy (true/false)
Terminal window
# View all config
bantam config
# Set default expiry to 7 days
bantam config default-expiry 7
# Disable auto-open browser
bantam config auto-open false

Get help for any command.

Terminal window
bantam help [command]
Terminal window
# General help
bantam help
# Command-specific help
bantam help deploy
bantam help domains

The CLI uses standard exit codes:

  • 0 - Success
  • 1 - General error
  • 2 - Misuse of command
  • 127 - Command not found
Terminal window
# Quick share for feedback
bantam deploy ./demo -e 1
Terminal window
# Build and deploy permanently
npm run build
bantam deploy ./dist -p -s production
Terminal window
# Check domain status
bantam domains -v
# Deploy to domain
bantam deploy -d mysite.com