|
| 1 | +# Frappe Agent for Codex |
| 2 | + |
| 3 | +`frappe-agent` is a Codex plugin for Frappe Framework and ERPNext development. It makes Codex more aware of Frappe-specific patterns so it can inspect benches more safely, choose the right customization layer, and avoid generic framework mistakes. |
| 4 | + |
| 5 | +## What It Covers |
| 6 | + |
| 7 | +- Frappe full-stack reasoning across backend, frontend, customization, and bench work |
| 8 | +- Bench-aware inspection before app installs, migrations, or environment changes |
| 9 | +- Frappe-native SQL and ORM guidance |
| 10 | +- Customization-layer routing for `Custom Field`, `Property Setter`, `Client Script`, `Server Script`, `Workspace`, `Web Page`, `Report`, `Dashboard`, and related surfaces |
| 11 | +- ERPNext-aware guidance for deciding between configuration, metadata, workflow, and code changes |
| 12 | +- Frontend guidance for Vue, React, `frappe-ui`, desk pages, `www`, and external SPA patterns |
| 13 | + |
| 14 | +## Included Skills |
| 15 | + |
| 16 | +- `frappe-fullstack` |
| 17 | +- `frappe-backend` |
| 18 | +- `frappe-frontend` |
| 19 | +- `frappe-bench` |
| 20 | +- `frappe-sql` |
| 21 | +- `frappe-customization` |
| 22 | +- `frappe-search` |
| 23 | +- `frappe-erpnext` |
| 24 | + |
| 25 | +## Installation |
| 26 | + |
| 27 | +This mirrored bundle ships the Codex plugin files used by the curated `awesome-codex-plugins` marketplace. |
| 28 | + |
| 29 | +For the full upstream repository, including cross-agent packaging and development docs, see: |
| 30 | + |
| 31 | +```text |
| 32 | +https://github.com/Dkm0315/frappe-agent |
| 33 | +``` |
| 34 | + |
| 35 | +### Codex |
| 36 | + |
| 37 | +Codex supports repo marketplaces and local plugin installation. |
| 38 | + |
| 39 | +If you cloned this repository locally, add it as a local marketplace: |
| 40 | + |
| 41 | +```bash |
| 42 | +codex marketplace add /path/to/frappe-agent |
| 43 | +``` |
| 44 | + |
| 45 | +Then enable `frappe-agent` from the added marketplace in Codex and restart Codex in a fresh session. |
| 46 | + |
| 47 | +Local repo flow: |
| 48 | + |
| 49 | +1. Clone this repository somewhere on disk. |
| 50 | +2. Run: |
| 51 | + |
| 52 | +```bash |
| 53 | +codex marketplace add /path/to/frappe-agent |
| 54 | +``` |
| 55 | + |
| 56 | +3. Enable `frappe-agent` from that marketplace in Codex. |
| 57 | +4. Restart Codex. |
| 58 | + |
| 59 | +GitHub repo flow: |
| 60 | + |
| 61 | +1. Clone this repository or open the repo locally. |
| 62 | +2. Run: |
| 63 | + |
| 64 | +```bash |
| 65 | +codex marketplace add /path/to/local/clone/of/frappe-agent |
| 66 | +``` |
| 67 | + |
| 68 | +3. Enable `frappe-agent` and restart Codex. |
| 69 | + |
| 70 | +This mirrored bundle includes `.codex-plugin/plugin.json` and `skills/` for Codex installation through the curated marketplace. |
| 71 | + |
| 72 | +## Usage Examples |
| 73 | + |
| 74 | +Ask Codex to use the plugin naturally in the prompt: |
| 75 | + |
| 76 | +```text |
| 77 | +Use Frappe Agent to inspect this bench before changing anything. |
| 78 | +``` |
| 79 | + |
| 80 | +```text |
| 81 | +Use Frappe Agent to choose the right Frappe customization layer for adding fields to Sales Order. |
| 82 | +``` |
| 83 | + |
| 84 | +```text |
| 85 | +Use Frappe Agent to review whether this Frappe SQL should use frappe.db, frappe.qb, or raw SQL. |
| 86 | +``` |
| 87 | + |
| 88 | +```text |
| 89 | +Use Frappe Agent to decide whether this UI should be a desk page, a www page, a Vue frappe-ui page, or a React SPA. |
| 90 | +``` |
| 91 | + |
| 92 | +## Repository Layout |
| 93 | + |
| 94 | +```text |
| 95 | +frappe-agent/ |
| 96 | +├── .codex-plugin/ |
| 97 | +│ └── plugin.json |
| 98 | +├── skills/ |
| 99 | +│ ├── frappe-backend/ |
| 100 | +│ ├── frappe-bench/ |
| 101 | +│ ├── frappe-customization/ |
| 102 | +│ ├── frappe-erpnext/ |
| 103 | +│ ├── frappe-frontend/ |
| 104 | +│ ├── frappe-fullstack/ |
| 105 | +│ ├── frappe-search/ |
| 106 | +│ └── frappe-sql/ |
| 107 | +└── README.md |
| 108 | +``` |
| 109 | + |
| 110 | +## Current Scope |
| 111 | + |
| 112 | +This mirrored bundle is a Codex-native plugin package. The upstream repository may contain additional host adapters and docs. |
| 113 | + |
| 114 | +## Design Goals |
| 115 | + |
| 116 | +- Inspect first, mutate second |
| 117 | +- Prefer Frappe-native customization surfaces before invasive code changes |
| 118 | +- Separate ERPNext configuration work from framework-code work |
| 119 | +- Respect bench context, app provenance, and version boundaries |
| 120 | +- Help agents make fewer generic Python, JavaScript, SQL, and frontend mistakes in Frappe codebases |
| 121 | + |
| 122 | +## Roadmap |
| 123 | + |
| 124 | +- Add more first-class skills for custom fields, reports, workflows, dashboards, and upgrade planning |
| 125 | +- Add better source-backed command and flag coverage for Bench |
| 126 | +- Add richer repo examples and team onboarding docs |
| 127 | + |
| 128 | +## License |
| 129 | + |
| 130 | +MIT |
0 commit comments