@sharedots/cli 0.1.4 → 0.1.5
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/dist/index.js +78 -16
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -43065,6 +43065,8 @@ init_esm_shims();
|
|
|
43065
43065
|
var BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
|
|
43066
43066
|
"help",
|
|
43067
43067
|
"h",
|
|
43068
|
+
"version",
|
|
43069
|
+
"v",
|
|
43068
43070
|
"yes",
|
|
43069
43071
|
"y",
|
|
43070
43072
|
"cluster",
|
|
@@ -43136,29 +43138,89 @@ function parseFlags(argv) {
|
|
|
43136
43138
|
|
|
43137
43139
|
// src/index.ts
|
|
43138
43140
|
var __dirname3 = dirname3(fileURLToPath3(import.meta.url));
|
|
43141
|
+
var CLI_VERSION = "0.1.5";
|
|
43142
|
+
function getCliVersion() {
|
|
43143
|
+
try {
|
|
43144
|
+
const pkgPath = resolve4(__dirname3, "../package.json");
|
|
43145
|
+
if (existsSync7(pkgPath)) {
|
|
43146
|
+
const pkg = JSON.parse(readFileSync6(pkgPath, "utf8"));
|
|
43147
|
+
if (pkg.version) return pkg.version;
|
|
43148
|
+
}
|
|
43149
|
+
} catch {
|
|
43150
|
+
}
|
|
43151
|
+
return CLI_VERSION;
|
|
43152
|
+
}
|
|
43139
43153
|
function printHelp() {
|
|
43140
|
-
|
|
43154
|
+
const v = getCliVersion();
|
|
43155
|
+
console.log(`
|
|
43156
|
+
\u26A1 SHAREDOTS CLI v${v} \u2014 Universal Distributed Compute Mesh
|
|
43157
|
+
Coordinate compute power across machines, edge devices, and cloud nodes.
|
|
43158
|
+
|
|
43159
|
+
USAGE:
|
|
43160
|
+
sharedots <command> [arguments] [flags]
|
|
43161
|
+
|
|
43162
|
+
CORE COMMANDS:
|
|
43163
|
+
sharedots up Interactive onboarding wizard (create room or join mesh)
|
|
43164
|
+
sharedots join <CODE|URL> Join a cluster room using an invite code or coordinator URL
|
|
43165
|
+
sharedots tui Launch the full interactive Terminal Dashboard & Cluster Monitor
|
|
43166
|
+
sharedots dashboard Open the web dashboard control bridge in your default browser
|
|
43167
|
+
|
|
43168
|
+
DISTRIBUTED COMPUTE & JOBS:
|
|
43169
|
+
sharedots run [script.py] Partition and execute a Python script across cluster workers
|
|
43170
|
+
sharedots job run Interactive job studio to launch presets (Monte Carlo, Matrix, etc.)
|
|
43171
|
+
sharedots job submit <spec> Submit a declarative JSON distributed job definition
|
|
43172
|
+
sharedots bench Run distributed compute & matrix performance benchmarks
|
|
43173
|
+
|
|
43174
|
+
WORKER NODE MANAGEMENT:
|
|
43175
|
+
sharedots worker start Launch the background worker daemon to contribute compute
|
|
43176
|
+
sharedots worker status Check daemon operational status, metrics, and active tasks
|
|
43177
|
+
sharedots worker logs Tail recent logs from the local worker daemon process
|
|
43178
|
+
sharedots worker stop Stop the active background worker daemon
|
|
43179
|
+
sharedots worker join <ROOM> Connect local daemon to a specific room with --token <SECRET>
|
|
43180
|
+
sharedots worker leave Unregister worker and disconnect from the current mesh room
|
|
43141
43181
|
|
|
43142
|
-
|
|
43143
|
-
sharedots
|
|
43144
|
-
|
|
43145
|
-
|
|
43146
|
-
|
|
43147
|
-
|
|
43148
|
-
|
|
43149
|
-
|
|
43150
|
-
|
|
43151
|
-
|
|
43152
|
-
|
|
43153
|
-
|
|
43154
|
-
|
|
43155
|
-
|
|
43156
|
-
|
|
43182
|
+
CLUSTER & ROOMS:
|
|
43183
|
+
sharedots room create Create a new isolated compute room with an access token
|
|
43184
|
+
|
|
43185
|
+
GLOBAL FLAGS:
|
|
43186
|
+
--coordinator <url> Coordinator endpoint (default: https://sharedots.onrender.com)
|
|
43187
|
+
--room <room_id> Target room ID for jobs, worker, or dashboard
|
|
43188
|
+
--token <secret> Room authentication secret token
|
|
43189
|
+
--partitions <N> Number of parallel partitions/tasks for job execution
|
|
43190
|
+
--cpu-limit <N> Max CPU core allocation for worker daemon
|
|
43191
|
+
--memory-limit <MB> Max memory limit for worker daemon in MB
|
|
43192
|
+
--gpu Enable hardware GPU acceleration if available
|
|
43193
|
+
--foreground Run daemon or join process in foreground
|
|
43194
|
+
--json Format output as structured JSON
|
|
43195
|
+
-v, --version Print CLI version
|
|
43196
|
+
-h, --help Show this help reference
|
|
43197
|
+
|
|
43198
|
+
EXAMPLES:
|
|
43199
|
+
# Quick start interactive setup
|
|
43200
|
+
$ sharedots up
|
|
43201
|
+
|
|
43202
|
+
# Launch the interactive terminal UI
|
|
43203
|
+
$ sharedots tui
|
|
43204
|
+
|
|
43205
|
+
# Run a Python script partitioned across 4 workers
|
|
43206
|
+
$ sharedots run monte_carlo.py --partitions 4
|
|
43207
|
+
|
|
43208
|
+
# Open the web dashboard
|
|
43209
|
+
$ sharedots dashboard
|
|
43210
|
+
|
|
43211
|
+
# Start contributing idle compute in the background
|
|
43212
|
+
$ sharedots worker start --cpu-limit 8 --memory-limit 4096
|
|
43213
|
+
|
|
43214
|
+
Documentation & Repository: https://github.com/Rachit-Tiwari-7/SHAREDOTS
|
|
43157
43215
|
`);
|
|
43158
43216
|
}
|
|
43159
43217
|
async function main() {
|
|
43160
43218
|
const { positional, flags } = parseFlags(process.argv.slice(2));
|
|
43161
43219
|
const [group, sub, ...rest] = positional;
|
|
43220
|
+
if (flags.version || flags.v || group === "version") {
|
|
43221
|
+
console.log(`@sharedots/cli v${getCliVersion()}`);
|
|
43222
|
+
return;
|
|
43223
|
+
}
|
|
43162
43224
|
if (!group || flags.help || group === "help") {
|
|
43163
43225
|
printHelp();
|
|
43164
43226
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharedots/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"typescript": "^5.7.2",
|
|
23
23
|
"vitest": "^2.1.8",
|
|
24
24
|
"@sharedots/protocol": "0.1.2",
|
|
25
|
-
"
|
|
26
|
-
"sharedots": "0.1.2"
|
|
25
|
+
"sharedots": "0.1.2",
|
|
26
|
+
"@sharedots/tui": "0.1.2"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "tsup",
|