@ushiradineth/veil 0.1.5 → 0.1.6

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/README.md +106 -113
  2. package/bin/veil.mjs +1 -19
  3. package/dist/bin.js +758 -404
  4. package/package.json +5 -1
package/README.md CHANGED
@@ -1,41 +1,20 @@
1
- # veil
1
+ # Veil MCP
2
2
 
3
3
  Veil is a fast MCP server and CLI for local code retrieval. It indexes a repo and exposes focused tools for files, symbols, search, lookup, web research, URL fetch, and git context.
4
4
 
5
- ## 2-minute setup
5
+ ## What It Is For
6
6
 
7
- Add Veil to your MCP client config:
8
-
9
- ```json
10
- {
11
- "mcpServers": {
12
- "veil": {
13
- "command": "npx",
14
- "args": ["-y", "@ushiradineth/veil@latest", "server"]
15
- }
16
- }
17
- }
18
- ```
7
+ Veil is built for agents that need to move from prompt to implementation quickly.
19
8
 
20
- Then restart your MCP client.
9
+ It gives the agent indexed access to files, symbols, and relevant code chunks, so it can retrieve precise context before writing code. This reduces broad file reads and repeated text scans, improves token efficiency, and shortens time to first meaningful code change.
21
10
 
22
- ## MCP config snippets
11
+ In practice, Veil acts as a local retrieval layer for coding agents: discover where code lives, resolve symbols, pull focused context, then execute edits.
23
12
 
24
- Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`):
13
+ ## Get Started
25
14
 
26
- ```json
27
- {
28
- "mcpServers": {
29
- "veil": {
30
- "command": "npx",
31
- "args": ["-y", "@ushiradineth/veil@latest", "server"],
32
- "env": {}
33
- }
34
- }
35
- }
36
- ```
15
+ Requires Node.js 20 or later.
37
16
 
38
- Codex (`~/.config/codex/mcp.json`) and OpenCode (`~/.config/opencode/mcp.json`):
17
+ Add Veil to your MCP client config:
39
18
 
40
19
  ```json
41
20
  {
@@ -48,115 +27,129 @@ Codex (`~/.config/codex/mcp.json`) and OpenCode (`~/.config/opencode/mcp.json`):
48
27
  }
49
28
  ```
50
29
 
51
- Optional Bun launcher:
30
+ Install the Veil skill (optional, improves agent tool routing):
52
31
 
53
- ```json
54
- {
55
- "mcpServers": {
56
- "veil": {
57
- "command": "bunx",
58
- "args": ["@ushiradineth/veil", "server"]
59
- }
60
- }
61
- }
32
+ ```bash
33
+ npx -y skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil --list
62
34
  ```
63
35
 
64
- Local clone launcher:
36
+ ## MCP Tools
37
+
38
+ Available Veil MCP tools:
39
+
40
+ | | Tool | Description |
41
+ | --- | --- | --- |
42
+ | - | `status` | Index status and staleness reasons |
43
+ | - | `refresh` | Full or changed index refresh |
44
+ | - | `files` | File path substring lookup |
45
+ | - | `symbols` | Symbol name lookup |
46
+ | - | `search` | Indexed code chunk search |
47
+ | - | `lookup` | Intent-aware contextual retrieval with explainability |
48
+ | - | `discover` | Combined status and focused retrieval in one call |
49
+ | - | `web_search` | No-key web search (`google`, `duckduckgo`, `wikipedia`, `github`, `reddit`, `deepwiki`) |
50
+ | - | `fetch_url` | Markdown-first URL content fetch |
51
+ | - | `git_status` | Branch and workspace state |
52
+ | - | `git_log` | Commit history lookup |
53
+ | - | `git_diff` | Uncommitted or range diff lookup |
54
+ | - | `git_show` | Commit details and optional patch |
55
+ | - | `gh_lookup` | GitHub issues, PRs, checks, and repo context bootstrap via `gh` |
56
+ | - | `diagnostics` | Cache and latency diagnostics |
57
+
58
+ ## CLI Examples
65
59
 
