Overview
Thebench get-app command (also available as bench get) clones an application from a Git repository and sets it up in your bench. This is the primary way to add new apps to your bench instance.
Syntax
Arguments
The Git repository URL or path to clone from. Can be:
- HTTPS URL:
https://github.com/frappe/erpnext - SSH URL:
[email protected]:frappe/erpnext.git - Local path:
/path/to/local/repo - GitHub shorthand:
frappe/erpnext
Options
Specific branch to checkout after cloning.
Overwrite the app if it already exists in the bench. Use with caution as this will remove the existing app directory.
Do not build front-end assets after installing the app. Useful for faster installation when you plan to build assets later.
Create a symbolic link to the Git repository instead of cloning. Useful for development when you want to work on the app code directly.
Initialize a new bench if the current directory is not already a bench. This allows you to run
get-app from any directory.Automatically resolve and install app dependencies before installing the app. Dependencies are read from the app’s metadata.
Cache key for storing get-app artifacts. Only the first 10 characters are used. Useful in CI/CD pipelines for caching app installations.
Compress (gzip) get-app artifacts that are cached. Used in combination with
--cache-key to reduce storage space.Usage Examples
Install App from GitHub
Install ERPNext from the official repository:Install Specific Branch
Install a specific version of an app:Development Installation
Link a local app repository for development:Install with Dependencies
Automatically resolve and install dependencies:CI/CD with Caching
Install app with caching for faster subsequent builds:Skip Asset Building
Install app without building assets (build them all at once later):Overwrite Existing App
Replace an existing app installation:Common Patterns
Installing Multiple Apps
Install multiple apps efficiently by skipping assets and building once:Development Workflow
Set up apps for active development:Install from Private Repository
For private repositories, use SSH authentication:Make sure your SSH keys are properly configured and you have access to the repository.
After Installation
After getting an app, you need to install it on a site to use it:What Happens During get-app
- Clone: The app repository is cloned into the
apps/directory - Install: Python dependencies are installed in the virtual environment
- Build: Front-end assets are built (unless
--skip-assetsis used) - Cache: Artifacts are cached if
--cache-keyis provided
Troubleshooting
App Already Exists
If you get an error that the app already exists:Asset Build Errors
If asset building fails, you can skip it and build manually:Related Commands
bench new-app- Create a new Frappe appbench remove-app- Remove an app from the benchbench install-app- Install an app on a sitebench build- Build front-end assets