Craft CLI
by @nerveband
Manage Craft documents via the craft CLI tool, supporting listing, searching, creating, updating, deleting, and exporting in JSON, table, or markdown formats.
clawhub install craft-cliπ About This Skill
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:
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)
~/clawd/skills/craft-cli/craft config set-api https://connect.craft.do/links/5VruASgpXo0/api/v1
Personal Space
~/clawd/skills/craft-cli/craft config set-api https://connect.craft.do/links/HHRuPxZZTJ6/api/v1
Quick Switch (Helper Script)
# Switch to wavedepth space
~/clawd/skills/craft-cli/craft-helper.sh wavedepthSwitch to personal space
~/clawd/skills/craft-cli/craft-helper.sh personalCheck current space
~/clawd/skills/craft-cli/craft-helper.sh current
Check current configuration:
~/clawd/skills/craft-cli/craft config get-api
Commands
List Documents
# JSON format (default - LLM-friendly)
~/clawd/skills/craft-cli/craft listHuman-readable table
~/clawd/skills/craft-cli/craft list --format tableMarkdown format
~/clawd/skills/craft-cli/craft list --format markdown
Search Documents
# 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
# Get document by ID (JSON)
~/clawd/skills/craft-cli/craft get Save to file
~/clawd/skills/craft-cli/craft get --output document.mdDifferent format
~/clawd/skills/craft-cli/craft get --format markdown
Create Document
# 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.mdCreate 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
Update Document
# Update title
~/clawd/skills/craft-cli/craft update --title "New Title"Update from file
~/clawd/skills/craft-cli/craft update --file updated-content.mdUpdate with inline markdown
~/clawd/skills/craft-cli/craft update --markdown "# Updated\nNew content"Update both title and content
~/clawd/skills/craft-cli/craft update --title "New Title" --file content.md
Delete Document
~/clawd/skills/craft-cli/craft delete
Info Commands
# Show API info and recent documents
~/clawd/skills/craft-cli/craft infoList all available documents
~/clawd/skills/craft-cli/craft docs
Version
~/clawd/skills/craft-cli/craft version
Output Formats
Set default format in config or use --format flag per command.
API URL Override
Override the configured API URL for any command:
~/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:
Common errors:
authentication failed. Check API URL - Invalid/unauthorized API URLresource not found - Document ID doesn't existrate limit exceeded. Retry later - Too many requestsno API URL configured. Run 'craft config set-api ' first - Missing configUsage Examples
Workflow: List and Search
# 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 tableSearch for specific documents
~/clawd/skills/craft-cli/craft search "proposal" --format table
Workflow: Create and Update
# 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 --title "Updated Project Notes"Verify the update
~/clawd/skills/craft-cli/craft get --format markdown
Workflow: Export Document
# Get a specific document and save to file
~/clawd/skills/craft-cli/craft get --output exported-notes.md
LLM Integration
# 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
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
βοΈ Configuration
Two Craft spaces are available:
wavedepth Space (Business)
~/clawd/skills/craft-cli/craft config set-api https://connect.craft.do/links/5VruASgpXo0/api/v1
Personal Space
~/clawd/skills/craft-cli/craft config set-api https://connect.craft.do/links/HHRuPxZZTJ6/api/v1
Quick Switch (Helper Script)
# Switch to wavedepth space
~/clawd/skills/craft-cli/craft-helper.sh wavedepthSwitch to personal space
~/clawd/skills/craft-cli/craft-helper.sh personalCheck current space
~/clawd/skills/craft-cli/craft-helper.sh current
Check current configuration:
~/clawd/skills/craft-cli/craft config get-api
π Tips & Best Practices
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
5. Override API URL temporarily with --api-url flag instead of changing config