Skip to content

Command Reference

Complete reference for all fm CLI commands. Each command page includes usage, options, and real-world examples.


Quick Start

The most common commands to get you started:

  • Create a bench


    fm create mybench
    fm create mybench --apps erpnext
    
  • Start & Stop


    fm start mybench
    fm stop mybench
    
  • Run commands


    fm shell mybench
    fm shell mybench -c "bench --version"
    
  • Add SSL


    fm ssl add mybench example.com
    fm ssl add mybench example.com --challenge dns01
    

Bench Lifecycle

Core commands for creating and managing benches.

fm create

Create a new bench with apps

Set up a fresh Frappe development or production environment with your choice of apps, Python/Node versions, and configuration.

fm create mybench
fm create mybench --apps erpnext --apps hrms
fm create mybench -e prod

fm start

Start a bench

Brings up all containers and services for a stopped bench.

fm start mybench
fm start mybench --container-logs

fm stop

Stop a bench

Shuts down all containers without removing any data.

fm stop mybench

fm restart

Restart bench services

Restart web, workers, or specific services using supervisor or container restart.

fm restart mybench
fm restart mybench --supervisor
fm restart mybench --workers --no-web

fm delete

Delete a bench

Permanently removes a bench directory and optionally its database from global-db.

fm delete mybench
fm delete mybench --delete-db-from-global-db

fm list

Show all benches

List all benches with their status and basic info.

fm list

Development & Debugging

Tools for working with running benches.

fm shell

Open shell or run commands

Execute commands inside containers, open interactive shells, or use the Frappe bench console.

fm shell mybench
fm shell mybench -c "bench --version"
fm shell mybench --bench-console

fm code

Open in VSCode

Launch VSCode with the bench directory and attach to containers for debugging.

fm code mybench
fm code mybench --stop-before

fm logs

View bench logs

Stream or display logs from bench services (frappe, nginx, redis, etc.).

fm logs mybench
fm logs mybench -f
fm logs mybench --service nginx

fm info

Show bench details

Display comprehensive bench configuration, status, installed apps, and environment info.

fm info mybench
fm info mybench --verbose

Configuration

Modify bench settings and infrastructure.

fm update

Update bench configuration

Change environment type, Python/Node versions, enable/disable admin tools, manage alias domains, and more.

fm update mybench -e prod
fm update mybench --admin-tools enable
fm update mybench --python 3.11 --node 20

fm reset

Reset a bench

Drop the database and reinstall all apps from scratch. Destructive operation.

fm reset mybench

fm ngrok

Create ngrok tunnel

Expose a local bench to the internet via ngrok for webhooks, mobile testing, or demos.

fm ngrok mybench

SSL & Security

Manage SSL certificates and HTTPS.

fm ssl

Manage SSL certificates

Add, remove, renew, and list SSL certificates using Let's Encrypt (HTTP-01 or DNS-01 challenges).

fm ssl add mybench example.com
fm ssl add mybench example.com --challenge dns01
fm ssl remove mybench example.com
fm ssl renew mybench example.com
fm ssl list mybench

Global Services

Manage shared services used by all benches.

fm services

Manage global services

Start, stop, restart, or shell into global services like global-db and global-nginx-proxy.

fm services start global-db
fm services stop all
fm services restart global-nginx-proxy
fm services shell global-db

Maintenance

System-level operations and updates.

fm migrate

Run fm migrations

Apply database or configuration migrations when upgrading Frappe Manager versions.

fm migrate
fm migrate --skip-backup

fm self

Manage the tool itself

Update fm, pull latest Docker images, or run raw docker-compose commands on benches.

fm self update
fm self update-images
fm self compose mybench ps

Quick Help

Use fm <command> --help to see detailed options and examples for any command.