Bench Commands
Bench is a command-line interface (CLI) tool used to manage Frappe deployments. It simplifies creating, updating, and maintaining Frappe environments with support for multiple sites and applications.
The term Bench is commonly used to refer to both the CLI tool and the bench directory. Throughout this documentation, Bench refers to the bench directory, while Bench CLI refers to the command-line utility.
Understanding the Difference
Because the same term is used for both the directory and the CLI tool, conversations can sometimes become confusing.
"Did you update the bench?"
"Yes, migrations for the latest version were smoother this time around."
"What?! I told you to update the CLI tool!"
"Let's hope our clients like Version 13"
To avoid confusion:
- Bench refers to the bench directory.
- Bench CLI refers to the command-line tool.
Installing Bench CLI
Before using Bench, install the Bench CLI and set up a Frappe environment by following the official installation guide.
Bench CLI must be installed before creating or managing Frappe sites.
How Bench CLI Works
Although Bench CLI provides the commands you use every day, many of those commands are actually implemented by the Frappe Framework itself.
Commands that operate on a specific site generally support the --site parameter and are executed through the framework.
For example, the bench update command acts as a wrapper around several Frappe Framework commands such as backup and migration, while also performing required Bench and system-level operations.
Think of Bench CLI as the orchestrator. It combines multiple Frappe Framework commands into a single workflow, making deployment and maintenance significantly easier.
Common References
The following documentation provides additional information about Bench and its commands:
- Bench Commands
- Frappe Commands
- Command References
- Extending the CLI