Skip to content

Commit d6ef339

Browse files
morozovddclaude
andcommitted
chore: track cli/skill/SKILL.md, add .DS_Store to gitignore
The skill file should be visible in the repo for contributors. Also add .DS_Store to gitignore (was missing). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3da7dd1 commit d6ef339

2 files changed

Lines changed: 198 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ context/
1313
test*.png
1414
*-changes*.png
1515
*.screenshot.png
16-
cdrive-landing/packages/cli/skill/
16+
.DS_Store

packages/cli/skill/SKILL.md

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
---
2+
name: clawdrive
3+
description: "ClawDrive — agent-native local file platform with multimodal semantic search. Use for adding files, searching, sharing pots, inspecting/downloading shares, transcription (see transcription.md), and tunnels (see tunnels.md)."
4+
metadata: {"openclaw": {"requires": {"env": ["GEMINI_API_KEY"], "anyBins": ["ffmpeg", "ffprobe"]}, "primaryEnv": "GEMINI_API_KEY", "homepage": "https://claw3drive.com", "install": [{"kind": "node", "package": "clawdrive", "bins": ["clawdrive"], "label": "Install ClawDrive (npm)"}, {"kind": "brew", "formula": "ffmpeg", "bins": ["ffmpeg"], "label": "Install ffmpeg (brew)"}]}}
5+
---
6+
7+
# ClawDrive
8+
9+
Agent-native local file storage with multimodal semantic search, shareable collections (pots), and a 3D browser UI.
10+
11+
## Install
12+
13+
```bash
14+
npm install -g clawdrive
15+
```
16+
17+
Or run without installing: `npx clawdrive <command>`.
18+
19+
**Skill install:**
20+
```bash
21+
clawdrive install-skill # auto-detects your agent (Claude/Codex/Copilot)
22+
clawdrive install-skill --agent claude # explicit agent target
23+
clawdrive install-skill --project # install into current project instead of global
24+
npx skills add hyper3labs/clawdrive # alternative: via skills.sh
25+
```
26+
27+
## Prerequisites
28+
29+
| Dependency | Install |
30+
|---|---|
31+
| Node.js 18+ | `brew install node` |
32+
| ffmpeg | `brew install ffmpeg` |
33+
| Gemini API key | Free at https://aistudio.google.com/apikey |
34+
35+
```bash
36+
export GEMINI_API_KEY="your-key-here"
37+
```
38+
39+
## Quick Start
40+
41+
```bash
42+
clawdrive serve --demo nasa # web UI + API on :7432 (downloads ~248 MB first run)
43+
clawdrive serve --demo nasa --read-only # hosted demo, mutations blocked
44+
clawdrive serve # start with your own workspace
45+
```
46+
47+
## Core Commands
48+
49+
```bash
50+
clawdrive add ./docs ./photos # add files or directories
51+
clawdrive add https://example.com # add a URL
52+
clawdrive add --pot my-project . # add into a pot
53+
54+
clawdrive search "quarterly revenue" # text search
55+
clawdrive search --image photo.jpg # cross-modal: find docs related to a photo
56+
clawdrive search --file clip.mp4 # search by any media type
57+
58+
clawdrive pot create research # create a pot
59+
clawdrive pot add research ./papers # add files to an existing pot
60+
61+
clawdrive get "README.md" # read a file by canonical name
62+
clawdrive todo # list files missing summaries
63+
clawdrive tldr "report.pdf" --set "Q3 financials summary"
64+
clawdrive caption "photo.jpg" --set "Astronaut beside a rover on Mars"
65+
clawdrive digest "report.pdf" # show/set longer markdown digest
66+
clawdrive rename "old.txt" --set "better-name.txt"
67+
```
68+
69+
All commands accept `--json` for machine-readable output.
70+
71+
## Sharing
72+
73+
### Creating Shares
74+
75+
```bash
76+
clawdrive share pot my-project --to claude-code --role read --expires 24h
77+
clawdrive share pot my-project --link --role read # create public link (pending approval)
78+
clawdrive share inbox # list pending approvals
79+
clawdrive share approve <share-id> # approve and get token
80+
```
81+
82+
### Receiving a Share URL
83+
84+
When given a ClawDrive public share URL (`/s/<token>` or `/s/<token>/manifest.json`), follow this workflow.
85+
86+
**Input normalization** — these are all equivalent:
87+
88+
- `https://host/s/<token>`
89+
- `https://host/s/<token>/`
90+
- `https://host/s/<token>/manifest.json`
91+
92+
Do not pass item content URLs (`/items/<id>/content`) to `share info|ls|download`. Those are for direct HTTP download only.
93+
94+
**Default behavior:** If the user only pastes a share URL without saying what to do, inspect first — do not silently import everything.
95+
96+
#### Inspect a share
97+
98+
```bash
99+
clawdrive share info <share-url> # metadata + TL;DRs
100+
clawdrive share ls <share-url> # shorter file listing
101+
clawdrive --json share info <share-url> # machine-readable
102+
```
103+
104+
#### Import the full share
105+
106+
```bash
107+
clawdrive share download <share-url>
108+
clawdrive share download <share-url> --pot local-copy
109+
```
110+
111+
- If `--pot` is omitted, the CLI uses the source pot name from the manifest
112+
- Files may report as `stored`, `attached`, or `already present`
113+
- `attached` means content already existed locally and was added to the target pot
114+
- Per-item failures are reported; treat as partial success, not full success
115+
116+
#### Import selected items
117+
118+
```bash
119+
clawdrive share ls <share-url>
120+
clawdrive share download <share-url> --item <share-item-id>
121+
clawdrive share download <share-url> --item <id-1> --item <id-2> --pot selected-files
122+
```
123+
124+
#### Fetch without ClawDrive
125+
126+
Use this when the CLI is not installed and should not be, or only raw bytes are needed.
127+
128+
```bash
129+
curl -fsSL <share-url>/manifest.json # load manifest
130+
curl -fLo output.bin <share-url>/items/<share-item-id>/content # download a file
131+
file output.bin && ls -lh output.bin # verify
132+
```
133+
134+
This downloads raw files only — no dedupe, no embedding.
135+
136+
#### Agent decision logic for share URLs
137+
138+
1. User only gives a share URL → inspect first (`share info`)
139+
2. User asks what is in the share → `share info` or `share ls`
140+
3. User asks to receive/import → `share download`
141+
4. User asks for a specific file → inspect first, find the item ID, then `share download --item <id>`
142+
5. User says not to install ClawDrive → use direct HTTP fetches
143+
144+
#### Completion checks
145+
146+
For CLI import: command exits 0, summary counts match expectations, zero failed items (or failures explicitly noted).
147+
148+
For raw HTTP: response is 200, file written locally, `file <path>` confirms the expected content type.
149+
150+
### Exposing Publicly via Tunnel
151+
152+
→ See [tunnels.md](tunnels.md) for ranked tunnel options (Tailscale, Cloudflare, ngrok, etc.).
153+
154+
## Transcribing Audio & Video
155+
156+
ClawDrive embeds audio/video multimodally but does **not** extract text transcripts by default.
157+
158+
→ See [transcription.md](transcription.md) for transcription tool rankings and agent auto-detection strategy.
159+
160+
## Captioning Images
161+
162+
ClawDrive does not generate image captions by default. To add a human- or agent-authored caption to an image record, use:
163+
164+
```bash
165+
clawdrive todo --kind caption
166+
clawdrive caption photo.jpg --set "Astronaut beside a rover on Mars"
167+
```
168+
169+
If you want the caption text to exist as a standalone retrievable document, also add a sidecar `.txt` or `.md` file.
170+
171+
## API Endpoints
172+
173+
| Method | Endpoint | Description |
174+
|---|---|---|
175+
| `POST` | `/api/files/store` | Upload and embed a file |
176+
| `GET` | `/api/files` | List files |
177+
| `GET` | `/api/search?q=...` | Semantic search |
178+
| `POST` | `/api/pots` | Create a pot |
179+
| `GET` | `/api/pots/:pot/files` | List files in a pot |
180+
| `POST` | `/api/shares/pot/:pot` | Create a share |
181+
| `GET` | `/api/projections` | UMAP 3D projections |
182+
183+
## Supported File Types
184+
185+
**Documents:** PDF · **Images:** PNG, JPG, GIF, WEBP, SVG · **Video:** MP4, MOV, WEBM · **Audio:** MP3, WAV, OGG, M4A · **Text:** MD, TXT, JSON, YAML, HTML, CSS, XML · **Code:** TS, JS, PY, RS, GO
186+
187+
## Development
188+
189+
```bash
190+
git clone https://github.com/hyper3labs/clawdrive.git && cd clawdrive
191+
npm install
192+
npm run dev # turbo watch: tsc + Vite on :5173
193+
# in another terminal:
194+
node packages/cli/dist/bin/clawdrive.js serve --port 7432
195+
```
196+
197+
Vite proxies `/api``localhost:7432`.

0 commit comments

Comments
 (0)