@agenticmail/cli 0.8.18 → 0.8.19

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 (2) hide show
  1. package/dist/cli.js +53 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -6922,6 +6922,48 @@ async function isTunnelConfigured() {
6922
6922
  return false;
6923
6923
  }
6924
6924
  }
6925
+ async function cmdWeb() {
6926
+ log2("");
6927
+ log2(` ${c2.pinkBg(" \u{1F380} AgenticMail web UI ")}`);
6928
+ log2("");
6929
+ const configPath = join(homedir(), ".agenticmail", "config.json");
6930
+ if (!existsSync2(configPath)) {
6931
+ log2(` ${c2.red("\u2717")} AgenticMail isn't set up yet. Run ${c2.green("agenticmail setup")} first.`);
6932
+ log2("");
6933
+ return;
6934
+ }
6935
+ const { apiUrl: url } = readApiUrlFromConfig();
6936
+ let alive = false;
6937
+ try {
6938
+ const resp = await fetch(`${url}/api/agenticmail/health`, { signal: AbortSignal.timeout(2e3) });
6939
+ alive = resp.ok;
6940
+ } catch {
6941
+ }
6942
+ if (!alive) {
6943
+ log2(` ${c2.red("\u2717")} API server not reachable at ${c2.cyan(url)}.`);
6944
+ log2(` Start it with ${c2.green("agenticmail start")} (in another terminal) or ${c2.green("agenticmail service install")}.`);
6945
+ log2("");
6946
+ return;
6947
+ }
6948
+ log2(` ${c2.green("\u2713")} API server is running at ${c2.cyan(url)}`);
6949
+ log2("");
6950
+ log2(` ${c2.bold("Open the web UI in your browser:")}`);
6951
+ log2("");
6952
+ log2(` ${c2.green(url)}`);
6953
+ log2("");
6954
+ log2(` ${c2.dim("When prompted, paste your master key:")}`);
6955
+ log2(` ${c2.dim("cat ~/.agenticmail/config.json | grep masterKey")}`);
6956
+ log2("");
6957
+ const platform = process.platform;
6958
+ const opener = platform === "darwin" ? "open" : platform === "win32" ? "start" : "xdg-open";
6959
+ try {
6960
+ const { spawn } = await import("child_process");
6961
+ spawn(opener, [url], { stdio: "ignore", detached: true }).unref();
6962
+ log2(` ${c2.dim(`Opening ${url} in your default browser\u2026`)}`);
6963
+ log2("");
6964
+ } catch {
6965
+ }
6966
+ }
6925
6967
  async function cmdStatus() {
6926
6968
  log2("");
6927
6969
  log2(` ${c2.pinkBg(" \u{1F380} AgenticMail Status ")}`);
@@ -7372,6 +7414,15 @@ switch (command) {
7372
7414
  process.exit(1);
7373
7415
  });
7374
7416
  break;
7417
+ case "web":
7418
+ case "ui":
7419
+ cmdWeb().then(() => {
7420
+ process.exit(0);
7421
+ }).catch((err) => {
7422
+ console.error(err);
7423
+ process.exit(1);
7424
+ });
7425
+ break;
7375
7426
  case "--version":
7376
7427
  case "-v":
7377
7428
  case "version": {
@@ -7400,6 +7451,8 @@ switch (command) {
7400
7451
  log2(` ${c2.green("agenticmail start")} Start the server`);
7401
7452
  log2(` ${c2.green("agenticmail stop")} Stop the server`);
7402
7453
  log2(` ${c2.green("agenticmail status")} See what's running`);
7454
+ log2(` ${c2.green("agenticmail shell")} Drop into the interactive REPL (44 commands)`);
7455
+ log2(` ${c2.green("agenticmail web")} Open the Gmail-style web UI in your browser`);
7403
7456
  log2(` ${c2.green("agenticmail openclaw")} Set up AgenticMail for OpenClaw`);
7404
7457
  log2(` ${c2.green("agenticmail claudecode")} Set up AgenticMail for Claude Code`);
7405
7458
  log2(` ${c2.green("agenticmail service")} Manage auto-start (install/uninstall/status)`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/cli",
3
- "version": "0.8.18",
3
+ "version": "0.8.19",
4
4
  "description": "Email and SMS infrastructure for AI agents — the first platform to give agents real email addresses and phone numbers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",