@maybk/veri 0.0.0-stage → 0.2.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 +219 -2
- package/bin/veri.js +56 -0
- package/package.json +44 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 veri Authors
|
|
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
CHANGED
|
@@ -1,3 +1,220 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# veri
|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
<strong>Multi-provider web search and clean Markdown extraction for AI agents and developers</strong><br>
|
|
7
|
+
Single pure-Go binary with zero runtime dependencies — shipping a <strong>CLI</strong>, <strong>MCP Server</strong>, and <strong>Agent Skill</strong>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
**[简体中文](https://github.com/maybk/veri/blob/v0.2.0/README.md)** · **[English](https://github.com/maybk/veri/blob/v0.2.0/README.en.md)**
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
<br>
|
|
19
|
+
|
|
20
|
+
<img src="https://raw.githubusercontent.com/maybk/veri/v0.2.0/assets/demo-en.svg" alt="veri CLI demo" width="880">
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 📦 Download & Installation
|
|
27
|
+
|
|
28
|
+
### Install Script
|
|
29
|
+
|
|
30
|
+
**macOS / Linux**
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
curl -fsSL https://raw.githubusercontent.com/maybk/veri/main/scripts/install.sh | sh
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Windows (PowerShell)**
|
|
37
|
+
|
|
38
|
+
```powershell
|
|
39
|
+
irm https://raw.githubusercontent.com/maybk/veri/main/scripts/install.ps1 | iex
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Package Managers
|
|
43
|
+
|
|
44
|
+
**npm (macOS / Linux / Windows)**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g @maybk/veri
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Homebrew (macOS / Linux)**
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
brew install maybk/tap/veri
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Scoop (Windows)**
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
scoop bucket add maybk https://github.com/maybk/homebrew-tap
|
|
60
|
+
scoop install maybk/veri
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**mise (macOS / Linux / Windows)**
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
mise use -g npm:@maybk/veri # or mise use -g github:maybk/veri
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
<!-- Enabled once the official WinGet PR is merged
|
|
70
|
+
**WinGet (Windows)**
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
winget install maybk.Veri
|
|
74
|
+
```
|
|
75
|
+
-->
|
|
76
|
+
|
|
77
|
+
### Manual Download
|
|
78
|
+
|
|
79
|
+
Prebuilt archives and `SHA256SUMS.txt` checksums are available on [GitHub Releases](https://github.com/maybk/veri/releases); standalone installs can check and upgrade directly via `veri update`. To build from source, see the [Development & Build Guide](https://github.com/maybk/veri/blob/v0.2.0/docs/guide/development.md).
|
|
80
|
+
|
|
81
|
+
## 🚀 Quick Start
|
|
82
|
+
|
|
83
|
+
> Web page and GitHub extraction works **out of the box with no API keys**; configuring any single search provider key unlocks web search and cloud extraction. See the [Usage Guide](https://github.com/maybk/veri/blob/v0.2.0/docs/guide/usage.md) for full walkthroughs and official API key portals.
|
|
84
|
+
|
|
85
|
+
### 1. Configure API Keys
|
|
86
|
+
|
|
87
|
+
Credentials are encrypted under `~/.config/veri/` and shared automatically between the CLI and MCP server:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
veri key set exa
|
|
91
|
+
veri key list
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
You can also configure keys via `~/.config/veri/config.toml` or environment variables (environment variables always take precedence):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
export EXA_API_KEY="exa_..."
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Check active providers and health:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
veri providers
|
|
104
|
+
veri doctor
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 2. Command-Line Usage
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Extract web pages or GitHub repos / issues / PRs (no API key required)
|
|
111
|
+
veri fetch https://github.com/modelcontextprotocol/go-sdk
|
|
112
|
+
veri fetch https://example.com/article --section "Authentication" --max-chars 20000
|
|
113
|
+
|
|
114
|
+
# Web search (requires any one search provider key)
|
|
115
|
+
veri "golang mcp sdk official"
|
|
116
|
+
veri search "go 1.27 release notes" -t 6m -s go.dev -n 5
|
|
117
|
+
|
|
118
|
+
# Concurrent fusion search with JSON output
|
|
119
|
+
veri search "raft leader lease" --fusion -p exa,parallel --json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 3. MCP Server Integration
|
|
123
|
+
|
|
124
|
+
Register `veri mcp` in your MCP client (or run `veri mcp config` to generate the JSON snippet); keys stored locally are shared automatically with no need to duplicate `env`:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"mcpServers": {
|
|
129
|
+
"veri": {
|
|
130
|
+
"command": "veri",
|
|
131
|
+
"args": ["mcp"]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Without a global install, you can also run it directly via `npx`:
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"mcpServers": {
|
|
142
|
+
"veri": {
|
|
143
|
+
"command": "npx",
|
|
144
|
+
"args": ["-y", "@maybk/veri", "mcp"]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### 4. Agent Skill Installation
|
|
151
|
+
|
|
152
|
+
Recommended via [`npx skills`](https://skills.sh) for unified multi-agent installation and updates:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
npx skills add maybk/veri
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
In offline or Node-free environments:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
veri skill install # Write to the standard .agents/skills directory
|
|
162
|
+
veri skill print # Print the embedded SKILL.md
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## ✨ Features
|
|
166
|
+
|
|
167
|
+
### 🎯 Core Capabilities
|
|
168
|
+
|
|
169
|
+
- **Multi-Provider Search & Fallback** - Built-in support for DeepSeek, Keenable, Zhihu, Exa, TinyFish, Tencent WSA, Tavily, Brave, Linkup, Parallel, and Firecrawl, enabled automatically from configured keys; supports automatic failover, language-aware routing, and concurrent fusion deduplication
|
|
170
|
+
- **Clean Web & GitHub Extraction** - Built-in structured GitHub reader and pure-Go local extractor turn pages and repos / issues / PRs / discussions / commits / releases into clean Markdown with zero keys; configured cloud extractors add dynamic rendering and PDF support, plus batch fetching, section slicing, and keyword matching
|
|
171
|
+
- **Unified Filter Syntax** - One consistent set of flags for time windows, site allow/block lists, and language filters across providers, with strict native enforcement when needed
|
|
172
|
+
- **CLI / MCP / Skill in One Binary** - One static executable delivers an interactive/scriptable CLI, a standard stdio MCP server, and Agent Skill integration for AI agents
|
|
173
|
+
|
|
174
|
+
### 🔧 Security & Reliability
|
|
175
|
+
|
|
176
|
+
- **SSRF Protection & Proxy Friendly** - Local fetching blocks loopback, private, and cloud metadata targets by default while working smoothly with transparent proxy (TUN) setups
|
|
177
|
+
- **Billing-Safe Retries & Key Pools** - Never blindly replays timed-out or dropped requests; supports round-robin multi-key pools with cooldowns and tracks cost only from explicit pricing or upstream billing
|
|
178
|
+
- **Encrypted Storage & Safe Outputs** - Encrypts API keys locally, redacts secrets in logs and diagnostics, and isolates external content in MCP outputs to mitigate prompt injection
|
|
179
|
+
- **Automatic CLI Localization** - Detects OS language for human CLI output (`zh-CN` / `en-US`) while keeping `--json`, MCP schemas, and `SKILL.md` in deterministic English
|
|
180
|
+
|
|
181
|
+
## 🖥️ Supported Platforms
|
|
182
|
+
|
|
183
|
+
- **macOS** - macOS 13.0 (Ventura) or later, Apple Silicon (`arm64`) and Intel (`amd64`)
|
|
184
|
+
- **Windows** - Windows 10 / 11 (`amd64` / `arm64`)
|
|
185
|
+
- **Linux** - Static binaries for `amd64` and `arm64`
|
|
186
|
+
|
|
187
|
+
## 🏗️ Architecture
|
|
188
|
+
|
|
189
|
+
- **Go 1.27+** - Pure-Go static binary with zero runtime dependencies
|
|
190
|
+
- **`modelcontextprotocol/go-sdk`** - Official MCP stdio server and structured input/output schemas
|
|
191
|
+
- **`spf13/cobra` + `BurntSushi/toml`** - CLI command routing and strict TOML configuration decoding
|
|
192
|
+
- **`go-readability` + `x/net/html`** - Pure-Go local main-content extraction and compact Markdown conversion
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
main.go -> internal/cli | internal/mcpserver -> internal/app -> internal/router -> internal/provider/* -> internal/httpx
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## 📚 Documentation
|
|
199
|
+
|
|
200
|
+
- [Usage Guide](https://github.com/maybk/veri/blob/v0.2.0/docs/guide/usage.md)
|
|
201
|
+
- [Overview & Directory Layout](https://github.com/maybk/veri/blob/v0.2.0/docs/guide/overview.md)
|
|
202
|
+
- [Configuration Guide](https://github.com/maybk/veri/blob/v0.2.0/docs/guide/configuration.md)
|
|
203
|
+
- [Providers & Routing Guide](https://github.com/maybk/veri/blob/v0.2.0/docs/guide/providers.md)
|
|
204
|
+
- [Development & Build Guide](https://github.com/maybk/veri/blob/v0.2.0/docs/guide/development.md)
|
|
205
|
+
- [Release Guide](https://github.com/maybk/veri/blob/v0.2.0/docs/guide/release.md)
|
|
206
|
+
- [Changelog](https://github.com/maybk/veri/blob/v0.2.0/CHANGELOG.md)
|
|
207
|
+
|
|
208
|
+
## ⚠️ Disclaimer
|
|
209
|
+
|
|
210
|
+
1. **Compliance** - Use this tool in accordance with applicable laws, target website terms of service, and upstream API policies.
|
|
211
|
+
2. **Privacy** - Configuration files and API keys stay in `~/.config/veri/` on your local machine and are sent only to the upstream providers you configure; `veri` contains no telemetry.
|
|
212
|
+
3. **Liability** - Search results and extracted web pages originate from third-party sources; the authors assume no liability for external content accuracy or upstream API charges.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
<div align="center">
|
|
217
|
+
<p>If you find this project helpful, please consider giving it a ⭐️!</p>
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
[](https://www.star-history.com/#maybk/veri&Date)
|
package/bin/veri.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require('node:child_process');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
|
|
7
|
+
const PLATFORMS = {
|
|
8
|
+
'darwin-arm64': { pkg: '@maybk/veri-darwin-arm64', bin: 'veri' },
|
|
9
|
+
'darwin-x64': { pkg: '@maybk/veri-darwin-x64', bin: 'veri' },
|
|
10
|
+
'linux-arm64': { pkg: '@maybk/veri-linux-arm64', bin: 'veri' },
|
|
11
|
+
'linux-x64': { pkg: '@maybk/veri-linux-x64', bin: 'veri' },
|
|
12
|
+
'win32-x64': { pkg: '@maybk/veri-win32-x64', bin: 'veri.exe' },
|
|
13
|
+
'win32-arm64': { pkg: '@maybk/veri-win32-arm64', bin: 'veri.exe' },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const key = `${process.platform}-${process.arch}`;
|
|
17
|
+
const target = PLATFORMS[key];
|
|
18
|
+
if (!target) {
|
|
19
|
+
process.stderr.write(
|
|
20
|
+
`Error: @maybk/veri does not provide a prebuilt binary for ${process.platform}/${process.arch}.\n` +
|
|
21
|
+
`Supported targets: ${Object.keys(PLATFORMS).join(', ')}.\n`
|
|
22
|
+
);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let binPath;
|
|
27
|
+
try {
|
|
28
|
+
const pkgJsonPath = require.resolve(`${target.pkg}/package.json`);
|
|
29
|
+
binPath = path.join(path.dirname(pkgJsonPath), 'bin', target.bin);
|
|
30
|
+
} catch {
|
|
31
|
+
process.stderr.write(
|
|
32
|
+
`Error: platform binary package "${target.pkg}" is not installed.\n` +
|
|
33
|
+
'Make sure optional dependencies are enabled (do not pass --no-optional / --omit=optional) and reinstall @maybk/veri.\n'
|
|
34
|
+
);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
process.on('SIGINT', () => {});
|
|
39
|
+
|
|
40
|
+
const result = spawnSync(binPath, process.argv.slice(2), {
|
|
41
|
+
stdio: 'inherit',
|
|
42
|
+
windowsHide: false,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
if (result.error) {
|
|
46
|
+
process.stderr.write(`Error: failed to execute ${binPath}: ${result.error.message}\n`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (result.signal) {
|
|
51
|
+
process.removeAllListeners(result.signal);
|
|
52
|
+
process.kill(process.pid, result.signal);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maybk/veri",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Multi-provider web search and Markdown extraction (CLI, MCP, Agent Skill)",
|
|
5
|
+
"homepage": "https://github.com/maybk/veri",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/maybk/veri.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/maybk/veri/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"cli",
|
|
16
|
+
"mcp",
|
|
17
|
+
"mcp-server",
|
|
18
|
+
"web-search",
|
|
19
|
+
"markdown",
|
|
20
|
+
"ai-agents",
|
|
21
|
+
"agent-skills",
|
|
22
|
+
"golang"
|
|
23
|
+
],
|
|
24
|
+
"bin": {
|
|
25
|
+
"veri": "bin/veri.js"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"bin",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18"
|
|
34
|
+
},
|
|
35
|
+
"optionalDependencies": {
|
|
36
|
+
"@maybk/veri-darwin-arm64": "0.2.0",
|
|
37
|
+
"@maybk/veri-darwin-x64": "0.2.0",
|
|
38
|
+
"@maybk/veri-linux-arm64": "0.2.0",
|
|
39
|
+
"@maybk/veri-linux-x64": "0.2.0",
|
|
40
|
+
"@maybk/veri-win32-x64": "0.2.0",
|
|
41
|
+
"@maybk/veri-win32-arm64": "0.2.0"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
}
|
|
46
|
+
}
|