nerveband

Craft CLI

开发编程v1.6.2
作者:nerveband更新于 2026-05-18共 3 个版本 · 最新版本发布于 2026-01-27craft-cli@clawhub_nerveband/craft-cli
脚本工具

据 AlphaMoat 统计,截至 2026-09,Craft CLI 累计下载 3,533 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 3,113 位,在「开发编程」分类(577 个)中排名第 398 位。

累计安装
106
累计下载
3,533
星标
-
全站排名
#3,113
全站前 62% · 「开发编程」前 69%
平台累计安装累计下载星标评论
ClawHub ↗1063,339--
SkillHub ↗1063,533-—

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

这个技能是做什么的

主文提供切换空间、列出与搜索文档、读取内容、创建或更新文档、删除文档及导出文件的命令。配套材料指出示例中的 Craft 访问 URL 外观真实,不应直接使用;运行前应替换为用户自己的受保护配置。创建、更新或删除前,先核对当前空间和目标文档 ID,并取得确认,避免对错误的工作区或文档执行写操作。

资料发布于 2026-10-29

可以用来做什么

  • 搜索或列出指定 Craft 空间中的文档
  • 导出已确认的文档以供审阅
  • 在用户批准后准备文档创建或更新操作

什么时候用

  • 用户明确需要管理 Craft 文档时
  • 已用受保护的用户配置替换示例访问地址时
  • 所有创建、更新、删除操作都能先确认空间和目标文档时

示例提示词

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

列出当前空间的文档,不要输出配置值
先说明将要导出的文档 ID 和目标文件,等待确认
起草一段更新内容,但不要执行更新或删除

月度数据趋势

累计下载3,533
1,9792,8143,6482026-03 · 累计下载 2,0942026-05 · 累计下载 2,6622026-06 · 累计下载 2,8092026-07 · 累计下载 3,1392026-08 · 累计下载 3,2852026-09 · 累计下载 3,53326-0326-09
星标-
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 -2026-09 · 星标 -26-0326-09

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

月份累计下载环比星标
2026-093,533—-
2026-083,285+4.7%-
2026-073,139+11.7%-
2026-062,809+5.5%-
2026-052,662—-
2026-032,094—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

5.5 KB · ClawHub v1.6.2
# Craft CLI Skill

Interact with Craft Documents via the `craft` CLI tool. Fast, token-efficient, LLM-ready.

## Installation

The `craft` CLI binary should be installed at `/usr/local/bin/craft`.

If not installed:
```bash
展开全部(共 215 行)
curl -L https://github.com/nerveband/craft-cli/releases/download/v1.0.0/craft-darwin-arm64 -o craft
chmod +x craft
sudo mv craft /usr/local/bin/
```

## Configuration

Two Craft spaces are available:

### wavedepth Space (Business)
```bash
~/clawd/skills/craft-cli/craft config set-api https://connect.craft.do/links/5VruASgpXo0/api/v1
```

### Personal Space
```bash
~/clawd/skills/craft-cli/craft config set-api https://connect.craft.do/links/HHRuPxZZTJ6/api/v1
```

### Quick Switch (Helper Script)
```bash
# Switch to wavedepth space
~/clawd/skills/craft-cli/craft-helper.sh wavedepth

# Switch to personal space
~/clawd/skills/craft-cli/craft-helper.sh personal

# Check current space
~/clawd/skills/craft-cli/craft-helper.sh current
```

**Check current configuration:**
```bash
~/clawd/skills/craft-cli/craft config get-api
```

## Commands

### List Documents
```bash
# JSON format (default - LLM-friendly)
~/clawd/skills/craft-cli/craft list

# Human-readable table
~/clawd/skills/craft-cli/craft list --format table

# Markdown format
~/clawd/skills/craft-cli/craft list --format markdown
```

### Search Documents
```bash
# Search for documents
~/clawd/skills/craft-cli/craft search "query terms"

# With table output
~/clawd/skills/craft-cli/craft search "query" --format table
```

