@profullstack/qryptchat 0.1.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 ADDED
@@ -0,0 +1,80 @@
1
+ # qc
2
+
3
+ [qrypt.chat](https://qrypt.chat) in your terminal: a full-screen, end-to-end encrypted chat client, a scriptable CLI and an MCP server, all in one command.
4
+
5
+ ```sh
6
+ npm install -g @profullstack/qryptchat # or: bun add -g @profullstack/qryptchat
7
+ qc
8
+ ```
9
+
10
+ The first run signs you in through your browser, then opens your chats.
11
+
12
+ ## The client
13
+
14
+ ```
15
+ πŸ”’ qrypt.chat @you ● live
16
+ β”Œ Chats β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œ alice ───────────────────────── 2 people Β· ML-KEM-1024 ┐
17
+ β”‚β–Έ alice 2 β”‚β”‚ ───────────────────── Tue 6 Oct ───────────────────── β”‚
18
+ β”‚ team chat β”‚β”‚ alice 14:02 β”‚
19
+ β”‚ ops β”‚β”‚ shipped it πŸš€ β”‚
20
+ β”‚ β”‚β”‚ you 14:03 β”‚
21
+ β”‚ β”‚β”‚ πŸ”₯πŸ”₯ β”‚
22
+ β”‚ β”‚β”‚ alice is typing… β”‚
23
+ β”‚ β”‚β”‚ Message alice (Ctrl+E emoji, :rocket: works too) β”‚
24
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
25
+ ENTER send CTRL+E emoji TAB chats PGUP scroll CTRL+C quit
26
+ ```
27
+
28
+ | Key | Does |
29
+ |---|---|
30
+ | Enter | send (or open the highlighted chat) |
31
+ | Ctrl+E | the emoji picker: search, recents and every group, drawn with [OpenEmoji](https://github.com/profullstack/openemoji) |
32
+ | `:rocket:` | shortcodes turn into emoji when you send |
33
+ | Tab / Esc | move between the chat list and the composer |
34
+ | Ctrl+N / Ctrl+P | next / previous chat |
35
+ | PgUp / PgDn, wheel | scroll back through the conversation |
36
+ | Ctrl+R | reload |
37
+ | Ctrl+C | quit |
38
+
39
+ The mouse works too: click a chat, scroll the transcript, click an emoji. Unread counts, typing indicators and new messages arrive live.
40
+
41
+ ## Scripts and agents
42
+
43
+ ```sh
44
+ qc chats # id and name of every chat
45
+ qc read alice -n 20 # the last 20 messages, decrypted
46
+ qc send alice "on my way" # encrypted to every participant
47
+ echo "deploy done" | qc send ops -
48
+ qc listen --json # new messages as NDJSON, until you stop it
49
+ qc whoami
50
+ ```
51
+
52
+ `<chat>` is a chat id or any unique part of its name. Add `--json` for machine output.
53
+
54
+ ### MCP
55
+
56
+ ```sh
57
+ qc mcp
58
+ ```
59
+
60
+ runs an MCP server on stdio with three tools: `list_chats`, `read_chat` and `send_message`. Encryption and decryption happen on this machine; the server only ever sees ciphertext. For Claude Code:
61
+
62
+ ```sh
63
+ claude mcp add qryptchat -- qc mcp
64
+ ```
65
+
66
+ ## Signing in
67
+
68
+ `qc login` uses OAuth 2.1 (authorization code + PKCE), started from the terminal:
69
+
70
+ 1. qc opens `qrypt.chat/cli/authorize` with a one-time ML-KEM-1024 public key and prints a confirmation code.
71
+ 2. You check the browser shows the same code, then approve.
72
+ 3. The browser seals your keys to that one-time key, and qc receives them plus a session of its own. The server only relays ciphertext.
73
+
74
+ Over SSH, `qc login --oob` shows a code in the browser for you to paste instead of redirecting back.
75
+
76
+ The session and keys are kept in `~/.config/qc/session.json` (or `$QC_HOME`), mode 0600. Sessions refresh themselves; `qc logout` deletes them. Point at another server with `--url` or `QC_URL`.
77
+
78
+ ## Licence
79
+
80
+ MIT. Emoji: OpenEmoji by Profullstack, Inc. (CC BY 4.0).
package/bin/qc.js ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ // qc: qrypt.chat in the terminal. `qc` opens the chat client; `qc --help` lists the rest.
3
+ import { readFileSync } from 'node:fs';
4
+ import { main } from '../dist/commands.js';
5
+
6
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
7
+
8
+ main(process.argv.slice(2), { version: pkg.version }).then(
9
+ () => process.exit(0),
10
+ (err) => {
11
+ process.stderr.write(`qc: ${err?.message ?? err}\n`);
12
+ process.exit(1);
13
+ },
14
+ );