luwu-cli 0.0.0-stage → 0.2.18

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.
Files changed (3) hide show
  1. package/README.md +35 -2
  2. package/bin/luwu.js +41 -0
  3. package/package.json +38 -4
package/README.md CHANGED
@@ -1,3 +1,36 @@
1
- # Temporary Holding Version
1
+ # Luwu (陆吾)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Reach the terminals and coding agents (Claude Code, Codex, Gemini CLI, …) on all your computers from your phone, tablet or another computer. Connections are end-to-end encrypted, peer-to-peer (libp2p + Noise), with relays only when a direct path isn't possible.
4
+
5
+ ```sh
6
+ npx luwu-cli
7
+ ```
8
+
9
+ The first run signs you in with your ccnote account (a 6-digit email code), makes this computer reachable, and opens a dashboard of your computers and their tmux terminals.
10
+
11
+ | Command | |
12
+ |---|---|
13
+ | `luwu` | dashboard (first-run setup if needed) |
14
+ | `luwu login` / `logout` | sign in / out |
15
+ | `luwu up` / `down` | start / stop the background service on this computer |
16
+ | `luwu status` | account, this computer, service state |
17
+ | `luwu ls [--json]` | list computers, terminals and agent state (e.g. "claude · needs you") |
18
+ | `luwu attach [computer] [session[:window]]` | open a terminal on another computer |
19
+ | `luwu fs ls\|get\|put\|find\|mkdir\|mv\|rm` | files on your computers, e.g. `luwu fs put shot.png mac` (to its inbox) |
20
+ | `luwu share <computer> <session>[:<window>]` | let a friend watch one window (`--write` to let them type, `--for 30m\|1h\|1d`); `luwu share ls`, `luwu share end <id>` |
21
+ | `luwu join <code\|link>` | join a window someone shared with you |
22
+ | `luwu hooks [install\|uninstall]` | notify your phone when Claude Code or Codex finishes or needs you |
23
+ | `luwu notify --from claude\|codex` | report an agent's state (run by the hooks) |
24
+ | `luwu unpair` | remove this computer from your account |
25
+
26
+ macOS and Linux (x64, arm64). On Windows, run it inside WSL. Terminals are tmux sessions: install tmux and start your agents inside it.
27
+
28
+ Files: your home folder is shared with your own devices, except secrets (`~/.ssh`, `~/.gnupg`, `~/.aws`, `.env` files, Luwu's keys). To share another folder, stop sharing some, or turn files off, put this in `~/.luwu/files.json` and run `luwu down && luwu up`:
29
+
30
+ ```json
31
+ { "roots": ["/data/projects"], "deny": ["Documents/private"], "disabled": false }
32
+ ```
33
+
34
+ On iPhone, get the Luwu app from TestFlight, sign in with the same ccnote account, and allow notifications. Run `luwu hooks install` on each computer; agents that are already running pick up the hooks when restarted.
35
+
36
+ https://luwu.dev
package/bin/luwu.js ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ // Launcher: runs the prebuilt luwu binary from the platform package npm
3
+ // installed alongside this one (luwu-<os>-<arch>, an optional dependency).
4
+ "use strict";
5
+ const { spawnSync } = require("node:child_process");
6
+
7
+ const platforms = {
8
+ "darwin-arm64": "luwu-darwin-arm64",
9
+ "darwin-x64": "luwu-darwin-x64",
10
+ "linux-x64": "luwu-linux-x64",
11
+ "linux-arm64": "luwu-linux-arm64",
12
+ "win32-x64": "luwu-win32-x64",
13
+ "win32-arm64": "luwu-win32-arm64",
14
+ };
15
+ const key = `${process.platform}-${process.arch}`;
16
+ const pkg = platforms[key];
17
+
18
+ if (!pkg) {
19
+ console.error(`Luwu has no build for ${key} yet. Supported: ${Object.keys(platforms).join(", ")}.`);
20
+ process.exit(1);
21
+ }
22
+
23
+ let bin;
24
+ try {
25
+ bin = require.resolve(`${pkg}/bin/luwu${process.platform === "win32" ? ".exe" : ""}`);
26
+ } catch {
27
+ console.error(
28
+ `The Luwu binary for ${key} (${pkg}) is missing. It is installed as an optional dependency;\n` +
29
+ "reinstall without --no-optional / --omit=optional, or use the installer: curl -fsSL https://luwu.dev/install.sh | sh" +
30
+ (process.platform === "win32" ? " (Windows: irm https://luwu.dev/install.ps1 | iex)" : ""),
31
+ );
32
+ process.exit(1);
33
+ }
34
+
35
+ const r = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
36
+ if (r.error) {
37
+ console.error(r.error.message);
38
+ process.exit(1);
39
+ }
40
+ if (r.signal && process.platform !== "win32") process.kill(process.pid, r.signal);
41
+ process.exit(r.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,40 @@
1
1
  {
2
2
  "name": "luwu-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.18",
4
+ "description": "Luwu (陆吾): reach the terminals and coding agents on all your computers from your phone, tablet or another computer. Secure P2P. The command is `luwu`.",
5
+ "homepage": "https://luwu.dev",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/luwulab/luwudev.git"
9
+ },
10
+ "license": "UNLICENSED",
11
+ "keywords": [
12
+ "terminal",
13
+ "tmux",
14
+ "remote",
15
+ "p2p",
16
+ "libp2p",
17
+ "claude",
18
+ "codex",
19
+ "ai",
20
+ "coding-agent"
21
+ ],
22
+ "bin": {
23
+ "luwu": "bin/luwu.js"
24
+ },
25
+ "files": [
26
+ "bin",
27
+ "README.md"
28
+ ],
29
+ "engines": {
30
+ "node": ">=18"
31
+ },
32
+ "optionalDependencies": {
33
+ "luwu-darwin-arm64": "0.2.18",
34
+ "luwu-darwin-x64": "0.2.18",
35
+ "luwu-linux-x64": "0.2.18",
36
+ "luwu-linux-arm64": "0.2.18",
37
+ "luwu-win32-x64": "0.2.18",
38
+ "luwu-win32-arm64": "0.2.18"
39
+ }
40
+ }