$npx -y skills add lubusIN/frappe-skills --skill frappe-managerUse Frappe Manager (FM) for Docker-based development and testing environments. Use when setting up local dev, running isolated tests, or managing agent-driven Frappe development workflows.
| 1 | # Frappe Manager |
| 2 | |
| 3 | Manage Docker-based Frappe development environments using Frappe Manager (FM). |
| 4 | |
| 5 | ## When to use |
| 6 | |
| 7 | - Setting up a local Frappe development environment |
| 8 | - Creating isolated test environments |
| 9 | - Agent-driven development (vibe coding) workflows |
| 10 | - Quick prototyping without full bench setup |
| 11 | - Reproducible environments across machines |
| 12 | |
| 13 | ## Inputs required |
| 14 | |
| 15 | - Docker installed and running |
| 16 | - Python 3.11+ with pipx |
| 17 | - Site/bench name |
| 18 | - Apps to install (frappe, erpnext, hrms, custom) |
| 19 | - Environment type (dev/prod) |
| 20 | |
| 21 | ## Procedure |
| 22 | |
| 23 | ### 0) Install Frappe Manager |
| 24 | |
| 25 | ```bash |
| 26 | # Install via pipx |
| 27 | pipx install frappe-manager |
| 28 | |
| 29 | # Enable shell completion |
| 30 | fm --install-completion |
| 31 | ``` |
| 32 | |
| 33 | ### 1) Create a site |
| 34 | |
| 35 | ```bash |
| 36 | # Basic site (frappe only) |
| 37 | fm create mysite |
| 38 | |
| 39 | # Site with ERPNext |
| 40 | fm create mysite --apps erpnext:version-15 |
| 41 | |
| 42 | # Site with multiple apps |
| 43 | fm create mysite --apps erpnext --apps hrms --environment dev |
| 44 | |
| 45 | # Production site with SSL |
| 46 | fm create example.com --apps erpnext --env prod --ssl letsencrypt |
| 47 | ``` |
| 48 | |
| 49 | ### 2) Manage sites |
| 50 | |
| 51 | ```bash |
| 52 | # List all sites |
| 53 | fm list |
| 54 | |
| 55 | # Start/stop site |
| 56 | fm start mysite |
| 57 | fm stop mysite |
| 58 | |
| 59 | # View site info |
| 60 | fm info mysite |
| 61 | |
| 62 | # View logs (follow) |
| 63 | fm logs mysite -f |
| 64 | |
| 65 | # Delete site |
| 66 | fm delete mysite |
| 67 | ``` |
| 68 | |
| 69 | ### 3) Development workflow |
| 70 | |
| 71 | ```bash |
| 72 | # Access shell inside container |
| 73 | fm shell mysite |
| 74 | |
| 75 | # Inside container - common commands: |
| 76 | bench new-app my_custom_app |
| 77 | bench --site mysite install-app my_custom_app |
| 78 | bench --site mysite migrate |
| 79 | bench build --app my_custom_app |
| 80 | bench --site mysite run-tests --app my_custom_app |
| 81 | |
| 82 | # Exit shell |
| 83 | exit |
| 84 | |
| 85 | # Open in VSCode |
| 86 | fm code mysite |
| 87 | |
| 88 | # Open with debugger |
| 89 | fm code mysite --debugger |
| 90 | ``` |
| 91 | |
| 92 | ### 4) Agent-driven development |
| 93 | |
| 94 | Perfect for AI agents developing Frappe apps: |
| 95 | |
| 96 | ```bash |
| 97 | # 1. Setup: Create fresh environment |
| 98 | fm create testsite --apps erpnext:version-15 --environment dev |
| 99 | fm start testsite |
| 100 | |
| 101 | # 2. Develop: Enter shell, create app |
| 102 | fm shell testsite |
| 103 | bench new-app my_app |
| 104 | bench --site testsite install-app my_app |
| 105 | # ... make code changes ... |
| 106 | exit |
| 107 | |
| 108 | # 3. Test: Run tests |
| 109 | fm shell testsite |
| 110 | bench --site testsite run-tests --app my_app |
| 111 | exit |
| 112 | |
| 113 | # 4. Verify: Check logs |
| 114 | fm logs testsite -f |
| 115 | |
| 116 | # 5. Reset if needed: Start fresh |
| 117 | fm stop testsite |
| 118 | fm delete testsite |
| 119 | fm create testsite --apps erpnext:version-15 --environment dev |
| 120 | ``` |
| 121 | |
| 122 | ### 5) Internal service management (fmx) |
| 123 | |
| 124 | Inside the container, use `fmx` for service control: |
| 125 | |
| 126 | ```bash |
| 127 | fm shell mysite |
| 128 | |
| 129 | fmx status # Check service status |
| 130 | fmx restart # Restart Frappe services |
| 131 | fmx start # Start services |
| 132 | fmx stop # Stop services |
| 133 | ``` |
| 134 | |
| 135 | ## Verification |
| 136 | |
| 137 | - [ ] Site accessible at http://mysite.localhost |
| 138 | - [ ] Can login with admin credentials (default: admin/admin) |
| 139 | - [ ] Custom app installed and visible |
| 140 | - [ ] Tests run successfully inside container |
| 141 | - [ ] Logs show no critical errors |
| 142 | |
| 143 | ## Failure modes / debugging |
| 144 | |
| 145 | - **Docker not running**: Start Docker daemon |
| 146 | - **Port conflict**: Use different site name or check port 80/443 |
| 147 | - **Site not accessible**: Check `fm list` for status, try `fm start` |
| 148 | - **App not installing**: Check `fm logs` for errors |
| 149 | - **Slow startup**: First run downloads images—be patient |
| 150 | |
| 151 | ## Escalation |
| 152 | |
| 153 | - For advanced Docker config, see [references/docker-config.md](references/docker-config.md) |
| 154 | - For SSL issues, see [references/ssl-setup.md](references/ssl-setup.md) |
| 155 | - For bench commands, see [references/bench-commands.md](references/bench-commands.md) |
| 156 | |
| 157 | ## References |
| 158 | |
| 159 | - [references/fm-commands.md](references/fm-commands.md) - Full FM command reference |
| 160 | - [references/agent-workflow.md](references/agent-workflow.md) - Agent development patterns |
| 161 | - [references/bench-commands.md](references/bench-commands.md) - Bench CLI inside container |
| 162 | - https://github.com/rtCamp/Frappe-Manager |
| 163 | |
| 164 | ## Guardrails |
| 165 | |
| 166 | - **Always backup before operations**: Run `fm backup <site>` before major changes or updates |
| 167 | - **Use named sites**: Avoid generic names; use descriptive site names for project identification |
| 168 | - **Check SSH access**: Ensure SSH keys are configured for private repos before app installation |
| 169 | - **Verify Docker status**: Run `fm doctor` to check Docker and FM health before operations |
| 170 | - **Use `fm shell` for commands**: Always enter container shell before running bench commands |
| 171 | |
| 172 | ## Common Mistakes |
| 173 | |
| 174 | | Mistake | Why It Fails | Fix | |
| 175 | |---------|--------------|-----| |
| 176 | | Running bench commands outside `fm shell` | "Command not found" or wrong site | Always `fm shell <site>` first | |
| 177 | | Wrong site context | Operations affect wrong site | Check prompt shows correct site; use `bench --site <site>` | |
| 178 | | Missing volumes on recreate | Data loss | Use `fm recreate --keep-volumes` or backup first | |
| 179 | | Not checking `fm doctor` | Silent configuration issues | Run `fm doctor` to diagnose problems | |
| 180 | | Using `localhost` in site URL | DNS resolution issues | Use `<s |