66
- ```json
67
- {
68
- "mcpServers": {
69
- "veil": {
70
- "command": "bun",
71
- "args": ["run", "/path/to/veil/src/server.ts"]
72
- }
73
- }
74
- }
60
+ ```bash
61
+ # status and refresh
62
+ veil cli status --workspace .
63
+ veil cli refresh --workspace . --mode changed
64
+
65
+ # local index retrieval
66
+ veil cli discover --workspace . --query "find build logic"
67
+ veil cli lookup --workspace . --query "where is parseNdjson defined"
68
+
69
+ # web and fetch
70
+ veil cli web-search --query "typescript language server" --limit 5
71
+ veil cli fetch-url --url https://example.com --format markdown
72
+
73
+ # git and github context
74
+ veil cli git-status --workspace .
75
+ veil cli git-log --workspace . --limit 10
76
+ veil cli git-diff --workspace .
77
+ veil cli git-show --workspace . --rev HEAD
78
+ veil cli gh-lookup --repo owner/repo --kind issues --query "is:open"
79
+
80
+ # diagnostics
81
+ veil cli diagnostics
75
82
  ```
76
83
 
77
- ## Quick verification
84
+ ## MCP Client Configuration
78
85
 
79
- Package path:
86
+ <details>
87
+ <summary>Codex</summary>
88
+ Follow the <a href="https://developers.openai.com/codex/mcp/#configure-with-the-cli">configure MCP guide</a>
89
+ using the standard config from above. You can also install Veil using the Codex CLI:
80
90
 
81
91
  ```bash
82
- npx -y @ushiradineth/veil@latest cli status
92
+ codex mcp add veil -- npx -y @ushiradineth/veil@latest server
83
93
  ```
84
94
 
85
- Local clone path:
95
+ </details>
86
96
 
87
- ```bash
88
- node bin/veil.mjs cli status
89
- ```
97
+ <details>
98
+ <summary>Claude Code</summary>
90
99
 
91
- Build and query a workspace:
100
+ Install via CLI:
92
101
 
93
102
  ```bash
94
- npx -y @ushiradineth/veil@latest cli refresh --workspace ~/nix-config --mode full
95
- npx -y @ushiradineth/veil@latest cli discover --workspace ~/nix-config --query "where is buildIndex defined"
103
+ claude mcp add --scope user veil -- npx -y @ushiradineth/veil@latest server
96
104
  ```
97
105
 
98
- If you run these commands from inside a local `veil` clone, keep `@latest` in the package spec so npm does not resolve to the local workspace package.
106
+ See the <a href="https://code.claude.com/docs/en/mcp">Claude Code MCP guide</a> for more details.
99
107
 
100
- ## Agent skill install (`veil`)
108
+ </details>
101
109
 
102
- Install and list from local path:
110
+ <details>
111
+ <summary>OpenCode</summary>
103
112
 
104
- ```bash
105
- npx -y skills add ./docs --skill veil --list
113
+ Add the following configuration to your `opencode.json` file. If you do not have one, create it at `~/.config/opencode/opencode.json` (<a href="https://opencode.ai/docs/mcp-servers">guide</a>):
114
+
115
+ ```json
116
+ {
117
+ "$schema": "https://opencode.ai/config.json",
118
+ "mcp": {
119
+ "veil": {
120
+ "type": "local",
121
+ "command": ["npx", "-y", "@ushiradineth/veil@latest", "server"]
122
+ }
123
+ }
124
+ }
106
125
  ```
107
126
 
108
- Install and list from GitHub path:
127
+ </details>
109
128
 
110
- ```bash
111
- npx -y skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil --list
112
- ```
129
+ <details>
130
+ <summary>Cursor</summary>
113
131
 
114
- Note: this command reflects the current `main` branch contents on GitHub.
132
+ Click to install:
115
133
 
