Skip to main content

Overview

The bench 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

bench get-app [GIT_URL] [OPTIONS]

Arguments

GIT_URL
string
required
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

--branch
string
default:"None"
Specific branch to checkout after cloning.
bench get-app https://github.com/frappe/erpnext --branch version-15
--overwrite
boolean
default:"false"
Overwrite the app if it already exists in the bench. Use with caution as this will remove the existing app directory.
--skip-assets
boolean
default:"false"
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.
bench get-app /home/user/my-app --soft-link
--init-bench
boolean
default:"false"
Initialize a new bench if the current directory is not already a bench. This allows you to run get-app from any directory.
--resolve-deps
boolean
default:"false"
Automatically resolve and install app dependencies before installing the app. Dependencies are read from the app’s metadata.
--cache-key
string
default:"None"
Cache key for storing get-app artifacts. Only the first 10 characters are used. Useful in CI/CD pipelines for caching app installations.
bench get-app erpnext --cache-key "v15-prod"
--compress-artifacts
boolean
default:"false"
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:
bench get-app erpnext
Or with full URL:
bench get-app https://github.com/frappe/erpnext

Install Specific Branch

Install a specific version of an app:
bench get-app erpnext --branch version-15

Development Installation

Link a local app repository for development:
bench get-app /home/developer/my-custom-app --soft-link

Install with Dependencies

Automatically resolve and install dependencies:
bench get-app custom-app --resolve-deps

CI/CD with Caching

Install app with caching for faster subsequent builds:
bench get-app erpnext --cache-key "erpnext-v15" --compress-artifacts

Skip Asset Building

Install app without building assets (build them all at once later):
bench get-app payments --skip-assets
bench get-app hrms --skip-assets
bench build

Overwrite Existing App

Replace an existing app installation:
bench get-app custom-app --overwrite
Using --overwrite will delete the existing app directory. Make sure you’ve committed or backed up any local changes.

Common Patterns

Installing Multiple Apps

Install multiple apps efficiently by skipping assets and building once:
bench get-app erpnext --skip-assets
bench get-app hrms --skip-assets
bench get-app payments --skip-assets
bench build --apps erpnext,hrms,payments

Development Workflow

Set up apps for active development:
# Fork and clone to local machine first
git clone [email protected]:yourusername/custom-app.git ~/dev/custom-app

# Link to bench
cd ~/frappe-bench
bench get-app ~/dev/custom-app --soft-link

Install from Private Repository

For private repositories, use SSH authentication:
bench get-app [email protected]:yourcompany/private-app.git --branch main
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:
bench --site sitename install-app appname

What Happens During get-app

  1. Clone: The app repository is cloned into the apps/ directory
  2. Install: Python dependencies are installed in the virtual environment
  3. Build: Front-end assets are built (unless --skip-assets is used)
  4. Cache: Artifacts are cached if --cache-key is provided

Troubleshooting

App Already Exists

If you get an error that the app already exists:
# Remove the app first
bench remove-app appname

# Or use --overwrite
bench get-app appname --overwrite

Asset Build Errors

If asset building fails, you can skip it and build manually:
bench get-app appname --skip-assets
bench build --app appname

Build docs developers (and LLMs) love