### Get Document
```bash
# Get document by ID (JSON)
~/clawd/skills/craft-cli/craft get <document-id>

# Save to file
~/clawd/skills/craft-cli/craft get <document-id> --output document.md

# Different format
~/clawd/skills/craft-cli/craft get <document-id> --format markdown
```

### Create Document
```bash
# Create with title only
~/clawd/skills/craft-cli/craft create --title "My New Document"

# Create from file
~/clawd/skills/craft-cli/craft create --title "My Document" --file content.md

# Create with inline markdown
~/clawd/skills/craft-cli/craft create --title "Quick Note" --markdown "# Hello\nThis is content"

# Create as child of another document
~/clawd/skills/craft-cli/craft create --title "Child Doc" --parent <parent-id>
```

### Update Document
```bash
# Update title
~/clawd/skills/craft-cli/craft update <document-id> --title "New Title"

# Update from file
~/clawd/skills/craft-cli/craft update <document-id> --file updated-content.md

# Update with inline markdown
~/clawd/skills/craft-cli/craft update <document-id> --markdown "# Updated\nNew content"

# Update both title and content
~/clawd/skills/craft-cli/craft update <document-id> --title "New Title" --file content.md
```

### Delete Document
```bash
~/clawd/skills/craft-cli/craft delete <document-id>
```

### Info Commands
```bash
# Show API info and recent documents
~/clawd/skills/craft-cli/craft info

# List all available documents
~/clawd/skills/craft-cli/craft docs
```

### Version
```bash
~/clawd/skills/craft-cli/craft version
```

## Output Formats

- **json** (default): Machine-readable JSON, ideal for LLMs and scripts
- **table**: Human-readable table format
- **markdown**: Markdown-formatted output

Set default format in config or use `--format` flag per command.

## API URL Override

Override the configured API URL for any command:
```bash
~/clawd/skills/craft-cli/craft list --api-url https://connect.craft.do/links/ANOTHER_LINK/api/v1
```

## Error Handling

The CLI provides clear error messages with exit codes:

- **Exit Code 0**: Success
- **Exit Code 1**: User error (invalid input, missing arguments)
- **Exit Code 2**: API error (server-side issues)
- **Exit Code 3**: Configuration error

Common errors:
- `authentication failed. Check API URL` - Invalid/unauthorized API URL
- `resource not found` - Document ID doesn't exist
- `rate limit exceeded. Retry later` - Too many requests
- `no API URL configured. Run 'craft config set-api <url>' first` - Missing config

## Usage Examples

### Workflow: List and Search
```bash
# List all documents in wavedepth space
~/clawd/skills/craft-cli/craft config set-api https://connect.craft.do/links/5VruASgpXo0/api/v1
~/clawd/skills/craft-cli/craft list --format table

# Search for specific documents
~/clawd/skills/craft-cli/craft search "proposal" --format table
```

### Workflow: Create and Update
```bash
# Create a new document
~/clawd/skills/craft-cli/craft create --title "Project Notes" --markdown "# Initial notes\n\nStart here."

# Get the document ID from output, then update
~/clawd/skills/craft-cli/craft update <doc-id> --title "Updated Project Notes"

# Verify the update
~/clawd/skills/craft-cli/craft get <doc-id> --format markdown
```

### Workflow: Export Document
```bash
# Get a specific document and save to file
~/clawd/skills/craft-cli/craft get <doc-id> --output exported-notes.md
```

### LLM Integration
```bash
# Get all documents as JSON (pipe to processing)
~/clawd/skills/craft-cli/craft list | jq '.[] | {id, title}'

# Search and extract specific fields
~/clawd/skills/craft-cli/craft search "meeting" | jq '.[].title'
```

## Tips

1. **Default to JSON format** for LLM consumption (it's the default)
2. **Use table format** when showing results to humans
3. **Check configuration** before operations: `craft config get-api`
4. **Switch spaces easily** with `craft config set-api <url>`
5. **Override API URL** temporarily with `--api-url` flag instead of changing config

## GitHub Repository

Source code and documentation: https://github.com/nerveband/craft-cli

## Version

Current version: 1.6.0

「开发编程」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。