superbrain-server 1.0.11 → 1.0.13

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/bin/superbrain.js CHANGED
@@ -171,11 +171,15 @@ if (userArgs.length > 0) {
171
171
  superbrain-server reset -> Open Reset Menu
172
172
  superbrain-server reset --all -> Force complete wipe
173
173
  superbrain-server status -> Show QR Code and Server Info
174
+ superbrain-server ngrok -> Configure Ngrok tunnel
174
175
  `);
175
176
  process.exit(0);
176
177
  } else if (cmd === 'status' || cmd === 'update') {
177
178
  targetScript = 'start.py';
178
179
  finalArgs = ['--status'];
180
+ } else if (cmd === 'ngrok') {
181
+ targetScript = 'start.py';
182
+ finalArgs = ['--ngrok'];
179
183
  }
180
184
  }
181
185
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superbrain-server",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "1-Line Auto-Installer and Server Execution wrapper for SuperBrain",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -0,0 +1,3 @@
1
+ GROQ_API_KEY=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
2
+ GEMINI_API_KEY=AIzaSyAcr5QSifNG0XejGw3LbQ_jkOYLx4-p8fk
3
+ OPENROUTER_API_KEY=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
package/payload/start.py CHANGED
@@ -1118,6 +1118,11 @@ def launch_backend():
1118
1118
  # ngrok startup
1119
1119
  public_url: str | None = None
1120
1120
  if NGROK_ENABLED.exists():
1121
+ token_txt = NGROK_TOKEN.read_text().strip() if NGROK_TOKEN.exists() else ""
1122
+ if not token_txt:
1123
+ warn("Ngrok is enabled but no Authtoken was found.")
1124
+ setup_remote_access()
1125
+
1121
1126
  info("Starting ngrok in background...")
1122
1127
  public_url = _start_ngrok(PORT)
1123
1128
 
@@ -1126,13 +1131,13 @@ def launch_backend():
1126
1131
 
1127
1132
  if public_url:
1128
1133
  tunnel_line = f" Public URL → {GREEN}{BOLD}{public_url}{RESET} {DIM}(ngrok){RESET}"
1129
- tunnel_hint = f" · public → {GREEN}{public_url}{RESET}"
1134
+ tunnel_hint = f" · public → {GREEN}{public_url}{RESET}"
1130
1135
  ok(f"ngrok active → {GREEN}{BOLD}{public_url}{RESET}")
1131
1136
  elif NGROK_ENABLED.exists():
1132
1137
  tunnel_line = f" Public URL → {YELLOW}(failed to start ngrok){RESET}"
1133
- tunnel_hint = f" · public → run manually: {DIM}ngrok http {PORT}{RESET}"
1138
+ tunnel_hint = f" · public → run manually: {DIM}ngrok http {PORT}{RESET}"
1134
1139
  else:
1135
- tunnel_hint = f" · public → enable ngrok via {DIM}python start.py --reset{RESET}"
1140
+ tunnel_hint = f" · public → enable ngrok via {DIM}python start.py --reset{RESET}"
1136
1141
 
1137
1142
  # ── Generate and display QR code ──────────────────────────────────────────
1138
1143
  qr_url = public_url if public_url else f"http://{local_ip}:{PORT}"
@@ -1230,6 +1235,14 @@ def main():
1230
1235
  launch_backend_status()
1231
1236
  return
1232
1237
 
1238
+ ngrok_mode = "--ngrok" in sys.argv
1239
+ if ngrok_mode:
1240
+ h1("SuperBrain Ngrok Configuration")
1241
+ setup_remote_access()
1242
+ nl()
1243
+ ok("Ngrok configuration finished. Run 'superbrain-server' to start the backend.")
1244
+ return
1245
+
1233
1246
  reset_mode = "--reset" in sys.argv
1234
1247
 
1235
1248
  if SETUP_DONE.exists() and not reset_mode: