Skip to content

Installation

Get the Bantam CLI installed and ready to deploy in under a minute.

Before installing, ensure you have:

  • Node.js version 16 or later
  • npm or yarn package manager

Install globally to use bantam command anywhere:

Terminal window
npm install -g @bantamhq/cli

Verify installation:

Terminal window
bantam --version

After installing globally, verify the CLI is working:

Terminal window
bantam --help

You should see the help output with available commands.

Test your installation with a simple deploy:

  1. Create a test HTML file:

    Terminal window
    echo "<h1>Hello Bantam!</h1>" > index.html
  2. Deploy it:

    Terminal window
    bantam deploy index.html
  3. Your file is now live! The CLI will show you the URL.

To update to the latest version:

Terminal window
npm update -g @bantamhq/cli

If you need to remove the CLI:

Terminal window
npm uninstall -g @bantamhq/cli

If bantam command is not found after installation:

  1. Check npm/yarn global bin path:

    Terminal window
    npm bin -g
    # or
    yarn global bin
  2. Add to PATH if needed:

    Terminal window
    export PATH="$PATH:$(npm bin -g)"
  3. Restart terminal or run:

    Terminal window
    source ~/.bashrc
    # or
    source ~/.zshrc

If you get permission errors during global install:

Change npm’s default directory:

Terminal window
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Check your Node.js version:

Terminal window
node --version

If below v16, update Node.js:

Now that you have the CLI installed: