zalo-tui 0.0.0-stage → 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/CHANGELOG.md ADDED
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/).
4
+
5
+ A release is made by adding a section for the new version below and bumping `version` in `package.json` to match, then pushing to `main`.
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0] - 2026-11-24
10
+
11
+ ### Added
12
+
13
+ - QR code login with a remembered session.
14
+ - Chat list of friends and groups, recent chats first, with unread counts, a name filter and the order kept between runs.
15
+ - Message pane that follows the highlighted chat, with word wrapping, per-chat drafts and scrollback.
16
+ - Sending text, photos and files, by path, drag and drop, `/photo` or `/file`.
17
+ - Reactions with a searchable popup of all Zalo reactions, shown under each message with your own highlighted.
18
+ - Recall your own messages and delete any message for yourself.
19
+ - Clickable links, and `o` to open photos, files and links.
20
+ - Desktop notifications for direct messages and @mentions, respecting muted chats and terminal focus.
21
+ - Vim-style keys, mouse clicks and wheel scrolling, and a `/help` panel.
22
+ - Reconnect after another Zalo session takes over.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 paulcoding810
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,101 @@
1
- # Temporary Holding Version
1
+ # zalo-tui
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
+ A terminal client for Zalo personal accounts, built on [zca-js](https://github.com/RFS-ADRENO/zca-js) and [Ink](https://github.com/vadimdemedes/ink).
4
+
5
+ > [!WARNING]
6
+ > This uses an **unofficial** Zalo API. Zalo does not support it, and using it may get your account locked or banned. Use it at your own risk, and don't use it for bulk or automated messaging.
7
+
8
+ ## Features
9
+
10
+ - Log in by scanning a QR code; the session is remembered.
11
+ - Chat list with friends and groups, recent chats first, unread counts and a name filter.
12
+ - Read and send messages; links are clickable and open with `o`.
13
+ - Send photos and files (drag a file into the terminal, or `/photo` and `/file`).
14
+ - Reactions (all of Zalo's built-in ones), recall, and delete for yourself.
15
+ - Desktop notifications for direct messages and @mentions, respecting muted chats.
16
+ - Keyboard first (vim-style keys), with mouse clicks and wheel scrolling.
17
+
18
+ ## Requirements
19
+
20
+ - Node.js 22 or newer.
21
+ - macOS is the main target. Notifications and opening links use `osascript` and `open`; on Linux they fall back to `notify-send` and `xdg-open`, which are untested. Windows is not supported.
22
+ - A terminal with true mouse and focus reporting works best (Ghostty, iTerm2, WezTerm, Kitty).
23
+
24
+ ## Install
25
+
26
+ ```sh
27
+ npm install -g zalo-tui
28
+ ```
29
+
30
+ ## Install from source
31
+
32
+ ```sh
33
+ git clone https://github.com/paulcoding810/zalo-tui.git
34
+ cd zalo-tui
35
+ pnpm install
36
+ pnpm build
37
+ ln -s "$PWD/bin/zalo-tui.js" ~/.local/bin/zalo-tui
38
+ ```
39
+
40
+ Run `pnpm build` again after pulling changes.
41
+
42
+ ## Usage
43
+
44
+ Run `zalo-tui`, then open Zalo on your phone, use its QR scanner on the code shown, and confirm the login on the phone.
45
+
46
+ Type `/help` or press `?` inside the app to see all keys.
47
+
48
+ | Where | Keys |
49
+ |---|---|
50
+ | Chat list | `j`/`k` or `↑`/`↓` move · `g`/`G` top/bottom · `Ctrl+d`/`Ctrl+u` half page · `/` filter · `l` or `Tab` messages · `Enter` or `i` type · `n` notifications · `r` reconnect |
51
+ | Messages | `j`/`k` select · `e` react · `d` recall or delete · `o` open photo, file or link · `h` or `Tab` chats · `i` type |
52
+ | Message box | `Enter` send · `Esc` back · `←`/`→` move · `Ctrl+a`/`Ctrl+e` start/end · `Ctrl+u` clear |
53
+ | Anywhere | `PgUp`/`PgDn` or wheel scroll · click to open a chat, select a message or type · `Shift`-drag selects text · `Ctrl+C` quit |
54
+
55
+ Commands in the message box:
56
+
57
+ | Command | |
58
+ |---|---|
59
+ | `/photo <path> [caption]` | send a photo (jpg, png, webp) |
60
+ | `/file <path> [caption]` | send any other file |
61
+ | `//text` | send text that starts with `/` |
62
+ | `/help` | show help |
63
+
64
+ A path on its own, for example from dragging a file into the terminal, asks before sending it.
65
+
66
+ ## Your data
67
+
68
+ Everything is stored in `~/.config/zalo-tui/`, readable only by you:
69
+
70
+ | File | Contents |
71
+ |---|---|
72
+ | `credentials.json` | your logged-in session. Anyone with this file can use your account. Delete it to log out. |
73
+ | `settings.json` | notification preference |
74
+ | `activity.json` | each chat's last activity time and name, used to keep the list order |
75
+ | `debug.log` | only with `ZALO_TUI_DEBUG=1`: why each message did or didn't notify (no names or text) |
76
+
77
+ Set `ZALO_TUI_HOME` to use a different folder.
78
+
79
+ ## Limitations
80
+
81
+ - Zalo allows one web session at a time. Opening Zalo Web or PC elsewhere disconnects the app; press `r` in the chat list to reconnect.
82
+ - On connect, Zalo returns roughly the last day of messages. Older history isn't available.
83
+ - Stickers show as `[sticker]` and can't be sent. Voice, video and polls show as placeholders.
84
+ - Clipboard images can't be pasted; save them as a file first.
85
+
86
+ ## Development
87
+
88
+ ```sh
89
+ pnpm start # run from source
90
+ pnpm test # unit tests
91
+ pnpm typecheck
92
+ pnpm build # bundle to dist/
93
+ ```
94
+
95
+ ### Releasing
96
+
97
+ Add a section for the new version to `CHANGELOG.md`, set the same `version` in `package.json`, and push to `main`. The Release workflow checks that the two match, runs the checks, publishes to npm with provenance, and creates a GitHub release from that changelog section. It does nothing if that version is already on npm.
98
+
99
+ ## License
100
+
101
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "../dist/zalo-tui.js";