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
累計下載
3533
星標
-
全站排名
#3,113
全站前 62% · 「開發程式設計」前 69%
平台累計安裝累計下載星標評論
ClawHub ↗1063339--
SkillHub ↗1063533-—

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

這個技能是做什麼的

主文提供切換空間、列出與搜尋文件、讀取內容、建立或更新文件、刪除文件及匯出檔案的命令。配套材料指出示例中的 Craft 訪問 URL 外觀真實,不應直接使用;執行前應替換為使用者自己的受保護配置。建立、更新或刪除前,先核對當前空間和目標文件 ID,並取得確認,避免對錯誤的工作區或文件執行寫操作。

資料釋出於 2026-10-29

可以用來做什麼

  • 搜尋或列出指定 Craft 空間中的文件
  • 匯出已確認的文件以供審閱
  • 在使用者批准後準備文件建立或更新操作

什麼時候用

  • 使用者明確需要管理 Craft 文件時
  • 已用受保護的使用者配置替換示例訪問地址時
  • 所有建立、更新、刪除操作都能先確認空間和目標文件時

示例提示詞

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

列出當前空間的文件,不要輸出配置值
先說明將要匯出的文件 ID 和目標檔案,等待確認
起草一段更新內容,但不要執行更新或刪除

月度資料趨勢

累計下載3533
1979281436482026-03 · 累計下載 20942026-05 · 累計下載 26622026-06 · 累計下載 28092026-07 · 累計下載 31392026-08 · 累計下載 32852026-09 · 累計下載 353326-0326-09
星標-
0112026-03 · 星標 -2026-05 · 星標 -2026-06 · 星標 -2026-07 · 星標 -2026-08 · 星標 -2026-09 · 星標 -26-0326-09

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

月份累計下載環比星標
2026-093533—-
2026-083285+4.7%-
2026-073139+11.7%-
2026-062809+5.5%-
2026-052662—-
2026-032094—-

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),按月更新。口徑說明見資料方法。