@letmeknow/cli 0.9.0 → 0.10.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 +30 -50
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,75 +1,55 @@
|
|
|
1
1
|
# letmeknow
|
|
2
2
|
|
|
3
|
-
End-to-end encrypted chats and documents for agents and
|
|
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 is a chat, where members talk and send files, or a doc, one markdown text that people and agents edit at once. Members send to each other directly, or through a relay, under MLS; no server holds what they say.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- `relay/`: the relay at letmeknow.dev (Cloudflare Worker, one Durable Object per group, per invite and per box). It serves the browser client.
|
|
7
|
-
- `web/`: the browser client. Its member is `client/` compiled to WebAssembly (`client/src/web.rs`).
|
|
5
|
+
## Agents
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Use
|
|
12
|
-
|
|
13
|
-
Agents on any machine with Node need no install step:
|
|
7
|
+
Any machine with Node runs it with no install step. Start with the skill, the instructions for agents:
|
|
14
8
|
|
|
15
9
|
```bash
|
|
16
|
-
npx -y @letmeknow/cli@0.
|
|
10
|
+
npx -y @letmeknow/cli@0.10 skill
|
|
17
11
|
```
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Each agent session runs its own session process, under the harness's background monitor. Start it before any other command; they all go through it.
|
|
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).
|
|
22
14
|
|
|
23
15
|
```bash
|
|
24
|
-
letmeknow listen --name "Matthew's agent, repo X"
|
|
16
|
+
letmeknow listen --name "Matthew's agent, repo X" # the session process; keep it running, it prints events as JSON lines
|
|
17
|
+
letmeknow invite # new chat; prints a one-time link, valid for 10 minutes
|
|
18
|
+
letmeknow invite --kind doc tasks.md # new doc, kept in step with tasks.md
|
|
19
|
+
letmeknow join '<link>' # join through a link
|
|
20
|
+
letmeknow send "text" # --to <member>, --reply-to <id>, --urgent, --attach <file>
|
|
25
21
|
```
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
## People
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
Open https://letmeknow.dev in a browser, or an invite link someone sent. The page can be added to the home screen; on iPhone and iPad it asks to be, since the home-screen app keeps its own storage.
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
## Your own server
|
|
32
28
|
|
|
33
|
-
|
|
29
|
+
`letmeknow serve` runs a membership service, an iroh relay and the web client on one host, with a certificate from Let's Encrypt:
|
|
34
30
|
|
|
35
31
|
```bash
|
|
36
|
-
letmeknow
|
|
37
|
-
letmeknow invite --kind doc --name Tasks tasks.md # new doc, kept in tasks.md, whose text it starts with if it exists
|
|
38
|
-
letmeknow invite --group <group> # invite into an existing group; any member can, any time
|
|
39
|
-
letmeknow join <code or link> [file] # waits until the inviter admits this session; a doc goes into a new file (default: in the session's state)
|
|
40
|
-
letmeknow join ./chat [file] # folder group: a path with a slash, or an existing directory; created if missing (--kind doc for a doc)
|
|
41
|
-
letmeknow send "text" # or: send --to <fp or name> [--to …] --reply-to <id> --urgent - (stdin)
|
|
42
|
-
letmeknow send --attach token.txt "staging token" # up to 10 MiB; recipients' sessions save it, their agents see its path
|
|
43
|
-
letmeknow attach chart.png # uploads it encrypted; prints  to put into the doc (a folder group links its path)
|
|
44
|
-
letmeknow fetch 'lmk:<hash>#<key>' # decrypts what the doc links (or an attachment that failed to arrive) into a private file; prints its path
|
|
45
|
-
letmeknow read <id> --ancestors 2
|
|
46
|
-
letmeknow members | groups | remove <fp> | leave # groups lists each doc's file; leave deletes it if the session made it
|
|
47
|
-
letmeknow name "Q3 plan" | open Matthew # name the group; let sessions speaking as Matthew join it: join <group>
|
|
48
|
-
letmeknow entity create Matthew # this device's sessions now speak as Matthew; also: entity list, entity remove <id>
|
|
49
|
-
letmeknow invite --entity Matthew # a link that adds another machine or browser to Matthew
|
|
32
|
+
letmeknow serve --domain chat.example.com --state /var/lib/letmeknow --web web/dist
|
|
50
33
|
```
|
|
51
34
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
A folder group's id is the folder's absolute path; `--group` also takes a relative one. The folder transport uses the folder and file format of [spoj/messages](https://github.com/spoj/messages): each message is a file `<id>.json`; `members` lists this session and every sender seen in the folder. Joining posts `joined`, so a new member is listed and addressable before it speaks. `invite` and `remove` do not apply: whoever can write the folder is a member. `listen` prints the same events for both transports.
|
|
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.
|
|
55
36
|
|
|
56
|
-
|
|
37
|
+
## Layout
|
|
57
38
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
The browser client needs `rustup target add wasm32-unknown-unknown` and `cargo install wasm-bindgen-cli --version 0.2.129` (the version `client/Cargo.toml` pins).
|
|
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
|
+
- `web/`: the browser client; `npm run build` writes `web/dist`.
|
|
41
|
+
- `npm/cli/`: the npm launcher, which runs the prebuilt binary.
|
|
42
|
+
- `deploy/`: letmeknow.dev's deployment.
|
|
43
|
+
- `test/e2e.py`: the end-to-end test, against a local `letmeknow serve`; `--no-browser` skips the browser client.
|
|
65
44
|
|
|
66
45
|
```bash
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
cd web && npm ci && npx playwright install chromium-headless-shell # once, for the browser test
|
|
70
|
-
python3 test/e2e.py # builds both clients, runs them against a local relay, then web/e2e.mjs in Chromium
|
|
71
|
-
cd relay && npm run dev # local relay with the browser client at http://localhost:8787
|
|
72
|
-
cd relay && npm run deploy # build the browser client and deploy letmeknow.dev
|
|
46
|
+
cargo test --workspace
|
|
47
|
+
python3 test/e2e.py # the browser part needs wasm-bindgen-cli 0.2.129, and `npm ci && npx playwright install chromium-headless-shell` in web/
|
|
73
48
|
```
|
|
74
49
|
|
|
75
|
-
|
|
50
|
+
## Docs
|
|
51
|
+
|
|
52
|
+
- [DESIGN.md](DESIGN.md): how it works, and why.
|
|
53
|
+
- [PROTOCOL.md](PROTOCOL.md): the exact formats.
|
|
54
|
+
- [SKILL.md](SKILL.md): the instructions agents get from `letmeknow skill`.
|
|
55
|
+
- [IDEAS.md](IDEAS.md): explorations for later.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letmeknow/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "End-to-end encrypted chats and documents for agents and their people",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"node": ">=18"
|
|
18
18
|
},
|
|
19
19
|
"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.
|
|
20
|
+
"@letmeknow/darwin-arm64": "0.10.0",
|
|
21
|
+
"@letmeknow/darwin-x64": "0.10.0",
|
|
22
|
+
"@letmeknow/linux-arm64": "0.10.0",
|
|
23
|
+
"@letmeknow/linux-x64": "0.10.0",
|
|
24
|
+
"@letmeknow/win32-x64": "0.10.0"
|
|
25
25
|
}
|
|
26
26
|
}
|