iframer-cli 1.0.3 → 2.0.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.
@@ -201,20 +201,6 @@ const [,, command, ...args] = process.argv;
201
201
 
202
202
  async function main() {
203
203
  switch (command) {
204
- case "install": {
205
- try {
206
- execSync("claude mcp add iframer -- npx -y --package=iframer-cli iframer-mcp", { stdio: "inherit" });
207
- console.log("\n iframer MCP installed in Claude Code!");
208
- console.log(" Now run: iframer login");
209
- } catch {
210
- console.error(" Failed to install. Make sure Claude Code CLI is available.");
211
- console.error(" You can manually add it with:");
212
- console.error(" claude mcp add iframer -- npx -y --package=iframer-cli iframer-mcp");
213
- process.exit(1);
214
- }
215
- break;
216
- }
217
-
218
204
  case "login":
219
205
  await login();
220
206
  break;
@@ -515,6 +501,9 @@ async function main() {
515
501
  case "recaptcha-info":
516
502
  action = { type: "recaptcha-info" };
517
503
  break;
504
+ case "recaptcha-solve-auto":
505
+ action = { type: "recaptcha-solve-auto" };
506
+ break;
518
507
  default:
519
508
  console.error(` Unknown action: ${actionType}`);
520
509
  process.exit(1);
@@ -525,6 +514,34 @@ async function main() {
525
514
  break;
526
515
  }
527
516
 
517
+ // ─── Install MCP ──────────────────────────────────────────────
518
+
519
+ case "install-mcp": {
520
+ const mcpServerPath = path.join(__dirname, "mcp-server.cjs");
521
+ if (!fs.existsSync(mcpServerPath)) {
522
+ console.error(" MCP server bundle not found. Try reinstalling: npm install -g iframer-cli");
523
+ process.exit(1);
524
+ }
525
+
526
+ const claudeConfigPath = path.join(require("os").homedir(), ".claude.json");
527
+ let config = {};
528
+ try {
529
+ config = JSON.parse(fs.readFileSync(claudeConfigPath, "utf8"));
530
+ } catch {}
531
+
532
+ if (!config.mcpServers) config.mcpServers = {};
533
+ config.mcpServers.iframer = {
534
+ command: "node",
535
+ args: [mcpServerPath],
536
+ };
537
+
538
+ fs.writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2));
539
+ console.log("\n iframer MCP installed!");
540
+ console.log(` Config written to: ${claudeConfigPath}`);
541
+ console.log("\n Restart Claude Code to activate the iframer tools.\n");
542
+ break;
543
+ }
544
+
528
545
  // ─── Help ──────────────────────────────────────────────────────
529
546
 
530
547
  default:
@@ -532,10 +549,10 @@ async function main() {
532
549
  iframer - CLI for the Agentic Browser API
533
550
 
534
551
  Commands:
535
- install Install iframer MCP in Claude Code
536
552
  login Authenticate with the server
537
553
  logout Remove saved credentials
538
554
  status Show current auth status
555
+ install-mcp Install the iframer MCP into Claude Code
539
556
 
540
557
  Credentials:
541
558
  credentials add <domain> Store login credentials (encrypted, server-side)