svipall 1.0.0-rc
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/README.md +31 -0
- package/bin/svipall-mcp.js +13 -0
- package/bin/svipall.js +13 -0
- package/install.js +90 -0
- package/package.json +21 -0
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# svipall
|
|
2
|
+
|
|
3
|
+
Local-first web scraping and captcha MCP server for AI agents. No cloud, no API keys, no paid
|
|
4
|
+
captcha service and no telemetry: everything runs on the machine you install it on.
|
|
5
|
+
|
|
6
|
+
This package carries no code of its own. On install it downloads the release build for your
|
|
7
|
+
platform from [GitHub](https://github.com/ilien-dev/svipall/releases), checks it against the
|
|
8
|
+
published `sha256sums.txt`, and puts the two binaries behind these shims. It exists because `npx`
|
|
9
|
+
is how a lot of people already run an MCP server.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx --yes svipall doctor # what this installation can do, and the fix for anything it cannot
|
|
13
|
+
npx --yes svipall fetch https://example.com
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
As an MCP server:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
claude mcp add svipall -- npx --yes svipall-mcp
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Platforms with a build: Linux x86-64 and arm64, macOS Intel and Apple silicon, Windows x86-64. On
|
|
23
|
+
anything else the install says why and stops, without failing the rest of your install.
|
|
24
|
+
|
|
25
|
+
Browser tiers need a Chromium-based browser. Run `npx svipall browser install` for a Chrome for
|
|
26
|
+
Testing of its own (~190 MB), or point `browser_path` at one you already have.
|
|
27
|
+
|
|
28
|
+
Full documentation: **https://github.com/ilien-dev/svipall** ·
|
|
29
|
+
installing: [docs/install.md](https://github.com/ilien-dev/svipall/blob/main/docs/install.md)
|
|
30
|
+
|
|
31
|
+
AGPL-3.0-only.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// A shim, not a wrapper: it execs the real binary with this process's arguments and stdio, so
|
|
3
|
+
// stdin stays a pipe and an MCP client sees no difference from running the binary directly.
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const { spawnSync } = require('node:child_process');
|
|
6
|
+
const exe = path.join(__dirname, '..', 'vendor', 'svipall-mcp' + (process.platform === 'win32' ? '.exe' : ''));
|
|
7
|
+
const r = spawnSync(exe, process.argv.slice(2), { stdio: 'inherit' });
|
|
8
|
+
if (r.error) {
|
|
9
|
+
console.error('svipall: ' + r.error.message);
|
|
10
|
+
console.error('svipall: the postinstall download may not have run; try reinstalling the package.');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
process.exit(r.status === null ? 1 : r.status);
|
package/bin/svipall.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// A shim, not a wrapper: it execs the real binary with this process's arguments and stdio, so
|
|
3
|
+
// stdin stays a pipe and an MCP client sees no difference from running the binary directly.
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const { spawnSync } = require('node:child_process');
|
|
6
|
+
const exe = path.join(__dirname, '..', 'vendor', 'svipall' + (process.platform === 'win32' ? '.exe' : ''));
|
|
7
|
+
const r = spawnSync(exe, process.argv.slice(2), { stdio: 'inherit' });
|
|
8
|
+
if (r.error) {
|
|
9
|
+
console.error('svipall: ' + r.error.message);
|
|
10
|
+
console.error('svipall: the postinstall download may not have run; try reinstalling the package.');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
process.exit(r.status === null ? 1 : r.status);
|
package/install.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Download the release build for this platform.
|
|
2
|
+
//
|
|
3
|
+
// npm is not how this is built; it is how a lot of people already run an MCP server, and `npx
|
|
4
|
+
// svipall-mcp` is the cheapest possible answer to "how do I try this". So the package carries no
|
|
5
|
+
// code of its own: it fetches the same archive install.sh does, checks it against the same
|
|
6
|
+
// published sha256sums.txt, and unpacks it next to these two shims.
|
|
7
|
+
const fs = require('node:fs');
|
|
8
|
+
const os = require('node:os');
|
|
9
|
+
const path = require('node:path');
|
|
10
|
+
const crypto = require('node:crypto');
|
|
11
|
+
const { execFileSync } = require('node:child_process');
|
|
12
|
+
|
|
13
|
+
const REPO = 'ilien-dev/svipall';
|
|
14
|
+
const VERSION = require('./package.json').version;
|
|
15
|
+
|
|
16
|
+
const TARGETS = {
|
|
17
|
+
'linux-x64': 'x86_64-unknown-linux-gnu',
|
|
18
|
+
'linux-arm64': 'aarch64-unknown-linux-gnu',
|
|
19
|
+
'darwin-x64': 'x86_64-apple-darwin',
|
|
20
|
+
'darwin-arm64': 'aarch64-apple-darwin',
|
|
21
|
+
'win32-x64': 'x86_64-pc-windows-msvc',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
async function download(url) {
|
|
25
|
+
const res = await fetch(url, { redirect: 'follow' });
|
|
26
|
+
if (!res.ok) throw new Error(`${res.status} ${res.statusText} for ${url}`);
|
|
27
|
+
return Buffer.from(await res.arrayBuffer());
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async function main() {
|
|
31
|
+
const key = `${process.platform}-${process.arch}`;
|
|
32
|
+
const target = TARGETS[key];
|
|
33
|
+
if (!target) {
|
|
34
|
+
// Not a hard failure: npm install should not break somebody's whole project over this.
|
|
35
|
+
console.error(`svipall: no release build for ${key}.`);
|
|
36
|
+
console.error('svipall: see https://github.com/' + REPO + '/blob/main/docs/install.md');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const ext = process.platform === 'win32' ? 'zip' : 'tar.gz';
|
|
41
|
+
const name = `svipall-${VERSION}-${target}.${ext}`;
|
|
42
|
+
const base = `https://github.com/${REPO}/releases/download/v${VERSION}`;
|
|
43
|
+
const dest = path.join(__dirname, 'vendor');
|
|
44
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
45
|
+
|
|
46
|
+
console.error(`svipall: downloading ${name}`);
|
|
47
|
+
const archive = await download(`${base}/${name}`);
|
|
48
|
+
|
|
49
|
+
// Verified, or the reason it could not be. A silent skip is how a swapped download becomes a
|
|
50
|
+
// binary somebody runs.
|
|
51
|
+
try {
|
|
52
|
+
const sums = (await download(`${base}/sha256sums.txt`)).toString('utf8');
|
|
53
|
+
const line = sums.split('\n').find((l) => l.trim().endsWith(name));
|
|
54
|
+
const want = line && line.trim().split(/\s+/)[0];
|
|
55
|
+
const got = crypto.createHash('sha256').update(archive).digest('hex');
|
|
56
|
+
if (!want) {
|
|
57
|
+
console.error(`svipall: warning: ${name} is not listed in sha256sums.txt; not verified`);
|
|
58
|
+
} else if (want.toLowerCase() !== got) {
|
|
59
|
+
throw new Error(`checksum mismatch for ${name} (expected ${want}, got ${got})`);
|
|
60
|
+
}
|
|
61
|
+
} catch (e) {
|
|
62
|
+
if (String(e.message).startsWith('checksum mismatch')) throw e;
|
|
63
|
+
console.error(`svipall: warning: could not verify the download (${e.message})`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const file = path.join(dest, name);
|
|
67
|
+
fs.writeFileSync(file, archive);
|
|
68
|
+
// tar is in Windows since 2018 and everywhere else forever; PowerShell handles the zip.
|
|
69
|
+
if (ext === 'zip') {
|
|
70
|
+
execFileSync('powershell', ['-NoProfile', '-Command',
|
|
71
|
+
`Expand-Archive -LiteralPath '${file}' -DestinationPath '${dest}' -Force`], { stdio: 'inherit' });
|
|
72
|
+
} else {
|
|
73
|
+
execFileSync('tar', ['-xzf', file, '-C', dest], { stdio: 'inherit' });
|
|
74
|
+
}
|
|
75
|
+
fs.rmSync(file, { force: true });
|
|
76
|
+
|
|
77
|
+
if (process.platform !== 'win32') {
|
|
78
|
+
for (const b of ['svipall', 'svipall-mcp']) {
|
|
79
|
+
const p = path.join(dest, b);
|
|
80
|
+
if (fs.existsSync(p)) fs.chmodSync(p, 0o755);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
console.error('svipall: installed. Run `npx svipall doctor` to see what it can do here.');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
main().catch((e) => {
|
|
87
|
+
console.error(`svipall: ${e.message}`);
|
|
88
|
+
console.error('svipall: install it another way - https://github.com/' + REPO + '/blob/main/docs/install.md');
|
|
89
|
+
process.exitCode = 1;
|
|
90
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "svipall",
|
|
3
|
+
"version": "1.0.0-rc",
|
|
4
|
+
"description": "Local-first web scraping and captcha MCP server for AI agents. Downloads the release build for your platform.",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"author": "ilien <code@ilien.dev>",
|
|
7
|
+
"homepage": "https://github.com/ilien-dev/svipall",
|
|
8
|
+
"repository": { "type": "git", "url": "git+https://github.com/ilien-dev/svipall.git" },
|
|
9
|
+
"keywords": ["scraping", "crawler", "captcha", "mcp", "ai", "agent", "browser"],
|
|
10
|
+
"bin": {
|
|
11
|
+
"svipall": "bin/svipall.js",
|
|
12
|
+
"svipall-mcp": "bin/svipall-mcp.js"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"postinstall": "node install.js"
|
|
16
|
+
},
|
|
17
|
+
"files": ["bin/", "install.js", "README.md"],
|
|
18
|
+
"engines": { "node": ">=18" },
|
|
19
|
+
"os": ["darwin", "linux", "win32"],
|
|
20
|
+
"cpu": ["x64", "arm64"]
|
|
21
|
+
}
|