superbrain-server 1.0.11 → 1.0.12
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 +4 -0
- package/package.json +1 -1
- package/payload/config/.api_keys +3 -0
- package/payload/start.py +13 -0
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
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
|
|
|
@@ -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:
|