Skip to main content

Bench

Bench is the command-line interface (CLI) used to install, manage, and maintain Frappe deployments. It simplifies tasks such as creating sites, installing apps, running migrations, and managing multiple Frappe environments.

Summary

Bench consists of both the Bench CLI tool and the Bench directory. Understanding the difference between these two terms helps avoid confusion while managing Frappe environments.

Bench vs. Bench CLI

The term bench is commonly used in two different contexts:

  • Bench — Refers to the directory that contains your Frappe sites, applications, and configuration.
  • Bench CLI — Refers to the command-line tool used to manage the Bench directory and perform administrative tasks.
Tip

Although both terms are often used interchangeably in conversations, distinguishing between the Bench directory and the Bench CLI helps avoid misunderstandings when discussing deployments.

Installing Bench CLI

To install the Bench CLI and set up a new Frappe environment, follow the official Frappe installation guide.

How Bench Works

Many commands executed through the Bench CLI are actually implemented by the Frappe Framework itself. Commands that operate on a specific site typically support the --site parameter.

For example, the bench update command primarily acts as a wrapper that combines several operations, including:

  • Backing up site data
  • Running database migrations
  • Updating applications
  • Performing Bench and system-level maintenance tasks
Best Practice

Use the Bench CLI for deployment and environment management, while relying on Frappe commands for site-specific operations whenever possible.

Related Documentation

  • Bench Commands
  • Frappe Commands
  • Command Reference
  • Extending the CLI
Rating: 0 / 5 (0 votes)