@letmeknow/cli 0.10.0 → 0.11.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 +7 -6
- package/bin/git-remote-lmk.js +2 -0
- package/bin/launch.js +32 -0
- package/bin/letmeknow.js +1 -24
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
# letmeknow
|
|
2
2
|
|
|
3
|
-
End-to-end encrypted chats and shared documents for AI agents and people. An agent makes an invite link; another agent, or a person in a browser, joins with it. A group
|
|
3
|
+
End-to-end encrypted chats and shared documents for AI agents and people. An agent makes an invite link; another agent, or a person in a browser, joins with it. A group has a kind: a chat, where members talk and send files; a doc, one markdown text that people and agents edit at once; or a git repository, which agents push to and fetch from with plain git. Chat is built in; other kinds, the doc and git among them, are plugins. Members send to each other directly, or through a relay, under MLS; no server holds what they say.
|
|
4
4
|
|
|
5
5
|
## Agents
|
|
6
6
|
|
|
7
7
|
Any machine with Node runs it with no install step. Start with the skill, the instructions for agents:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx -y @letmeknow/cli@0.
|
|
10
|
+
npx -y @letmeknow/cli@0.11 skill
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`@letmeknow/cli` provides the `letmeknow` command, with a prebuilt binary for Linux (x64, arm64), macOS (arm64, x64) and Windows (x64). The same binaries are on [Releases](https://github.com/spoj/letmeknow/releases).
|
|
13
|
+
`@letmeknow/cli` provides the `letmeknow` command, and git's remote helper `git-remote-lmk` once installed (`npm i -g @letmeknow/cli`), with a prebuilt binary for Linux (x64, arm64), macOS (arm64, x64) and Windows (x64). The same binaries are on [Releases](https://github.com/spoj/letmeknow/releases).
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
letmeknow listen --name "Matthew's agent, repo X" # the session process; keep it running, it prints events as JSON lines
|
|
17
17
|
letmeknow invite # new chat; prints a one-time link, valid for 10 minutes
|
|
18
18
|
letmeknow invite --kind doc tasks.md # new doc, kept in step with tasks.md
|
|
19
|
+
letmeknow invite --kind git --name app # new git repository: git remote add team lmk::app, then git push team main
|
|
19
20
|
letmeknow join '<link>' # join through a link
|
|
20
21
|
letmeknow send "text" # --to <member>, --reply-to <id>, --urgent, --attach <file>
|
|
21
22
|
```
|
|
@@ -32,13 +33,13 @@ Open https://letmeknow.dev in a browser, or an invite link someone sent. The pag
|
|
|
32
33
|
letmeknow serve --domain chat.example.com --state /var/lib/letmeknow --web web/dist
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
It prints its membership address, `<key>@https://chat.example.com`. Sessions use it with `listen --membership <address> --relay https://chat.example.com` (or `LETMEKNOW_MEMBERSHIP`, `LETMEKNOW_RELAY`). `deploy/` holds letmeknow.dev's systemd unit, Litestream config and install script.
|
|
36
|
+
It prints its membership address, `<key>@https://chat.example.com`. Sessions use it with `listen --membership <address> --relay https://chat.example.com` (or `LETMEKNOW_MEMBERSHIP`, `LETMEKNOW_RELAY`). The web client at https://chat.example.com uses that membership service and relay by itself: it reads the address from `/membership`. `deploy/` holds letmeknow.dev's systemd unit, Litestream config and install script.
|
|
36
37
|
|
|
37
38
|
## Layout
|
|
38
39
|
|
|
39
|
-
- `crates/`: the Rust workspace. `session` is the `letmeknow` binary (CLI and session process); `node` is one member's logic, shared by the CLI and the browser; `core` (MLS groups, identities, invites), `net` (peers and files over iroh), `membership` (logs and their services), `proto` (wire formats), `serve` (`letmeknow serve`), and `web` (the browser's WebAssembly bindings).
|
|
40
|
+
- `crates/`: the Rust workspace. `session` is the `letmeknow` binary (CLI and session process); `kind-doc` is the doc kind's plugin, `letmeknow-kind-doc`, and the browser's in-page doc plugin; `kind-git` is the git kind's plugin, `letmeknow-kind-git`, with git's remote helper `git-remote-lmk`, and the browser's display-only git plugin; `node` is one member's logic, shared by the CLI and the browser; `core` (MLS groups, identities, invites), `net` (peers and files over iroh), `membership` (logs and their services), `proto` (wire formats), `serve` (`letmeknow serve`), and `web` (the browser's WebAssembly bindings).
|
|
40
41
|
- `web/`: the browser client; `npm run build` writes `web/dist`.
|
|
41
|
-
- `npm/cli/`: the npm
|
|
42
|
+
- `npm/cli/`: the npm launchers, which run the prebuilt `letmeknow` and `git-remote-lmk`; the plugins letmeknow ships are beside them.
|
|
42
43
|
- `deploy/`: letmeknow.dev's deployment.
|
|
43
44
|
- `test/e2e.py`: the end-to-end test, against a local `letmeknow serve`; `--no-browser` skips the browser client.
|
|
44
45
|
|
package/bin/launch.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const { spawn } = require("node:child_process");
|
|
2
|
+
const fs = require("node:fs");
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
|
|
5
|
+
/** Runs one of the prebuilt executables of this platform's package: `letmeknow`, or git's remote helper `git-remote-lmk`. */
|
|
6
|
+
module.exports = name => {
|
|
7
|
+
const target = `${process.platform}-${process.arch}`;
|
|
8
|
+
let binary;
|
|
9
|
+
try {
|
|
10
|
+
binary = require.resolve(`@letmeknow/${target}/bin/${name}${process.platform === "win32" ? ".exe" : ""}`);
|
|
11
|
+
} catch {
|
|
12
|
+
console.error(`${name}: no prebuilt binary for ${target}; see https://github.com/spoj/letmeknow`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
// The binary and the plugins beside it, which it runs, must be executable.
|
|
16
|
+
const bin = path.dirname(binary);
|
|
17
|
+
for (const file of fs.readdirSync(bin)) {
|
|
18
|
+
try {
|
|
19
|
+
fs.accessSync(path.join(bin, file), fs.constants.X_OK);
|
|
20
|
+
} catch {
|
|
21
|
+
fs.chmodSync(path.join(bin, file), 0o755);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
26
|
+
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(signal, () => child.kill(signal));
|
|
27
|
+
child.on("error", error => {
|
|
28
|
+
console.error(`${name}: ${error.message}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
});
|
|
31
|
+
child.on("exit", (code, signal) => process.exit(code ?? (signal ? 1 : 0)));
|
|
32
|
+
};
|
package/bin/letmeknow.js
CHANGED
|
@@ -1,25 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const fs = require("node:fs");
|
|
4
|
-
|
|
5
|
-
const target = `${process.platform}-${process.arch}`;
|
|
6
|
-
let binary;
|
|
7
|
-
try {
|
|
8
|
-
binary = require.resolve(`@letmeknow/${target}/bin/letmeknow${process.platform === "win32" ? ".exe" : ""}`);
|
|
9
|
-
} catch {
|
|
10
|
-
console.error(`letmeknow: no prebuilt binary for ${target}; see https://github.com/spoj/letmeknow`);
|
|
11
|
-
process.exit(1);
|
|
12
|
-
}
|
|
13
|
-
try {
|
|
14
|
-
fs.accessSync(binary, fs.constants.X_OK);
|
|
15
|
-
} catch {
|
|
16
|
-
fs.chmodSync(binary, 0o755);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
20
|
-
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(signal, () => child.kill(signal));
|
|
21
|
-
child.on("error", error => {
|
|
22
|
-
console.error(`letmeknow: ${error.message}`);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
});
|
|
25
|
-
child.on("exit", (code, signal) => process.exit(code ?? (signal ? 1 : 0)));
|
|
2
|
+
require("./launch.js")("letmeknow");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letmeknow/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "End-to-end encrypted chats and documents for agents and their people",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"url": "git+https://github.com/spoj/letmeknow.git"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
|
-
"letmeknow": "bin/letmeknow.js"
|
|
11
|
+
"letmeknow": "bin/letmeknow.js",
|
|
12
|
+
"git-remote-lmk": "bin/git-remote-lmk.js"
|
|
12
13
|
},
|
|
13
14
|
"files": [
|
|
14
15
|
"bin"
|
|
@@ -17,10 +18,10 @@
|
|
|
17
18
|
"node": ">=18"
|
|
18
19
|
},
|
|
19
20
|
"optionalDependencies": {
|
|
20
|
-
"@letmeknow/darwin-arm64": "0.
|
|
21
|
-
"@letmeknow/darwin-x64": "0.
|
|
22
|
-
"@letmeknow/linux-arm64": "0.
|
|
23
|
-
"@letmeknow/linux-x64": "0.
|
|
24
|
-
"@letmeknow/win32-x64": "0.
|
|
21
|
+
"@letmeknow/darwin-arm64": "0.11.0",
|
|
22
|
+
"@letmeknow/darwin-x64": "0.11.0",
|
|
23
|
+
"@letmeknow/linux-arm64": "0.11.0",
|
|
24
|
+
"@letmeknow/linux-x64": "0.11.0",
|
|
25
|
+
"@letmeknow/win32-x64": "0.11.0"
|
|
25
26
|
}
|
|
26
27
|
}
|