pasogott

Frappecli

開發程式設計v0.1.1
作者:pasogott更新於 2026-05-11共 2 個版本 · 最新版本釋出於 2026-01-08frappecli@clawhub_pasogott/frappecli
後端開發指令碼工具

據 AlphaMoat 統計,截至 2026-09,Frappecli 累計下載 3,310 次、獲 1 個星標,在全部 5,078 個 AI 技能中排名第 3,418 位,在「開發程式設計」分類(577 個)中排名第 436 位。

累計安裝
106
累計下載
3310
星標
1
全站排名
#3,418
全站前 68% · 「開發程式設計」前 76%
平台累計安裝累計下載星標評論
ClawHub ↗10633101-
SkillHub ↗10532321—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

主文介紹站點資訊查詢、文件列表與讀取、建立更新刪除、檔案上傳下載、報表匯出、RPC 呼叫及多站點切換。配置檔案包含 API 憑據,部分操作會修改生產資料、上傳檔案、匯出報表或呼叫自定義方法。應先在 staging 驗證,使用最小許可權憑據並保護配置檔案;生產環境中的更新、刪除、上傳、匯出或 RPC 操作必須先獲明確批准。

資料釋出於 2026-10-29

可以用來做什麼

  • 查詢站點 DocType 與文件資訊
  • 在測試環境中整理檔案或執行報表
  • 為多個 Frappe/ERPNext 站點選擇目標站點

什麼時候用

  • 使用者明確需要透過 CLI 管理 Frappe 或 ERPNext 資料時
  • 已有 staging 環境和最小許可權 API 憑據時
  • 生產寫操作、檔案上傳、匯出與 RPC 都能先經人工審批時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

在 staging 中讀取某個 Customer 文件,不要修改資料
說明刪除文件前應確認的目標站點、文件和備份事項
檢查配置中如何安全存放 API 金鑰,不要顯示其值

月度資料趨勢

累計下載3310
2051272734032026-03 · 累計下載 21442026-05 · 累計下載 26402026-06 · 累計下載 27752026-07 · 累計下載 30152026-08 · 累計下載 31642026-09 · 累計下載 331026-0326-09
星標1
0122026-03 · 星標 12026-05 · 星標 12026-06 · 星標 12026-07 · 星標 12026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093310—1
2026-083164+4.9%1
2026-073015+8.6%1
2026-062775+5.1%1
2026-052640—1
2026-032144—1

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.3 KB · ClawHub v0.1.1
---
name: frappecli
version: 0.1.0
description: CLI for Frappe Framework / ERPNext instances. Use when user asks about "Frappe", "ERPNext", "doctypes", "Frappe API", or needs to manage documents, files, reports, or call RPC methods on a Frappe site.
tools: [bash]
---

# frappecli

CLI for managing Frappe Framework instances via REST API.
展開全部(共 146 行)

## Installation

```bash
brew tap pasogott/tap
brew install frappecli
```

Or from source:
```bash
git clone https://github.com/pasogott/frappecli.git
cd frappecli && uv sync && uv pip install -e .
```

## Configuration

Create `~/.config/frappecli/config.yaml`:

```yaml
sites:
  production:
    url: https://erp.company.com
    api_key: your_api_key
    api_secret: your_api_secret
  staging:
    url: https://staging.company.com
    api_key: your_staging_key
    api_secret: your_staging_secret

default_site: production
```

## Commands

### Site Management
```bash
frappecli site doctypes                    # List all doctypes
frappecli site doctypes --module "Core"    # Filter by module
frappecli site info "User"                 # Get doctype details
```

### Document CRUD
```bash
# List documents
frappecli doc list Customer
frappecli doc list Customer --filters '{"status":"Active"}' --limit 10

# Get single document
frappecli doc get Customer CUST-001
frappecli doc get Customer CUST-001 --fields name,customer_name,status

# Create document
frappecli doc create Customer --data '{"customer_name":"Acme","customer_type":"Company"}'

# Update document
frappecli doc update Customer CUST-001 --data '{"status":"Inactive"}'

# Delete document
frappecli doc delete Customer CUST-001
```

### File Management
```bash
# Upload file (private by default)
frappecli file upload invoice.pdf --doctype "Sales Invoice" --docname "INV-001"

# Upload public file
frappecli file upload logo.png --public

# Download file
frappecli file download /private/files/invoice.pdf -o ./downloads/

# List files for document
frappecli file list --doctype "Sales Invoice" --docname "INV-001"
```

### Reports
```bash
# Run report (JSON output)
frappecli report run "General Ledger" --filters '{"company":"My Company"}'

# Export to CSV
frappecli report run "Accounts Receivable" --format csv -o report.csv
```

### RPC Methods
```bash
# Call custom method
frappecli rpc frappe.ping

# With arguments
frappecli rpc myapp.api.process_data --args '{"doc_id":"DOC-001"}'
```

### Multi-Site
```bash
# Use specific site
frappecli --site staging doc list Customer

# Switch default site
frappecli config set default_site staging
```

## Output Formats

```bash
frappecli doc list Customer --format table   # Pretty table (default)
frappecli doc list Customer --format json    # JSON
frappecli doc list Customer --format csv     # CSV
```

## Examples

### Bulk Operations
```bash
# Export all active customers
frappecli doc list Customer --filters '{"status":"Active"}' --format csv > customers.csv

# Get document with child tables
frappecli doc get "Sales Invoice" INV-001 --fields '*'
```

### Integration with jq
```bash
# Get customer names only
frappecli doc list Customer --format json | jq -r '.[].customer_name'

# Count by status
frappecli doc list Customer --format json | jq 'group_by(.status) | map({status: .[0].status, count: length})'
```

## Links

- **Repository:** https://github.com/pasogott/frappecli
- **Homebrew:** `brew install pasogott/tap/frappecli`

「開發程式設計」分類下的熱門技能

pasogott 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。