@solongate/proxy 0.47.4 → 0.47.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.
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # @solongate/proxy
2
2
 
3
- > **Don't `npm i` this.** There's nothing to install. Run the one-liner below to pair your machine:
3
+ > **Don't `npm i` this.** There's nothing to install. Run the two commands below to pair your machine:
4
4
  > ```bash
5
+ > npx -y @solongate/proxy@latest
5
6
  > npx -y @solongate/proxy@latest login
6
7
  > ```
7
8
 
@@ -26,9 +27,10 @@ SolonGate comes in two editions that share the same policy model and dashboard:
26
27
 
27
28
  **You need:** a free [SolonGate account](https://auth.solongate.com), Node.js 18+ on the machine you want to protect, and an AI tool that makes tool calls (Claude Code; Gemini CLI is also supported).
28
29
 
29
- Pair the machine and turn on the guard — one command, no API keys to copy:
30
+ Pair the machine and turn on the guard — no API keys to copy. First fetch SolonGate, then log in:
30
31
 
31
32
  ```bash
33
+ npx -y @solongate/proxy@latest
32
34
  npx -y @solongate/proxy@latest login
33
35
  ```
34
36
 
package/dist/index.js CHANGED
@@ -285,7 +285,7 @@ function parseArgs(argv) {
285
285
  }
286
286
  if (!apiKey) {
287
287
  throw new Error(
288
- "Not logged in. Run `solongate login` once, or pass --api-key sg_live_xxx.\n\nUsage: solongate login (recommended \u2014 no API key)\n or: solongate --api-key sg_live_xxx -- <command>\n"
288
+ "Not logged in. Run this once to get started:\n\n npx -y @solongate/proxy@latest login\n"
289
289
  );
290
290
  }
291
291
  if (!apiKey.startsWith("sg_live_") && !apiKey.startsWith("sg_test_")) {
@@ -341,7 +341,7 @@ function parseArgs(argv) {
341
341
  }
342
342
  if (upstreamArgs.length === 0) {
343
343
  throw new Error(
344
- "No upstream server command provided.\n\nUsage: solongate-proxy [options] -- <command> [args...]\n\nExamples:\n solongate-proxy -- node my-server.js\n solongate-proxy --policy ./policy.json -- npx @playwright/mcp@latest\n solongate-proxy --upstream-url http://localhost:3001/mcp\n solongate-proxy --config solongate.json\n"
344
+ "No upstream server command provided.\n\nIf you just want to get started, run:\n npx -y @solongate/proxy@latest login\n"
345
345
  );
346
346
  }
347
347
  const [command, ...commandArgs] = upstreamArgs;
@@ -11568,8 +11568,10 @@ ${msg.content.text}`;
11568
11568
  };
11569
11569
 
11570
11570
  // src/index.ts
11571
+ init_cli_utils();
11571
11572
  var CLI_SUBCOMMANDS = /* @__PURE__ */ new Set(["init", "login", "logout", "create", "inject", "pull", "push", "list", "ls"]);
11572
- if (!CLI_SUBCOMMANDS.has(process.argv[2] ?? "")) {
11573
+ var IS_HUMAN_CLI = process.argv.length <= 2 || CLI_SUBCOMMANDS.has(process.argv[2] ?? "");
11574
+ if (!IS_HUMAN_CLI) {
11573
11575
  console.log = (...args) => {
11574
11576
  process.stderr.write(`[SolonGate] ${args.map(String).join(" ")}
11575
11577
  `);
@@ -11583,8 +11585,25 @@ if (!CLI_SUBCOMMANDS.has(process.argv[2] ?? "")) {
11583
11585
  `);
11584
11586
  };
11585
11587
  }
11588
+ function printWelcome() {
11589
+ console.log("");
11590
+ console.log(` ${c.bold}${c.blue4}SolonGate${c.reset} ${c.dim}\u2014 secure gateway for your AI agents${c.reset}`);
11591
+ console.log("");
11592
+ console.log(" Get started with one command:");
11593
+ console.log("");
11594
+ console.log(` ${c.cyan}npx -y @solongate/proxy@latest login${c.reset}`);
11595
+ console.log("");
11596
+ console.log(` ${c.dim}This pairs your device and protects every Claude Code session${c.reset}`);
11597
+ console.log(` ${c.dim}on this machine with your cloud policy. Manage it at${c.reset}`);
11598
+ console.log(` ${c.cyan}https://dashboard.solongate.com${c.reset}`);
11599
+ console.log("");
11600
+ }
11586
11601
  async function main6() {
11587
11602
  const subcommand = process.argv[2];
11603
+ if (process.argv.length <= 2) {
11604
+ printWelcome();
11605
+ return;
11606
+ }
11588
11607
  if (subcommand === "init") {
11589
11608
  process.argv.splice(2, 1);
11590
11609
  await Promise.resolve().then(() => (init_init(), init_exports));