clawborrator-cli 0.0.5 → 0.0.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/dist-bundled/claw.cjs +19 -6
- package/package.json +1 -1
package/dist-bundled/claw.cjs
CHANGED
|
@@ -7208,7 +7208,7 @@ var sessionInit = new Command("init").description("install clawborrator hooks in
|
|
|
7208
7208
|
if (alreadyPresent > 0) console.log(` (${alreadyPresent} already up-to-date, untouched)`);
|
|
7209
7209
|
console.log("");
|
|
7210
7210
|
console.log("next: drop a .mcp.json with your channel token (`claw token mint --kind=channel");
|
|
7211
|
-
console.log(" --name=<label> --mcp-snippet
|
|
7211
|
+
console.log(" --name=<label> --mcp-snippet --out=.mcp.json`), then start CC with:");
|
|
7212
7212
|
console.log(" claude --dangerously-load-development-channels server:clawborrator");
|
|
7213
7213
|
console.log(" events will flow as you prompt; watch via `claw session attach <id>`.");
|
|
7214
7214
|
});
|
|
@@ -7362,6 +7362,10 @@ var sessionMessages = new Command("messages").alias("msgs").description("dump op
|
|
|
7362
7362
|
});
|
|
7363
7363
|
var sessionCmd = new Command("session").description("manage Claude Code sessions registered with this hub").addCommand(sessionList).addCommand(sessionInfo).addCommand(sessionAttach).addCommand(sessionInit).addCommand(sessionEvents).addCommand(sessionMessages);
|
|
7364
7364
|
|
|
7365
|
+
// src/commands/token.ts
|
|
7366
|
+
var import_node_fs3 = require("node:fs");
|
|
7367
|
+
var import_node_path3 = require("node:path");
|
|
7368
|
+
|
|
7365
7369
|
// ../shared/dist/scopes.js
|
|
7366
7370
|
var ALL_SCOPES = [
|
|
7367
7371
|
"me:read",
|
|
@@ -7393,17 +7397,18 @@ var CLI_DEFAULT_SCOPES = [
|
|
|
7393
7397
|
];
|
|
7394
7398
|
|
|
7395
7399
|
// src/commands/token.ts
|
|
7396
|
-
var tokenMint = new Command("mint").description("create a new token").requiredOption("--kind <kind>", "channel | pat").requiredOption("--name <name>", 'human-readable label (e.g. "alice-laptop")').option("--scopes <csv>", "comma-separated scopes (PAT only); default = sensible CLI set").option("--app <name>", "pin the PAT to a specific app (display only)").option("--mcp-snippet", "after minting a channel token,
|
|
7400
|
+
var tokenMint = new Command("mint").description("create a new token").requiredOption("--kind <kind>", "channel | pat").requiredOption("--name <name>", 'human-readable label (e.g. "alice-laptop")').option("--scopes <csv>", "comma-separated scopes (PAT only); default = sensible CLI set").option("--app <name>", "pin the PAT to a specific app (display only)").option("--mcp-snippet", "after minting a channel token, also produce a ready-to-use .mcp.json block. By default writes to stdout (prose to stderr); pair with --out=<path> to write the file directly (recommended on Windows \u2014 `>` redirection in PowerShell encodes as UTF-16 w/ BOM, which CC rejects).").option("--out <path>", "when used with --mcp-snippet, write the JSON to <path> (UTF-8, no BOM) instead of stdout. Pass `.mcp.json` for the canonical project location.").action(async (opts) => {
|
|
7397
7401
|
if (opts.kind === "channel") {
|
|
7398
7402
|
const out = await api.post("/api/v1/tokens/channel", { name: opts.name });
|
|
7399
|
-
const
|
|
7403
|
+
const proseToStderr = opts.mcpSnippet && !opts.out;
|
|
7404
|
+
const prose = proseToStderr ? console.error : console.log;
|
|
7400
7405
|
prose(`\u2713 channel token minted: ${out.name}`);
|
|
7401
7406
|
prose(` ${out.token}`);
|
|
7402
7407
|
prose(" (shown ONCE \u2014 store it now)");
|
|
7403
7408
|
if (opts.mcpSnippet) {
|
|
7404
7409
|
const cfg = loadConfig();
|
|
7405
7410
|
const wsUrl = cfg.hubUrl.replace(/^http(s?):\/\//, "ws$1://");
|
|
7406
|
-
|
|
7411
|
+
const json = JSON.stringify({
|
|
7407
7412
|
mcpServers: {
|
|
7408
7413
|
clawborrator: {
|
|
7409
7414
|
command: "npx",
|
|
@@ -7414,7 +7419,15 @@ var tokenMint = new Command("mint").description("create a new token").requiredOp
|
|
|
7414
7419
|
}
|
|
7415
7420
|
}
|
|
7416
7421
|
}
|
|
7417
|
-
}, null, 2) + "\n"
|
|
7422
|
+
}, null, 2) + "\n";
|
|
7423
|
+
if (opts.out) {
|
|
7424
|
+
const target = (0, import_node_path3.resolve)(opts.out);
|
|
7425
|
+
(0, import_node_fs3.writeFileSync)(target, json, "utf8");
|
|
7426
|
+
prose("");
|
|
7427
|
+
prose(`\u2713 wrote ${target}`);
|
|
7428
|
+
} else {
|
|
7429
|
+
process.stdout.write(json);
|
|
7430
|
+
}
|
|
7418
7431
|
prose("");
|
|
7419
7432
|
prose(" next: launch CC with the clawborrator channel enabled \u2014");
|
|
7420
7433
|
prose(" claude --dangerously-load-development-channels server:clawborrator");
|
|
@@ -7555,7 +7568,7 @@ var webhookCmd = new Command("webhook").description("manage webhook subscription
|
|
|
7555
7568
|
|
|
7556
7569
|
// src/index.ts
|
|
7557
7570
|
var program2 = new Command();
|
|
7558
|
-
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.
|
|
7571
|
+
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.6");
|
|
7559
7572
|
program2.addCommand(loginCmd);
|
|
7560
7573
|
program2.addCommand(logoutCmd);
|
|
7561
7574
|
program2.addCommand(whoamiCmd);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawborrator-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "claw — command-line client for clawborrator hub_v1. Manages PATs, channel tokens, sessions, cross-session routing, and webhooks; ships an inline TUI for live multi-operator session attach.",
|
|
6
6
|
"license": "MIT",
|