@@ -92,4 +92,8 @@ #!/usr/bin/env node | ||
| console.log('restart the agent to pick it up.'); | ||
| // The separator is quoted on purpose. On Windows `claude` resolves to claude.ps1, and | ||
| // PowerShell's parameter binder eats a bare `--` before the script ever sees it - the CLI | ||
| // then reads `-y` as one of its own options and fails with "unknown option '-y'". | ||
| // Quoting survives PowerShell and is a no-op in bash, so one line works everywhere. | ||
| console.log('\nregister the browser MCP with:'); | ||
| console.log(' claude mcp add playwright-split --scope user -- npx -y lan-direct browser'); | ||
| console.log(' claude mcp add playwright-split --scope user "--" npx -y lan-direct browser'); | ||
| } | ||
@@ -96,0 +100,0 @@ |
+17
-0
@@ -6,2 +6,19 @@ # Changelog | ||
| ## [1.0.1] - 2026-08-07 | ||
| ### Fixed | ||
| - **The registration command we printed didn't work on Windows.** `lan-direct install-skill`, | ||
| the README and `SKILL.md` all told you to run: | ||
| claude mcp add playwright-split --scope user -- npx -y lan-direct browser | ||
| On Windows `claude` resolves to `claude.ps1`, and PowerShell's parameter binder strips a | ||
| bare `--` before the script ever sees it. The CLI then reads `-y` as one of its own options | ||
| and fails with `error: unknown option '-y'`. Every printed form now quotes the separator — | ||
| `"--"` — which survives PowerShell and is a no-op in bash, so one line works everywhere. | ||
| `scripts/install.ps1` was never affected: it splats an argument array, which sidesteps the | ||
| binder. The bug was only in the commands we told people to type by hand. | ||
| ## [1.0.0] - 2026-08-07 | ||
@@ -8,0 +25,0 @@ |
+1
-1
| { | ||
| "name": "lan-direct", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "Skill + browser MCP for coding agents behind a full-tunnel VPN: the app under test reaches domestic services over the real ISP while the agent stays on the tunnel.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+30
-23
| # lan-direct | ||
| [](https://github.com/farshadmomo/lan-direct/actions/workflows/check.yml) | ||
| [](https://www.npmjs.com/package/lan-direct) | ||
| [](LICENSE) | ||
@@ -16,5 +18,31 @@ **A skill and a browser MCP** for coding agents behind a full-tunnel VPN — Claude Code and Codex. | ||
| Requires Node, plus PowerShell on Windows or `bash` and `curl` on Linux/macOS. Two steps, no | ||
| Requires Node ≥ 20.6, plus PowerShell on Windows or `bash` and `curl` on Linux/macOS. No | ||
| admin, no symlinks, no renaming. | ||
| ### From npm | ||
| ```bash | ||
| npm install -g lan-direct | ||
| lan-direct install-skill # or --codex | ||
| claude mcp add playwright-split --scope user "--" npx -y lan-direct browser | ||
| ``` | ||
| Then **restart the agent**. That's it — the same three lines on every platform. | ||
| `npx -y lan-direct browser` is the better MCP command however you install: it survives the | ||
| checkout moving, which an absolute path into a clone does not. | ||
| > **Why `"--"` is quoted.** On Windows `claude` resolves to `claude.ps1`, and PowerShell's | ||
| > parameter binder strips a bare `--` before the script ever sees it. The CLI then reads `-y` | ||
| > as one of its own flags and fails with `error: unknown option '-y'`. Quoting protects it, | ||
| > and quotes are a no-op in bash — so the same line works in PowerShell, bash and cmd. | ||
| ### From a clone | ||
| Prefer this if you want to edit the skill or track it — one `git pull` updates everything, | ||
| where npm needs `npm update -g lan-direct && lan-direct install-skill` because `install-skill` | ||
| **copies** files rather than linking them. | ||
| Either way, your own host list at `~/.lan-direct-hosts` is never touched. | ||
| **1. Clone into your agent's skills directory.** Both agents discover skills by scanning a | ||
@@ -55,3 +83,3 @@ directory for `SKILL.md` — they just scan different ones. | ||
| ```bash | ||
| claude mcp add playwright-split --scope user -- \ | ||
| claude mcp add playwright-split --scope user "--" \ | ||
| node ~/.claude/skills/lan-direct/scripts/lan-browser.mjs --port 8900 | ||
@@ -67,23 +95,2 @@ ``` | ||
| <details> | ||
| <summary>Installing from npm instead</summary> | ||
| ```bash | ||
| npm install -g lan-direct | ||
| lan-direct install-skill # or: lan-direct install-skill --codex | ||
| claude mcp add playwright-split --scope user -- npx -y lan-direct browser | ||
| ``` | ||
| `npx -y lan-direct browser` is the better MCP command whichever way you install — it survives | ||
| the checkout moving, which an absolute path does not. | ||
| The tradeoff is the skill half: `install-skill` **copies** files into the skills directory, so | ||
| updating means `npm update -g lan-direct && lan-direct install-skill` rather than one | ||
| `git pull`. Clone if you want to edit the skill or track it; use npm if you just want it | ||
| working. | ||
| Your own host list at `~/.lan-direct-hosts` is never touched by either. | ||
| </details> | ||
| <details> | ||
| <summary>Using both agents from a single clone</summary> | ||
@@ -90,0 +97,0 @@ |
@@ -106,3 +106,4 @@ #Requires -Version 5.1 | ||
| Write-Host "claude CLI not found - register manually:" -ForegroundColor Yellow | ||
| Write-Host " claude mcp add $Name --scope user -- node `"$browserArg`" --lan-hosts `"$LanHosts`"" | ||
| # Quote the separator: PowerShell strips a bare -- before claude.ps1 ever sees it. | ||
| Write-Host " claude mcp add $Name --scope user `"--`" node `"$browserArg`" --lan-hosts `"$LanHosts`"" | ||
| } | ||
@@ -109,0 +110,0 @@ |
@@ -8,5 +8,8 @@ #!/usr/bin/env node | ||
| * | ||
| * claude mcp add browser --scope user -- \ | ||
| * claude mcp add browser --scope user "--" \ | ||
| * node <skill-dir>/scripts/lan-browser.mjs --lan-hosts .ir,hoosha.com | ||
| * | ||
| * The separator is quoted because PowerShell strips a bare `--` when `claude` resolves to | ||
| * claude.ps1; quotes are a no-op in bash, so the one form works in both. | ||
| * | ||
| * It discovers the LAN IP itself, starts the proxy if nothing is listening yet, reuses an | ||
@@ -13,0 +16,0 @@ * existing one if there is, and shuts down what it started when the MCP exits. |
+10
-4
@@ -191,14 +191,20 @@ --- | ||
| If the user asks to register it by hand, note that `--` must survive PowerShell's parameter | ||
| binder - splat the arguments as an array, or run it from bash: | ||
| If the user asks to register it by hand, **quote the `--` separator**. On Windows `claude` | ||
| resolves to `claude.ps1`, and PowerShell's parameter binder strips a bare `--` before the | ||
| script sees it; the CLI then reads the next flag as its own and fails with | ||
| `error: unknown option '-y'`. Quoting survives PowerShell and is a no-op in bash, so one | ||
| form works everywhere: | ||
| ```bash | ||
| # from a clone | ||
| claude mcp add playwright-split --scope user -- \ | ||
| claude mcp add playwright-split --scope user "--" \ | ||
| node <skill-dir>/scripts/lan-browser.mjs --lan-hosts ".ir" | ||
| # from npm - survives the checkout moving, so prefer it when the user has it installed | ||
| claude mcp add playwright-split --scope user -- npx -y lan-direct browser | ||
| claude mcp add playwright-split --scope user "--" npx -y lan-direct browser | ||
| ``` | ||
| From a PowerShell *script* rather than the prompt, splat an array instead - see | ||
| `scripts/install.ps1`, which builds `$mcpArgs` and passes `@mcpArgs` for the same reason. | ||
| Other CLI subcommands, when the package is installed: `lan-direct detect` picks the right | ||
@@ -205,0 +211,0 @@ detect script for the platform, and `lan-direct route <host>` answers "would this host go via |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
84919
2.84%532
1.33%429
1.66%7
16.67%