CLI Commands

The Browserable CLI provides a simple interface to set up and manage your Browserable development environment. Here’s a comprehensive guide to all available commands.

Installation

The CLI is included in the Browserable package. Once you have cloned the repository, you can use the CLI commands directly.

Available Commands

npx browserable or npx browserable start

This is the default command that sets up and starts all Browserable services.

What it does:

  1. Checks for required dependencies:

    • Docker
    • Docker Compose
    • Node.js and npm
  2. Clones the Browserable repository (if not already present)

  3. Builds and starts all Docker containers

  4. Sets up and starts the local browser service

  5. Opens the admin UI in your default browser

Available Services:

After running this command, you can access the following services:

npx browserable down

This command stops all running Browserable Docker services.

What it does:

  1. Stops all Docker containers
  2. Removes containers while preserving data volumes

npx browserable --version

Displays the current version of the Browserable CLI.

npx browserable --help

Shows the help menu with all available commands and their descriptions.

Troubleshooting

If you encounter any issues while running the commands:

  1. Missing Dependencies

  2. Port Conflicts Make sure none of the required ports (2001-2003, 8000, 3300, 9001) are being used by other applications.

  3. Docker Issues If Docker containers fail to start, try running browserable down first, then retry the start command.