أداة للمطورينفي الإنتاج2026

ffc — Foxmayn Frappe CLI

How a Go CLI Brought Full Frappe/ERPNext Management to the Terminal

لمحة سريعة

التحدي

Managing Frappe sites required constant browser context-switching

النتيجة

Full CRUD, schema inspection, and report execution from the terminal

التقنيات المستخدمة

GoCobraFrappegoreleaser

الحالة

في الإنتاج

السياق

Frappe/ERPNext developers spend significant time in the web UI for routine operations: creating documents, inspecting schemas, running reports, and executing server methods. This workflow breaks developer flow — every operation requires opening a browser, navigating menus, and clicking through forms. For automation and CI/CD scenarios, there was no scriptable interface to interact with Frappe sites programmatically.

التحدي

Build a minimal, cross-platform CLI that covers the full Frappe document lifecycle — from CRUD operations to schema introspection and report execution — with machine-readable output formats for scripting and automation.

ما تم بناؤه

  • Built the CLI in Go using Cobra for command structure, providing sub-commands for every Frappe document operation: get-doc, list-docs, create-doc, update-doc, delete-doc, and count-docs.

  • Added schema introspection commands (list-doctypes, get-schema) so developers can explore DocType structures and field metadata without leaving the terminal.

  • Implemented advanced operations: call-method for executing whitelisted server procedures, and list-reports/run-report for running Frappe reports with custom filters.

  • Built an interactive TUI setup wizard and settings manager using Charmbracelet components, with support for multiple site profiles and configurable number/date formats.

  • Added three output formats — table (with lipgloss formatting), JSON, and YAML — so output can be piped directly into jq, yq, or other automation tools.

  • Published cross-platform binaries via goreleaser with one-liner install scripts for Linux, macOS, and Windows.

النتائج

Operations covered

Full CRUD + schema + reports + RPC

Output formats

Table, JSON, YAML

Platforms

Linux, macOS, Windows

Installation

One-liner scripts + go install

Frappe developers can now manage sites, automate document operations, and integrate Frappe into CI/CD pipelines without ever opening a browser — cutting context-switching and enabling scriptable workflows that were previously impossible.

أبرز إنجاز

Cross-platform CLI with one-liner installers, multiple output formats (table/JSON/YAML), and full Frappe document lifecycle coverage.

الأسئلة الشائعة