116
- Optional agent targeting:
134
+ [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=veil&config=eyJjb21tYW5kIjoibnB4IC15IEB1c2hpcmFkaW5ldGgvdmVpbEBsYXRlc3Qgc2VydmVyIn0%3D)
117
135
 
118
- ```bash
119
- npx -y skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil -a opencode
136
+ Or install manually in `Cursor Settings` -> `MCP` -> `New MCP Server` with:
137
+
138
+ ```json
139
+ {
140
+ "mcpServers": {
141
+ "veil": {
142
+ "command": "npx",
143
+ "args": ["-y", "@ushiradineth/veil@latest", "server"]
144
+ }
145
+ }
146
+ }
120
147
  ```
121
148
 
122
- ## Integration checklist
123
-
124
- - `veil` server starts in your MCP client
125
- - `status` returns index metadata
126
- - `discover` returns relevant repo hits
127
- - local `skills ... --list` shows `veil`
128
- - Routing guidance is loaded from `docs/SKILL.md`
129
-
130
- ## MCP tools
131
-
132
- - `status`: index status and staleness reasons
133
- - `refresh`: full or changed index refresh
134
- - `files`: file path substring lookup
135
- - `symbols`: symbol name lookup
136
- - `search`: indexed code chunk search
137
- - `lookup`: intent-aware contextual retrieval with explainability
138
- - `discover`: combined status and focused retrieval in one call
139
- - `web_search`: no-key web search (google, duckduckgo, wikipedia, github, reddit, deepwiki)
140
- - `fetch_url`: markdown-first URL content fetch
141
- - `git_status`: branch and workspace state
142
- - `git_log`: commit history lookup
143
- - `git_diff`: uncommitted or range diff lookup
144
- - `git_show`: commit details and optional patch
145
- - `gh_lookup`: GitHub issues, PRs, and checks via `gh`
146
- - `diagnostics`: cache and latency diagnostics
147
-
148
- ## Release workflow
149
-
150
- - Workflow: `.github/workflows/release.yml` (`workflow_dispatch`)
151
- - Inputs: `version_bump` (`patch|minor|major`) and `dry_run` (`true|false`)
152
- - Guardrails: release runs only from default branch and requires `package.json` version to match latest semver tag (`vX.Y.Z`) before bump
153
- - Outputs: updates `package.json` and `CHANGELOG.md`, tags `v<version>`, publishes npm package, and creates GitHub release
154
- - Release notes: generated via GitHub release notes config in `.github/release.yml` with changelog fallback so release pages are never empty
155
- - Required secret: `NPM_TOKEN` for npm publish (`GITHUB_TOKEN` is provided by Actions)
156
-
157
- ## Links
158
-
159
- - Benchmark methodology and latest artifacts: `BENCHMARKS.md`
160
- - Agent routing policy: `AGENTS.md`
161
- - Reusable routing skill: `docs/SKILL.md`
162
- - License: `LICENSE`
149
+ </details>
150
+
151
+ <details>
152
+ <summary>Windsurf</summary>
153
+ Follow the <a href="https://docs.windsurf.com/windsurf/cascade/mcp#mcp-config-json">configure MCP guide</a>
154
+ using the standard config from above.
155
+ </details>
package/bin/veil.mjs CHANGED
@@ -1,21 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { spawnSync } from "node:child_process";
4
- import { fileURLToPath } from "node:url";
5
- import { dirname, resolve } from "node:path";
6
-
7
- const args = process.argv.slice(2);
8
- const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
9
- const entry = resolve(root, "dist", "bin.js");
10
-
11
- const run = spawnSync(process.execPath, [entry, ...args], {
12
- stdio: "inherit",
13
- env: process.env,
14
- });
15
-
16
- if (run.error) {
17
- process.stderr.write(`Failed to launch veil entrypoint: ${String(run.error.message ?? run.error)}\n`);
18
- process.exit(1);
19
- }
20
-
21
- process.exit(run.status ?? 1);
3
+ import("../dist/bin.js");