kiteline 0.2.0 → 0.3.0
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 +2 -2
- package/dist/auth-CYNu-f_h.mjs +104 -0
- package/dist/{banner-CXnDgf5p.mjs → banner-C1Jj4n4W.mjs} +44 -42
- package/dist/cli.mjs +30 -10
- package/dist/client.BPI7fHX3-CSey2FaL.mjs +1437 -0
- package/dist/control-BEq2N-wP.mjs +101 -0
- package/dist/control-BpOGsRCZ.mjs +1 -0
- package/dist/devices-command-Bubh46v1.mjs +76 -0
- package/dist/{package-CbMOnF6R.mjs → package-BoxBh8MJ.mjs} +1 -1
- package/dist/pair-command-DBxw6BfK.mjs +107 -0
- package/dist/{service-BCgNAv2Z.mjs → service-C2w4PsA8.mjs} +16 -22
- package/dist/{src-DSH8d4ZM.mjs → src-CR4MmTcf.mjs} +1048 -1421
- package/dist/web/assets/MagnifyingGlass.es-DH9Sttou.js +1 -0
- package/dist/web/assets/Plus.es-1uU9mFYr.js +1 -0
- package/dist/web/assets/composer-BcIdpxHM.js +1 -0
- package/dist/web/assets/copy-button-DRCJdYml.js +1 -0
- package/dist/web/assets/format-BHMU9nwj.js +9 -0
- package/dist/web/assets/index-BRaZDA7B.css +1 -0
- package/dist/web/assets/index-TWMUhgcM.js +11 -0
- package/dist/web/assets/lazy/{core-CuC-kkU7.js → core-pRLcnHpb.js} +1 -1
- package/dist/web/assets/new-BbSpVHmG.js +1 -0
- package/dist/web/assets/prefs-q6daUElH.js +1 -0
- package/dist/web/assets/routes-lV-e8sSj.js +1 -0
- package/dist/web/assets/s._sessionId-t7H-a-HP.js +45 -0
- package/dist/web/assets/settings-CbonbiKb.js +1 -0
- package/dist/web/assets/status-CKsUN4Lx.js +1 -0
- package/dist/web/index.html +3 -3
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/auth-YhkfTv6K.mjs +0 -60
- package/dist/show-pairing-CTd0UfS1.mjs +0 -30
- package/dist/show-pairing-Zurbk9wK.mjs +0 -1
- package/dist/web/assets/IconBase.es-h0cGkmPy.js +0 -9
- package/dist/web/assets/MagnifyingGlass.es-CpSmmHxy.js +0 -1
- package/dist/web/assets/composer-WnPpY669.js +0 -1
- package/dist/web/assets/copy-button-DBETbWKF.js +0 -1
- package/dist/web/assets/index-CA73h-Vn.css +0 -1
- package/dist/web/assets/index-CTAi3HIp.js +0 -11
- package/dist/web/assets/new-D_XEbYrm.js +0 -1
- package/dist/web/assets/prefs-D6OSXuFe.js +0 -1
- package/dist/web/assets/routes-Csbxwlji.js +0 -1
- package/dist/web/assets/s._sessionId-BlR4dPFc.js +0 -45
- package/dist/web/assets/settings-DRpTnWMo.js +0 -1
- package/dist/web/assets/status-C7fEa4v1.js +0 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ You need Node.js 22.18 or newer, and Claude Code signed in on the computer.
|
|
|
30
30
|
npx kiteline --relay
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Scan the QR code it prints with your phone's camera, and you're in, on any network. `--relay` connects through Kiteline's relay, sealed end to end: it passes your sessions on without being able to read them. Leave it out to keep Kiteline to your own Wi-Fi, or [use Tailscale](https://kiteline.seefun.dev/docs/#tailscale).
|
|
33
|
+
Scan the QR code it prints with your phone's camera, check that the phone and the terminal show the same six digits, and allow it: you're in, on any network. `--relay` connects through Kiteline's relay, sealed end to end: it passes your sessions on without being able to read them. Leave it out to keep Kiteline to your own Wi-Fi, or [use Tailscale](https://kiteline.seefun.dev/docs/#tailscale).
|
|
34
34
|
|
|
35
35
|
To keep it running in the background, starting with your computer (Linux):
|
|
36
36
|
|
|
@@ -48,7 +48,7 @@ Everything else is in the **[docs](https://kiteline.seefun.dev/docs/)**:
|
|
|
48
48
|
|
|
49
49
|
## Good to know
|
|
50
50
|
|
|
51
|
-
- **
|
|
51
|
+
- **You approve every device.** A pairing code works once, for ten minutes, and only lets a device ask; it gets in once you allow it, like Bluetooth. Each device has its own key, and you can remove any one in Settings or with `kiteline devices`. Don't open Kiteline's port to the internet; use `--relay` or Tailscale to reach it from elsewhere.
|
|
52
52
|
- **It uses Claude Code's own login,** your Claude plan or API key. Check that the way you use it fits your plan's terms.
|
|
53
53
|
- **Tested on Linux so far.** Reports from real phones, macOS and Windows are very welcome.
|
|
54
54
|
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { chmodSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
5
|
+
// src/auth.ts
|
|
6
|
+
const DEVICE_COOKIE = "kiteline_device";
|
|
7
|
+
function kitelineHome(override) {
|
|
8
|
+
return override || join(homedir(), ".kiteline");
|
|
9
|
+
}
|
|
10
|
+
function writePrivate(home, name, value) {
|
|
11
|
+
const file = join(home, name);
|
|
12
|
+
mkdirSync(home, {
|
|
13
|
+
recursive: true,
|
|
14
|
+
mode: 448
|
|
15
|
+
});
|
|
16
|
+
writeFileSync(file, `${JSON.stringify(value, null, 2)}\n`, { mode: 384 });
|
|
17
|
+
chmodSync(file, 384);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The computer's own key, in ~/.kiteline/auth.json (mode 600): the `kiteline` commands show it to
|
|
21
|
+
* the Kiteline that's running, to make pairing codes and manage devices. No link or log carries it,
|
|
22
|
+
* and no phone holds it; each of those has a key of its own.
|
|
23
|
+
*
|
|
24
|
+
* Before 0.3 this file held the one pairing code, which every pairing link carried. Finding one of
|
|
25
|
+
* those replaces it, so an old link opens nothing.
|
|
26
|
+
*/
|
|
27
|
+
function loadComputerKey(home, options) {
|
|
28
|
+
if (!options.rotate) {
|
|
29
|
+
const key = readComputerKey(home);
|
|
30
|
+
if (key) return {
|
|
31
|
+
key,
|
|
32
|
+
replaced: false
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
let replaced = options.rotate;
|
|
36
|
+
try {
|
|
37
|
+
replaced ||= typeof JSON.parse(readFileSync(join(home, "auth.json"), "utf8")).token === "string";
|
|
38
|
+
} catch {}
|
|
39
|
+
const key = randomBytes(32).toString("base64url");
|
|
40
|
+
writePrivate(home, "auth.json", {
|
|
41
|
+
key,
|
|
42
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
key,
|
|
46
|
+
replaced
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function readComputerKey(home) {
|
|
50
|
+
try {
|
|
51
|
+
const stored = JSON.parse(readFileSync(join(home, "auth.json"), "utf8"));
|
|
52
|
+
return typeof stored.key === "string" && stored.key.length >= 43 ? stored.key : null;
|
|
53
|
+
} catch {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function saveServerInfo(home, info) {
|
|
58
|
+
try {
|
|
59
|
+
writePrivate(home, "server.json", info);
|
|
60
|
+
} catch {}
|
|
61
|
+
}
|
|
62
|
+
function readServerInfo(home) {
|
|
63
|
+
try {
|
|
64
|
+
const info = JSON.parse(readFileSync(join(home, "server.json"), "utf8"));
|
|
65
|
+
return typeof info.local === "string" ? info : null;
|
|
66
|
+
} catch {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** Where a server listening on `host` answers from this computer. */
|
|
71
|
+
function localAddress(port, host) {
|
|
72
|
+
return `http://${[
|
|
73
|
+
"0.0.0.0",
|
|
74
|
+
"::",
|
|
75
|
+
"127.0.0.1",
|
|
76
|
+
"localhost",
|
|
77
|
+
""
|
|
78
|
+
].includes(host) ? "127.0.0.1" : host.includes(":") ? `[${host}]` : host}:${port}`;
|
|
79
|
+
}
|
|
80
|
+
function safeEqual(a, b) {
|
|
81
|
+
const left = Buffer.from(a);
|
|
82
|
+
const right = Buffer.from(b);
|
|
83
|
+
return left.length === right.length && timingSafeEqual(left, right);
|
|
84
|
+
}
|
|
85
|
+
/** Slows down guessing: ten wrong codes from one address locks it out for ten minutes. */
|
|
86
|
+
var PairLimiter = class {
|
|
87
|
+
failures = /* @__PURE__ */ new Map();
|
|
88
|
+
blocked(key) {
|
|
89
|
+
const entry = this.failures.get(key);
|
|
90
|
+
return !!entry && entry.count >= 10 && entry.until > Date.now();
|
|
91
|
+
}
|
|
92
|
+
fail(key) {
|
|
93
|
+
const entry = this.failures.get(key);
|
|
94
|
+
const fresh = !entry || entry.until < Date.now();
|
|
95
|
+
this.failures.set(key, {
|
|
96
|
+
count: fresh ? 1 : entry.count + 1,
|
|
97
|
+
until: Date.now() + 6e5
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
clear(key) {
|
|
101
|
+
this.failures.delete(key);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
export { localAddress as a, safeEqual as c, loadComputerKey as i, saveServerInfo as l, PairLimiter as n, readComputerKey as o, kitelineHome as r, readServerInfo as s, DEVICE_COOKIE as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseEnv } from "node:util";
|
|
2
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
2
|
import { networkInterfaces } from "node:os";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
// ../../node_modules/.pnpm/uqr@0.1.3/node_modules/uqr/dist/index.mjs
|
|
@@ -1019,7 +1019,6 @@ function readSettings() {
|
|
|
1019
1019
|
port: whole("PORT", "The port", 4545, 1, 65535),
|
|
1020
1020
|
host: text("HOST") ?? "0.0.0.0",
|
|
1021
1021
|
publicUrl: address("KITELINE_PUBLIC_URL", "The public address"),
|
|
1022
|
-
token: text("KITELINE_TOKEN"),
|
|
1023
1022
|
home: text("KITELINE_HOME"),
|
|
1024
1023
|
claudePath: text("CLAUDE_PATH"),
|
|
1025
1024
|
allowBypass: yesNo("KITELINE_ALLOW_BYPASS", "Allowing Bypass mode", true),
|
|
@@ -1034,7 +1033,7 @@ function startedFromCli() {
|
|
|
1034
1033
|
viaCli = true;
|
|
1035
1034
|
}
|
|
1036
1035
|
function command(name) {
|
|
1037
|
-
if (viaCli) return name === "start" ? "kiteline" :
|
|
1036
|
+
if (viaCli) return name === "start" ? "kiteline" : `kiteline ${name}`;
|
|
1038
1037
|
return `pnpm ${name}`;
|
|
1039
1038
|
}
|
|
1040
1039
|
/** How to pick another port, in the same terms. */
|
|
@@ -1049,25 +1048,32 @@ function reachableHosts() {
|
|
|
1049
1048
|
const rank = (ip) => ip.startsWith("192.168.") ? 0 : ip.startsWith("10.") ? 1 : ip.startsWith("100.") ? 2 : 3;
|
|
1050
1049
|
return hosts.sort((a, b) => rank(a) - rank(b));
|
|
1051
1050
|
}
|
|
1052
|
-
/**
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
const lan = options.loopbackOnly ? [] : reachableHosts().map((host) => `http://${host}:${port}`);
|
|
1059
|
-
const relay = options.relay?.url.replace(/\/+$/, "");
|
|
1060
|
-
const urls = [
|
|
1051
|
+
/** Every address a phone might reach this computer at: the relay, the public URL, the LAN, this machine. */
|
|
1052
|
+
function addressesFor(port, where) {
|
|
1053
|
+
const publicUrl = where.publicUrl?.replace(/\/+$/, "");
|
|
1054
|
+
const lan = where.loopbackOnly ? [] : reachableHosts().map((host) => `http://${host}:${port}`);
|
|
1055
|
+
const relay = where.relay?.url.replace(/\/+$/, "");
|
|
1056
|
+
return [
|
|
1061
1057
|
...relay ? [relay] : [],
|
|
1062
1058
|
...publicUrl ? [publicUrl] : [],
|
|
1063
1059
|
...lan,
|
|
1064
1060
|
`http://localhost:${port}`
|
|
1065
1061
|
];
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* Where a one-time code goes: through the relay, the link also says which computer, and works on any
|
|
1065
|
+
* network; otherwise it points at the public URL when one is set (say, the HTTPS address from
|
|
1066
|
+
* `tailscale serve`), or else the first LAN address. The code rides after #, which browsers never send.
|
|
1067
|
+
*/
|
|
1068
|
+
function pairingLinks(port, where) {
|
|
1069
|
+
const urls = addressesFor(port, where);
|
|
1070
|
+
const relay = where.relay;
|
|
1071
|
+
return (code) => {
|
|
1072
|
+
const url = relay ? `${relay.url.replace(/\/+$/, "")}/#host=${relay.hostId}&code=${code}` : `${urls[0]}/#code=${code}`;
|
|
1073
|
+
return {
|
|
1074
|
+
url,
|
|
1075
|
+
svg: renderSVG(url, { border: 1 })
|
|
1076
|
+
};
|
|
1071
1077
|
};
|
|
1072
1078
|
}
|
|
1073
1079
|
const color = !!process.stdout.isTTY && !process.env.NO_COLOR;
|
|
@@ -1075,50 +1081,46 @@ const paint = (open, close) => (s) => color ? `\x1b[${open}m${s}\x1b[${close}m`
|
|
|
1075
1081
|
const dim = paint("2", "22");
|
|
1076
1082
|
const bold = paint("1", "22");
|
|
1077
1083
|
const accent = paint("38;5;117", "39");
|
|
1078
|
-
|
|
1084
|
+
/** Six digits as people read them off a screen: 482 913. */
|
|
1085
|
+
const spaced = (match) => `${match.slice(0, 3)} ${match.slice(3)}`;
|
|
1086
|
+
/** Who's running, and where: never a pairing link, which a service's log would keep. */
|
|
1087
|
+
function printBanner(urls, options) {
|
|
1079
1088
|
const lines = [
|
|
1080
1089
|
"",
|
|
1081
1090
|
` ${accent("◆")} ${bold("Kiteline")} ${dim(`v${options.version}`)}${options.dev ? dim(" (dev, web on :4546)") : ""}`,
|
|
1082
1091
|
"",
|
|
1083
|
-
...
|
|
1084
|
-
const label = i ===
|
|
1092
|
+
...urls.map((url, i) => {
|
|
1093
|
+
const label = i === urls.length - 1 ? "Local " : url === options.relay ? "Anywhere" : "Network ";
|
|
1085
1094
|
return ` ${dim(label)} ${url}`;
|
|
1086
1095
|
}),
|
|
1087
1096
|
...options.relay ? ["", ` ${dim("Through the relay, sealed end to end: it passes your sessions on unread.")}`] : [],
|
|
1097
|
+
""
|
|
1098
|
+
];
|
|
1099
|
+
console.log(lines.join("\n"));
|
|
1100
|
+
}
|
|
1101
|
+
/** A one-time code to scan, for a person at a terminal. */
|
|
1102
|
+
function printPairingCode(link, options = {}) {
|
|
1103
|
+
const minutes = Math.max(1, Math.round((link.expiresAt - Date.now()) / 6e4));
|
|
1104
|
+
const lines = [
|
|
1088
1105
|
"",
|
|
1089
|
-
` ${bold("Pair
|
|
1106
|
+
` ${bold("Pair a phone:")} scan this code, or open the link on it.`,
|
|
1090
1107
|
"",
|
|
1091
|
-
...renderUnicodeCompact(
|
|
1108
|
+
...renderUnicodeCompact(link.url, { border: 1 }).split("\n").map((row) => ` ${row}`),
|
|
1092
1109
|
"",
|
|
1093
|
-
` ${accent(
|
|
1094
|
-
` ${dim(
|
|
1110
|
+
` ${accent(link.url)}`,
|
|
1111
|
+
` ${dim(`Works once, for the next ${minutes} minutes. You'll be asked to allow the phone.`)}`,
|
|
1112
|
+
...options.more ? [` ${dim(options.more)}`] : [],
|
|
1095
1113
|
""
|
|
1096
1114
|
];
|
|
1097
1115
|
console.log(lines.join("\n"));
|
|
1098
1116
|
}
|
|
1099
|
-
/** Lets `pnpm pair` show the code later without starting a second server. */
|
|
1100
|
-
function savePairing(home, pairing, version) {
|
|
1101
|
-
const saved = {
|
|
1102
|
-
version,
|
|
1103
|
-
url: pairing.url,
|
|
1104
|
-
urls: pairing.urls,
|
|
1105
|
-
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1106
|
-
};
|
|
1107
|
-
try {
|
|
1108
|
-
mkdirSync(home, {
|
|
1109
|
-
recursive: true,
|
|
1110
|
-
mode: 448
|
|
1111
|
-
});
|
|
1112
|
-
writeFileSync(join(home, "pairing.json"), `${JSON.stringify(saved, null, 2)}\n`, { mode: 384 });
|
|
1113
|
-
} catch {}
|
|
1114
|
-
}
|
|
1115
1117
|
function printAlreadyRunning(port) {
|
|
1116
1118
|
console.error([
|
|
1117
1119
|
"",
|
|
1118
1120
|
` ${accent("◆")} ${bold("Kiteline didn't start:")} port ${port} is already in use.`,
|
|
1119
1121
|
"",
|
|
1120
1122
|
" If Kiteline is already running, for example as the background service,",
|
|
1121
|
-
" there's nothing to start.
|
|
1123
|
+
" there's nothing to start. Pair a phone with it:",
|
|
1122
1124
|
"",
|
|
1123
1125
|
` ${accent(command("pair"))}`,
|
|
1124
1126
|
"",
|
|
@@ -1133,4 +1135,4 @@ function printSettingsError(message) {
|
|
|
1133
1135
|
""
|
|
1134
1136
|
].join("\n"));
|
|
1135
1137
|
}
|
|
1136
|
-
export {
|
|
1138
|
+
export { RelayPath as _, pairingLinks as a, relaySocketUrl as b, printPairingCode as c, SettingsError as d, command as f, RelayClose as g, startedFromCli as h, dim as i, printSettingsError as l, readSettings as m, addressesFor as n, printAlreadyRunning as o, loadOwnEnvFile as p, bold as r, printBanner as s, accent as t, spaced as u, fromBase64Url as v, toBase64Url as x, hostIdFor as y };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as version } from "./package-
|
|
3
|
-
import {
|
|
2
|
+
import { t as version } from "./package-BoxBh8MJ.mjs";
|
|
3
|
+
import { h as startedFromCli, i as dim, r as bold, t as accent } from "./banner-C1Jj4n4W.mjs";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
// src/cli.ts
|
|
6
6
|
const HELP = `
|
|
@@ -8,8 +8,11 @@ const HELP = `
|
|
|
8
8
|
Drive Claude Code on this computer from your phone.
|
|
9
9
|
|
|
10
10
|
${bold("Usage")}
|
|
11
|
-
kiteline Start Kiteline
|
|
12
|
-
kiteline pair
|
|
11
|
+
kiteline Start Kiteline; the first time, it shows a code to pair your phone
|
|
12
|
+
kiteline pair Pair a phone: a code that works once, then you allow the phone
|
|
13
|
+
kiteline devices See the paired devices, and when each was last used
|
|
14
|
+
kiteline devices remove <name or id>
|
|
15
|
+
Unpair one device; with --all, every one
|
|
13
16
|
kiteline service install Keep it running in the background, from startup (Linux)
|
|
14
17
|
kiteline service uninstall Take the background service away
|
|
15
18
|
kiteline service Say whether it's running in the background
|
|
@@ -22,7 +25,6 @@ const HELP = `
|
|
|
22
25
|
the pairing code points there
|
|
23
26
|
--relay Reach this computer from anywhere, through Kiteline's relay.
|
|
24
27
|
Sealed end to end: the relay passes your sessions on unread
|
|
25
|
-
--new-token Make a new pairing code, so every device pairs again
|
|
26
28
|
--force With service install: replace a service set up by hand
|
|
27
29
|
-v, --version Show the version
|
|
28
30
|
-h, --help Show this
|
|
@@ -48,6 +50,7 @@ function parse() {
|
|
|
48
50
|
host: { type: "string" },
|
|
49
51
|
"public-url": { type: "string" },
|
|
50
52
|
"new-token": { type: "boolean" },
|
|
53
|
+
all: { type: "boolean" },
|
|
51
54
|
relay: { type: "boolean" },
|
|
52
55
|
force: { type: "boolean" },
|
|
53
56
|
help: {
|
|
@@ -89,20 +92,37 @@ if (values["public-url"] !== void 0) process.env.KITELINE_PUBLIC_URL = values["p
|
|
|
89
92
|
if (values.relay) process.env.KITELINE_RELAY ||= "on";
|
|
90
93
|
startedFromCli();
|
|
91
94
|
const [command, action, ...rest] = positionals;
|
|
92
|
-
if (rest.length) fail(`"${rest.join(" ")}" isn't something Kiteline takes. Run ${bold("kiteline --help")}.`);
|
|
95
|
+
if (rest.length && !(command === "devices" && action !== void 0)) fail(`"${rest.join(" ")}" isn't something Kiteline takes. Run ${bold("kiteline --help")}.`);
|
|
96
|
+
/** The commands that talk to the Kiteline already running, with what to do when it isn't. */
|
|
97
|
+
async function talk(run) {
|
|
98
|
+
const { Unreachable } = await import("./control-BpOGsRCZ.mjs");
|
|
99
|
+
try {
|
|
100
|
+
return await run();
|
|
101
|
+
} catch (error) {
|
|
102
|
+
if (error instanceof Unreachable) fail(error.message);
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
93
106
|
switch (command) {
|
|
94
107
|
case void 0:
|
|
95
108
|
case "start":
|
|
96
109
|
if (action) fail(`"${action}" isn't something Kiteline takes. Run ${bold("kiteline --help")}.`);
|
|
97
|
-
await import("./src-
|
|
110
|
+
await import("./src-CR4MmTcf.mjs");
|
|
98
111
|
break;
|
|
99
112
|
case "pair": {
|
|
100
|
-
|
|
101
|
-
await
|
|
113
|
+
if (action) fail(`"${action}" isn't something kiteline pair takes. Run ${bold("kiteline --help")}.`);
|
|
114
|
+
const { pairCommand } = await import("./pair-command-DBxw6BfK.mjs");
|
|
115
|
+
process.exit(await talk(pairCommand) ? 0 : 1);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case "devices": {
|
|
119
|
+
const { devicesCommand } = await import("./devices-command-Bubh46v1.mjs");
|
|
120
|
+
await talk(() => devicesCommand(action, rest.join(" "), { all: values.all === true }));
|
|
121
|
+
process.exit(0);
|
|
102
122
|
break;
|
|
103
123
|
}
|
|
104
124
|
case "service": {
|
|
105
|
-
const { service } = await import("./service-
|
|
125
|
+
const { service } = await import("./service-C2w4PsA8.mjs");
|
|
106
126
|
await service(action, { force: values.force === true });
|
|
107
127
|
break;
|
|
108
128
|
}
|