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
累计下载
3,310
星标
1
全站排名
#3,418
全站前 68% · 「开发编程」前 76%
平台累计安装累计下载星标评论
ClawHub ↗1063,3101-
SkillHub ↗1053,2321—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文介绍站点信息查询、文档列表与读取、创建更新删除、文件上传下载、报表导出、RPC 调用及多站点切换。配置文件包含 API 凭据,部分操作会修改生产数据、上传文件、导出报表或调用自定义方法。应先在 staging 验证,使用最小权限凭据并保护配置文件;生产环境中的更新、删除、上传、导出或 RPC 操作必须先获明确批准。

资料发布于 2026-10-29

可以用来做什么

  • 查询站点 DocType 与文档信息
  • 在测试环境中整理文件或运行报表
  • 为多个 Frappe/ERPNext 站点选择目标站点

什么时候用

  • 用户明确需要通过 CLI 管理 Frappe 或 ERPNext 数据时
  • 已有 staging 环境和最小权限 API 凭据时
  • 生产写操作、文件上传、导出与 RPC 都能先经人工审批时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

在 staging 中读取某个 Customer 文档,不要修改数据
说明删除文档前应确认的目标站点、文档和备份事项
检查配置中如何安全存放 API 密钥,不要显示其值

月度数据趋势

累计下载3,310
2,0512,7273,4032026-03 · 累计下载 2,1442026-05 · 累计下载 2,6402026-06 · 累计下载 2,7752026-07 · 累计下载 3,0152026-08 · 累计下载 3,1642026-09 · 累计下载 3,31026-0326-09
星标1
0122026-03 · 星标 12026-05 · 星标 12026-06 · 星标 12026-07 · 星标 12026-08 · 星标 12026-09 · 星标 126-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,310—1
2026-083,164+4.9%1
2026-073,015+8.6%1
2026-062,775+5.1%1
2026-052,640—1
2026-032,144—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),按月更新。口径说明见数据方法。