Installation
Get the Bantam CLI installed and ready to deploy in under a minute.
Requirements
Section titled “Requirements”Before installing, ensure you have:
- Node.js version 16 or later
- npm or yarn package manager
Installation Methods
Section titled “Installation Methods”Install globally to use bantam
command anywhere:
npm install -g @bantamhq/cli
Verify installation:
bantam --version
Install globally with yarn:
yarn global add @bantamhq/cli
Verify installation:
bantam --version
Use without installing:
npx @bantamhq/cli deploy
This downloads and runs the latest version on demand.
Verify Installation
Section titled “Verify Installation”After installing globally, verify the CLI is working:
bantam --help
You should see the help output with available commands.
First Deploy
Section titled “First Deploy”Test your installation with a simple deploy:
-
Create a test HTML file:
Terminal window echo "<h1>Hello Bantam!</h1>" > index.html -
Deploy it:
Terminal window bantam deploy index.html -
Your file is now live! The CLI will show you the URL.
Updating
Section titled “Updating”To update to the latest version:
npm update -g @bantamhq/cli
yarn global upgrade @bantamhq/cli
Uninstalling
Section titled “Uninstalling”If you need to remove the CLI:
npm uninstall -g @bantamhq/cli
yarn global remove @bantamhq/cli
Troubleshooting
Section titled “Troubleshooting”Command Not Found
Section titled “Command Not Found”If bantam
command is not found after installation:
-
Check npm/yarn global bin path:
Terminal window npm bin -g# oryarn global bin -
Add to PATH if needed:
Terminal window export PATH="$PATH:$(npm bin -g)" -
Restart terminal or run:
Terminal window source ~/.bashrc# orsource ~/.zshrc
Permission Errors
Section titled “Permission Errors”If you get permission errors during global install:
Change npm’s default directory:
mkdir ~/.npm-globalnpm config set prefix '~/.npm-global'echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrcsource ~/.bashrc
Avoid global install entirely:
npx @bantamhq/cli deploy
Node Version Issues
Section titled “Node Version Issues”Check your Node.js version:
node --version
If below v16, update Node.js:
- macOS: Use Homebrew or nvm
- Windows: Download from nodejs.org
- Linux: Use your package manager or nvm
Next Steps
Section titled “Next Steps”Now that you have the CLI installed:
- Learn the commands - Explore all available commands
- Set up authentication - Unlock premium features
- See examples - Common deployment patterns