fileclaw 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +275 -0
- package/config.example.json +51 -0
- package/dist/cli.js +28609 -0
- package/dist/mcp.js +27802 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 RZacharias44
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# fileclaw
|
|
2
|
+
|
|
3
|
+
Ask Claude to find you any file on the internet. It does.
|
|
4
|
+
|
|
5
|
+
fileclaw is an [MCP server](https://modelcontextprotocol.io) that gives Claude the ability to search 26 sources, download files, and stream video — all through natural conversation. Books, papers, movies, TV, anime, manga, music, games, ROMs, software, subtitles — if it's out there, fileclaw can probably find it.
|
|
6
|
+
|
|
7
|
+
## What it looks like
|
|
8
|
+
|
|
9
|
+
> **You:** Find me the EPUB of "Designing Data-Intensive Applications"
|
|
10
|
+
>
|
|
11
|
+
> **Claude:** Found it on Library Genesis (14MB, EPUB). Downloading now... saved to ~/Downloads/
|
|
12
|
+
|
|
13
|
+
> **You:** Get me Sintel in 1080p
|
|
14
|
+
>
|
|
15
|
+
> **Claude:** Found on YTS (1.4GB, 1080p BluRay). Sending to Real-Debrid... download complete.
|
|
16
|
+
|
|
17
|
+
> **You:** Stream Big Buck Bunny
|
|
18
|
+
>
|
|
19
|
+
> **Claude:** Found a 1080p copy. Opening in VLC now.
|
|
20
|
+
|
|
21
|
+
> **You:** I need the paper with DOI 10.1038/nature12373
|
|
22
|
+
>
|
|
23
|
+
> **Claude:** Found on Sci-Hub. Downloaded PDF to ~/Downloads/
|
|
24
|
+
|
|
25
|
+
No manual searching, no navigating sketchy sites, no configuring torrent clients. Just ask.
|
|
26
|
+
|
|
27
|
+
## How it works
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
You --> Claude --> fileclaw --> 26 sources
|
|
31
|
+
|
|
|
32
|
+
LibGen, Sci-Hub, Anna's Archive,
|
|
33
|
+
YTS, Nyaa, The Pirate Bay, FitGirl,
|
|
34
|
+
Internet Archive, MangaDex, Soulseek, ...
|
|
35
|
+
|
|
|
36
|
+
Download via:
|
|
37
|
+
Direct HTTP / Real-Debrid /
|
|
38
|
+
Usenet / Torrent client
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
1. You ask Claude for something in plain language
|
|
42
|
+
2. fileclaw searches the right sources for that type of content
|
|
43
|
+
3. Results are deduplicated, ranked, and the best match is picked
|
|
44
|
+
4. The file is downloaded through whatever method works — direct download, Real-Debrid, usenet, or torrent client
|
|
45
|
+
5. Claude tells you when it's done
|
|
46
|
+
|
|
47
|
+
fileclaw learns over time: sources that deliver good results get ranked higher in future searches.
|
|
48
|
+
|
|
49
|
+
## Install
|
|
50
|
+
|
|
51
|
+
### Quickest way
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx fileclaw setup
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Interactive wizard — configures downloads, registers the MCP server with Claude Desktop or Claude Code. Done in under a minute.
|
|
58
|
+
|
|
59
|
+
### Claude Desktop
|
|
60
|
+
|
|
61
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"mcpServers": {
|
|
66
|
+
"fileclaw": {
|
|
67
|
+
"command": "npx",
|
|
68
|
+
"args": ["-y", "fileclaw", "--mcp"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Restart Claude Desktop. Ask Claude to find something.
|
|
75
|
+
|
|
76
|
+
> **Troubleshooting: "Failed to spawn process" / "No such file or directory"**
|
|
77
|
+
>
|
|
78
|
+
> Desktop apps (Claude, Cursor, etc.) don't inherit your shell's PATH. If you manage Node with **fnm**, **nvm**, or **volta**, `npx` won't be found. Fix options:
|
|
79
|
+
>
|
|
80
|
+
> - **Use `bunx` instead** (if you have Bun installed via Homebrew):
|
|
81
|
+
> ```json
|
|
82
|
+
> { "command": "bunx", "args": ["fileclaw", "--mcp"] }
|
|
83
|
+
> ```
|
|
84
|
+
> - **Use the full path to `npx`** (find it with `which npx` in your terminal):
|
|
85
|
+
> ```json
|
|
86
|
+
> { "command": "/Users/you/.local/share/fnm/aliases/default/bin/npx", "args": ["-y", "fileclaw", "--mcp"] }
|
|
87
|
+
> ```
|
|
88
|
+
> - **Use the standalone binary** — no Node/Bun required (see below)
|
|
89
|
+
|
|
90
|
+
### Claude Code
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
claude mcp add fileclaw -- npx -y fileclaw --mcp
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
> **Note:** The MCP server loads code once at startup. If you edit source files, restart the server for changes to take effect — restart Claude Desktop or start a new Claude Code session.
|
|
97
|
+
|
|
98
|
+
### Standalone binary
|
|
99
|
+
|
|
100
|
+
Download from [GitHub Releases](https://github.com/RZacharias44/fileclaw/releases) — no Node/Bun required.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
./fileclaw search "sintel" --type=video
|
|
104
|
+
./fileclaw --mcp # start as MCP server
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## What it can find
|
|
108
|
+
|
|
109
|
+
**Books & papers** — LibGen, Sci-Hub, Anna's Archive, Internet Archive
|
|
110
|
+
Search by title, author, ISBN, or DOI. Direct downloads, no torrenting needed.
|
|
111
|
+
|
|
112
|
+
**Movies & TV** — YTS, EZTV, The Pirate Bay, Nyaa, Stremio addons, Torrents-CSV
|
|
113
|
+
Finds the best quality available. Streams directly to VLC/mpv or downloads via Real-Debrid.
|
|
114
|
+
|
|
115
|
+
**Music** — Soulseek, Piped, Librivox, Nyaa, Internet Archive
|
|
116
|
+
Soulseek gives you lossless FLAC from a massive P2P network. Librivox for free audiobooks.
|
|
117
|
+
|
|
118
|
+
**Anime & manga** — Nyaa, MangaDex, WeebCentral, Comick
|
|
119
|
+
Torrents for anime, chapter-by-chapter reads or bulk downloads for manga.
|
|
120
|
+
|
|
121
|
+
**Games** — FitGirl, DODI, Myrient, RomHeaven, MarioCube
|
|
122
|
+
Repacked PC games and retro ROMs for every console.
|
|
123
|
+
|
|
124
|
+
**Software** — FileCR, The Pirate Bay, Torrents-CSV, Internet Archive
|
|
125
|
+
Mac and PC applications.
|
|
126
|
+
|
|
127
|
+
**Subtitles** — OpenSubtitles, YTS-Subs
|
|
128
|
+
Auto-matched to your downloads by language preference.
|
|
129
|
+
|
|
130
|
+
**Power-user sources** — Prowlarr, Newznab indexers
|
|
131
|
+
Prowlarr aggregates dozens of torrent and usenet indexers behind a single API. Newznab gives direct access to usenet indexers like NZBgeek. Both need an API key or self-hosted instance.
|
|
132
|
+
|
|
133
|
+
19 of the 26 sources work with zero configuration For the rest, you just need an API key.
|
|
134
|
+
|
|
135
|
+
## Download methods
|
|
136
|
+
|
|
137
|
+
fileclaw routes downloads automatically based on what you have configured:
|
|
138
|
+
|
|
139
|
+
| Method | Best for | Setup |
|
|
140
|
+
|--------|----------|-------|
|
|
141
|
+
| **Direct HTTP** | Books, papers, subtitles | Nothing — works out of the box |
|
|
142
|
+
| **Real-Debrid** | Movies, TV, games, software | API key (~$3/mo) — recommended for torrents |
|
|
143
|
+
| **Usenet** | Everything | NZBGet or SABnzbd + indexer |
|
|
144
|
+
| **Torrent client** | Everything | qBittorrent or Transmission |
|
|
145
|
+
|
|
146
|
+
Real-Debrid is the easiest upgrade: it downloads torrents in the cloud and gives you a fast direct link. No torrent client needed.
|
|
147
|
+
|
|
148
|
+
## Configuration
|
|
149
|
+
|
|
150
|
+
`~/.config/fileclaw/config.json` — or just ask Claude to run `setup()` and it walks you through it conversationally.
|
|
151
|
+
|
|
152
|
+
<details>
|
|
153
|
+
<summary>Example config</summary>
|
|
154
|
+
|
|
155
|
+
```jsonc
|
|
156
|
+
{
|
|
157
|
+
"download_dir": "~/Downloads",
|
|
158
|
+
|
|
159
|
+
// Torrent downloads via Real-Debrid (recommended)
|
|
160
|
+
"realdebrid": {
|
|
161
|
+
"api_key": "YOUR_KEY",
|
|
162
|
+
"prefer": true
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
// Usenet (pick one)
|
|
166
|
+
"usenet": {
|
|
167
|
+
"type": "sabnzbd", // "nzbget", "nzbget-cli", or "sabnzbd"
|
|
168
|
+
"url": "http://localhost:8080",
|
|
169
|
+
"api_key": "YOUR_KEY"
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
// Extra sources that need API keys
|
|
173
|
+
"sources": {
|
|
174
|
+
"newznab": [
|
|
175
|
+
{ "name": "nzbgeek", "url": "https://api.nzbgeek.info", "api_key": "YOUR_KEY" }
|
|
176
|
+
],
|
|
177
|
+
"opensubtitles": { "api_key": "YOUR_KEY" }
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
// Media player for streaming (auto-detected if omitted)
|
|
181
|
+
"player": "vlc"
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
</details>
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary>Disable a source</summary>
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{ "sources": { "tpb": false } }
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
</details>
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
<summary>Usenet setup</summary>
|
|
198
|
+
|
|
199
|
+
**NZBGet CLI** (lightest — no daemon):
|
|
200
|
+
```jsonc
|
|
201
|
+
{ "usenet": { "type": "nzbget-cli" } }
|
|
202
|
+
```
|
|
203
|
+
Needs `brew install nzbget` and `~/.nzbget` with your usenet server credentials.
|
|
204
|
+
|
|
205
|
+
**NZBGet daemon**:
|
|
206
|
+
```jsonc
|
|
207
|
+
{ "usenet": { "type": "nzbget", "url": "http://localhost:6789", "username": "nzbget", "password": "tegbzn6789" } }
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**SABnzbd**:
|
|
211
|
+
```jsonc
|
|
212
|
+
{ "usenet": { "type": "sabnzbd", "url": "http://localhost:8080", "api_key": "YOUR_SAB_API_KEY" } }
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
</details>
|
|
216
|
+
|
|
217
|
+
## CLI
|
|
218
|
+
|
|
219
|
+
fileclaw also works as a standalone command-line tool:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
fileclaw search "machine learning" --type=book
|
|
223
|
+
fileclaw stream "big buck bunny" --player=vlc
|
|
224
|
+
fileclaw scan ~/Downloads/file.mkv
|
|
225
|
+
fileclaw health
|
|
226
|
+
fileclaw stats
|
|
227
|
+
fileclaw setup
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Safety
|
|
231
|
+
|
|
232
|
+
Downloaded files can be scanned for security issues — magic byte mismatches, embedded executables, and media codec validation via ffprobe. Just ask Claude to scan a file, or use `fileclaw scan <file>`.
|
|
233
|
+
|
|
234
|
+
## Development
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
git clone https://github.com/RZacharias44/fileclaw && cd fileclaw
|
|
238
|
+
bun install
|
|
239
|
+
bun run cli search "sintel" # CLI from source
|
|
240
|
+
bun run dev # MCP server (stdio)
|
|
241
|
+
bun run typecheck # type check
|
|
242
|
+
SKIP_INTEGRATION=1 bun test # unit tests (136 tests)
|
|
243
|
+
bun test # all tests including integration
|
|
244
|
+
bun run build # bundle dist/
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Architecture
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
src/
|
|
251
|
+
sources/ 27 source implementations — each exports search(), healthCheck(), resolve()
|
|
252
|
+
tools/ Core logic: search, download, stream, scan
|
|
253
|
+
mcp/ MCP server + tool registrations (how Claude talks to fileclaw)
|
|
254
|
+
download/ Download routing: Real-Debrid, usenet, torrent client
|
|
255
|
+
config.ts User config (~/.config/fileclaw/config.json)
|
|
256
|
+
quality.ts Source ranking — learns from usage over time
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Each source is a self-contained module that implements a shared `Source` interface. Adding a new source is ~100 lines of TypeScript. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
260
|
+
|
|
261
|
+
## Contributing
|
|
262
|
+
|
|
263
|
+
fileclaw has built-in tooling for fixing broken sources and adding new ones:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
fileclaw contribute check libgen # diagnose a broken source
|
|
267
|
+
fileclaw contribute add mysite https://... # scaffold a new source
|
|
268
|
+
fileclaw contribute pr # fork + commit + open PR
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide.
|
|
272
|
+
|
|
273
|
+
## License
|
|
274
|
+
|
|
275
|
+
MIT
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"download_dir": "~/Downloads",
|
|
3
|
+
|
|
4
|
+
"realdebrid": {
|
|
5
|
+
"api_key": "YOUR_RD_API_KEY",
|
|
6
|
+
"prefer": true
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
"prowlarr": {
|
|
10
|
+
"url": "http://localhost:9696",
|
|
11
|
+
"api_key": "YOUR_PROWLARR_API_KEY"
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
"torrent_client": {
|
|
15
|
+
"type": "qbittorrent",
|
|
16
|
+
"url": "http://localhost:8080",
|
|
17
|
+
"username": "admin",
|
|
18
|
+
"password": "adminadmin"
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
"usenet": {
|
|
22
|
+
"type": "sabnzbd",
|
|
23
|
+
"url": "http://localhost:8080",
|
|
24
|
+
"api_key": "YOUR_SABNZBD_API_KEY"
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
"player": "vlc",
|
|
28
|
+
|
|
29
|
+
"subtitle_languages": ["english"],
|
|
30
|
+
|
|
31
|
+
"sources": {
|
|
32
|
+
"opensubtitles": { "api_key": "YOUR_OPENSUBTITLES_API_KEY" },
|
|
33
|
+
"newznab": [
|
|
34
|
+
{ "name": "nzbgeek", "url": "https://api.nzbgeek.info", "api_key": "YOUR_KEY" }
|
|
35
|
+
],
|
|
36
|
+
"nyaa": true,
|
|
37
|
+
"libgen": true,
|
|
38
|
+
"scihub": true
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
"scan": {
|
|
42
|
+
"claude_eval": true,
|
|
43
|
+
"ffprobe_path": "ffprobe"
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
"contribute": {
|
|
47
|
+
"enabled": false,
|
|
48
|
+
"mode": "suggest",
|
|
49
|
+
"github_token": ""
|
|
50
|
+
}
|
|
51
|
+
}
|