@maybk/veri 0.0.0-stage → 0.1.1

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +194 -2
  3. package/bin/veri.js +56 -0
  4. 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,195 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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.1.1/README.md)** · **[English](https://github.com/maybk/veri/blob/v0.1.1/README.en.md)**
11
+
12
+ ![Go](https://img.shields.io/badge/Go-1.27+-00ADD8?logo=go&logoColor=white)
13
+ ![MCP](https://img.shields.io/badge/MCP-stdio-4A5568)
14
+ ![macOS](https://img.shields.io/badge/macOS-13.0+-000000?logo=apple&logoColor=white)
15
+ ![Windows](https://img.shields.io/badge/Windows-10%2F11-0078D6?logo=windows&logoColor=white)
16
+ ![Linux](https://img.shields.io/badge/Linux-Static-FCC624?logo=linux&logoColor=black)
17
+
18
+ <br>
19
+
20
+ <img src="https://raw.githubusercontent.com/maybk/veri/v0.1.1/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
+ **Homebrew (macOS / Linux)**
45
+
46
+ ```bash
47
+ brew install maybk/tap/veri
48
+ ```
49
+
50
+ **Scoop (Windows)**
51
+
52
+ ```powershell
53
+ scoop bucket add maybk https://github.com/maybk/homebrew-tap
54
+ scoop install maybk/veri
55
+ ```
56
+
57
+ <!-- Enabled once the official WinGet PR is merged
58
+ **WinGet (Windows)**
59
+
60
+ ```powershell
61
+ winget install maybk.Veri
62
+ ```
63
+ -->
64
+
65
+ ### Manual Download
66
+
67
+ 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.1.1/docs/guide/development.md).
68
+
69
+ ## 🚀 Quick Start
70
+
71
+ > 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.1.1/docs/guide/usage.md) for full walkthroughs and official API key portals.
72
+
73
+ ### 1. Configure API Keys
74
+
75
+ Credentials are encrypted under `~/.config/veri/` and shared automatically between the CLI and MCP server:
76
+
77
+ ```bash
78
+ veri key set exa
79
+ veri key list
80
+ ```
81
+
82
+ You can also configure keys via `~/.config/veri/config.toml` or environment variables (environment variables always take precedence):
83
+
84
+ ```bash
85
+ export EXA_API_KEY="exa_..."
86
+ ```
87
+
88
+ Check active providers and health:
89
+
90
+ ```bash
91
+ veri providers
92
+ veri doctor
93
+ ```
94
+
95
+ ### 2. Command-Line Usage
96
+
97
+ ```bash
98
+ # Extract web pages or GitHub repos / issues / PRs (no API key required)
99
+ veri fetch https://github.com/modelcontextprotocol/go-sdk
100
+ veri fetch https://example.com/article --section "Authentication" --max-chars 20000
101
+
102
+ # Web search (requires any one search provider key)
103
+ veri "golang mcp sdk official"
104
+ veri search "go 1.27 release notes" -t 6m -s go.dev -n 5
105
+
106
+ # Concurrent fusion search with JSON output
107
+ veri search "raft leader lease" --fusion -p exa,tinyfish --json
108
+ ```
109
+
110
+ ### 3. MCP Server Integration
111
+
112
+ 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`:
113
+
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "veri": {
118
+ "command": "veri",
119
+ "args": ["mcp"]
120
+ }
121
+ }
122
+ }
123
+ ```
124
+
125
+ ### 4. Agent Skill Installation
126
+
127
+ Recommended via [`npx skills`](https://skills.sh) for unified multi-agent installation and updates:
128
+
129
+ ```bash
130
+ npx skills add maybk/veri
131
+ ```
132
+
133
+ In offline or Node-free environments:
134
+
135
+ ```bash
136
+ veri skill install # Write to the standard .agents/skills directory
137
+ veri skill print # Print the embedded SKILL.md
138
+ ```
139
+
140
+ ## ✨ Features
141
+
142
+ ### 🎯 Core Capabilities
143
+
144
+ - **Multi-Provider Search & Fallback** - Built-in support for DeepSeek, Exa, TinyFish, Tencent WSA, Tavily, and Brave, enabled automatically from configured keys; supports automatic failover, language-aware routing, and concurrent fusion deduplication
145
+ - **Clean Web & GitHub Extraction** - Built-in structured GitHub reader and pure-Go local extractor turn pages and repos / issues / PRs / commits into clean Markdown with zero keys; configured cloud extractors add dynamic rendering and PDF support, plus batch fetching, section slicing, and keyword matching
146
+ - **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
147
+ - **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
148
+
149
+ ### 🔧 Security & Reliability
150
+
151
+ - **SSRF Protection & Proxy Friendly** - Local fetching blocks loopback, private, and cloud metadata targets by default while working smoothly with transparent proxy (TUN) setups
152
+ - **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
153
+ - **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
154
+ - **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
155
+
156
+ ## 🖥️ Supported Platforms
157
+
158
+ - **macOS** - macOS 13.0 (Ventura) or later, Apple Silicon (`arm64`) and Intel (`amd64`)
159
+ - **Windows** - Windows 10 / 11 (`amd64` / `arm64`)
160
+ - **Linux** - Static binaries for `amd64` and `arm64`
161
+
162
+ ## 🏗️ Architecture
163
+
164
+ - **Go 1.27+** - Pure-Go static binary with zero runtime dependencies
165
+ - **`modelcontextprotocol/go-sdk`** - Official MCP stdio server and structured input/output schemas
166
+ - **`spf13/cobra` + `BurntSushi/toml`** - CLI command routing and strict TOML configuration decoding
167
+ - **`go-readability` + `x/net/html`** - Pure-Go local main-content extraction and compact Markdown conversion
168
+
169
+ ```text
170
+ main.go -> internal/cli | internal/mcpserver -> internal/app -> internal/router -> internal/provider/* -> internal/httpx
171
+ ```
172
+
173
+ ## 📚 Documentation
174
+
175
+ - [Usage Guide](https://github.com/maybk/veri/blob/v0.1.1/docs/guide/usage.md)
176
+ - [Overview & Directory Layout](https://github.com/maybk/veri/blob/v0.1.1/docs/guide/overview.md)
177
+ - [Configuration Guide](https://github.com/maybk/veri/blob/v0.1.1/docs/guide/configuration.md)
178
+ - [Providers & Routing Guide](https://github.com/maybk/veri/blob/v0.1.1/docs/guide/providers.md)
179
+ - [Development & Build Guide](https://github.com/maybk/veri/blob/v0.1.1/docs/guide/development.md)
180
+ - [Release Guide](https://github.com/maybk/veri/blob/v0.1.1/docs/guide/release.md)
181
+ - [Changelog](https://github.com/maybk/veri/blob/v0.1.1/CHANGELOG.md)
182
+
183
+ ## ⚠️ Disclaimer
184
+
185
+ 1. **Compliance** - Use this tool in accordance with applicable laws, target website terms of service, and upstream API policies.
186
+ 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.
187
+ 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.
188
+
189
+ ---
190
+
191
+ <div align="center">
192
+ <p>If you find this project helpful, please consider giving it a ⭐️!</p>
193
+ </div>
194
+
195
+ [![Star History Chart](https://api.star-history.com/svg?repos=maybk/veri&type=Date)](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.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
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.1.1",
37
+ "@maybk/veri-darwin-x64": "0.1.1",
38
+ "@maybk/veri-linux-arm64": "0.1.1",
39
+ "@maybk/veri-linux-x64": "0.1.1",
40
+ "@maybk/veri-win32-x64": "0.1.1",
41
+ "@maybk/veri-win32-arm64": "0.1.1"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ }
46
+ }