mysticals 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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +135 -0
  3. package/dist/cli.js +4219 -0
  4. package/package.json +58 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Oleksandr Ratushnyi
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 ADDED
@@ -0,0 +1,135 @@
1
+ # mysticals (terminal)
2
+
3
+ Mysticals for the terminal on macOS, Linux and Windows: one calendar view over several Google and CalDAV accounts that stay isolated from each other. It's a separate app from the desktop (Electron) Mysticals, with its own accounts, settings and credentials, so you can run both on the same machine.
4
+
5
+ Website: https://mysticals.sashkoratushnyi.com · Source: https://github.com/a1exalexander/mysticals
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm i -g mysticals
11
+ mysticals
12
+ ```
13
+
14
+ Needs Node.js 20.3 or newer. `mysticals --help` lists options, `mysticals --version` prints the version.
15
+
16
+ - **macOS**: nothing else. The credential key goes in the Keychain; notifications use `osascript`.
17
+ - **Linux**: `secret-tool` (package `libsecret-tools` on Debian/Ubuntu, `libsecret` on Fedora/Arch) and a running keyring such as GNOME Keyring or KWallet. Optional: `notify-send` for notifications, `xdg-open` to open Google sign-in in the browser.
18
+ - **Windows**: nothing else. The credential key is sealed with DPAPI and notifications are toasts, both through the built-in Windows PowerShell.
19
+
20
+ It checks npm for a newer version once a day and shows a hint in the status line; update with `npm i -g mysticals`.
21
+
22
+ Try it without real accounts:
23
+
24
+ ```sh
25
+ MYSTICALS_MOCK=1 mysticals # macOS, Linux
26
+ $env:MYSTICALS_MOCK=1; mysticals # Windows PowerShell
27
+ set "MYSTICALS_MOCK=1" && mysticals # Windows cmd
28
+ ```
29
+
30
+ ## Keys
31
+
32
+ | Key | Action |
33
+ | --- | --- |
34
+ | `a` `d` `2` `w` `m` | Agenda / Day / 2 Days / Week / Month view |
35
+ | `←` `→` (or `h` `l`) | Day, 2 Days, Week, Month: previous / next day, selecting its event closest to the same time. Agenda: previous / next event |
36
+ | `↑` `↓` | Day, 2 Days, Week: previous / next event of the selected day. Month: previous / next event in time order. Agenda: previous / next event |
37
+ | `j` `k` | Next / previous event in time order |
38
+ | `Shift` `←` `→` (or `H` `L`) | Previous / next page (moving past the edge of a page pages too) |
39
+ | `t` | Today |
40
+ | `enter` | Open the selected event |
41
+ | `n` | New event |
42
+ | `i` | Invitations (`y` accept, `n` decline, `m` maybe) |
43
+ | `s` | Accounts and calendars |
44
+ | `r` | Sync now |
45
+ | `?` | Help |
46
+ | `q` | Quit (`esc` or `q` closes an open panel first) |
47
+
48
+ In an open event:
49
+
50
+ | Key | Action |
51
+ | --- | --- |
52
+ | `y` `n` `m` | Accept / decline / maybe (invitations only) |
53
+ | `o` | Open the video-call link from the event's place |
54
+ | `e` | Edit |
55
+ | `x` | Delete (confirm with `y`; for a repeating event `1` this, `2` this and following, `3` all) |
56
+ | `a` | Show all / fewer attendees (long guest lists) |
57
+ | `esc` `q` | Close |
58
+
59
+ The bottom bar has two rows. The first shows what's on now, the next event within 24 hours, the number of pending invites, and accounts whose last sync failed. The second has buttons for new, sync, invites, accounts, help and quit.
60
+
61
+ The agenda shows each day as a heading (relative day, event count, busy time) followed by two-line event cards: start and end time, a bar in the calendar's colour, the title with badges (`● now · ends in 25m`, `in 25m` for the next one today, `RSVP`, `maybe`, `declined`), and a detail line (account · calendar, `↻ repeats`, `⚠ overlaps`, place or `video call`, number of people). Days without events collapse into `free` rows.
62
+
63
+ Day, 2 Days and Week are time-grid tables: one row per hour, a column per day, all-day events on top. Events are blocks in their calendar's colour. The current time is red: the clock in the hour column, a red line through today's free cells, a red line between past and upcoming events in the agenda, and today's date in the month grid.
64
+
65
+ Colours come from your terminal theme: the app only uses the 16 ANSI colours and reverse video, and each calendar's colour is snapped to the nearest ANSI hue. `NO_COLOR=1` turns colours off.
66
+
67
+ ### Mouse
68
+
69
+ Everything with a key also works with a click: view tabs, `‹ today ›`, the buttons in the bottom bar, the key buttons at the bottom of each panel, and the parts of the info row (now/next event, invites, failed sync). Click an event to select it and click it again to open it. Click a day heading to open that day, or a free cell of the time grid to create an event there. The scroll wheel moves the selection.
70
+
71
+ At 100 columns or wider, the agenda, day and 2 days views show the selected event (or the next one ahead) in a pane on the right.
72
+
73
+ mysticals runs in the terminal's alternate screen with mouse reporting on, so a plain drag no longer selects text. To select and copy, hold ⌥ Option while dragging on macOS, or Shift on most Linux and Windows terminals (Shift in some macOS terminals too). In tmux, turn on `set -g mouse on` to pass clicks through.
74
+
75
+ ## How it runs
76
+
77
+ The first `mysticals` you open starts a small background daemon. It holds the accounts, syncs them and shows system notifications. Every other `mysticals` window connects to the same daemon over a unix socket (a named pipe on Windows), so accounts are synced once, however many windows are open. The daemon stops about 3 seconds after the last window closes. Notifications only arrive while at least one window is open.
78
+
79
+ ## Where data lives
80
+
81
+ | What | Where |
82
+ | --- | --- |
83
+ | Accounts, cache, settings | `mysticals-terminal` in `~/Library/Application Support` (macOS), `%APPDATA%` (Windows), `$XDG_DATA_HOME` or `~/.local/share` (Linux) |
84
+ | Daemon socket and log | `daemon.sock` and `daemon.log` in that folder (Windows: a named pipe `\\.\pipe\mysticals-…` and `daemon.log`) |
85
+ | Credentials | Encrypted in that folder (AES-256-GCM). The key is in the macOS Keychain or the Linux Secret Service (service `mysticals-terminal`), or on Windows in `master.key` in that folder, sealed with DPAPI for your Windows user |
86
+
87
+ The desktop app uses its own folder and key; the two never share data. Set `MYSTICALS_HOME` to use another data folder (for example a second, independent profile). `MYSTICALS_MOCK=1` uses a temporary folder with two fake accounts and touches nothing real.
88
+
89
+ ## Telemetry
90
+
91
+ Two anonymous events go to PostHog (EU): `app_installed` on first run and `account_added` when you add an account. They carry the app, version, OS, architecture and, for accounts, the provider and CalDAV preset. The only ID is random and stored in the data folder. Emails, usernames, servers, calendars and events are never sent. The first run says so in the status line. Opt out with `MYSTICALS_TELEMETRY=0` or `DO_NOT_TRACK=1` (set it before the first window opens: windows share the background daemon, which reads it when it starts). More in the [root README](https://github.com/a1exalexander/mysticals#telemetry).
92
+
93
+ ## Troubleshooting
94
+
95
+ - **"Could not start the mysticals daemon"**: read `daemon.log` in the data folder. A socket left behind by a crashed daemon is cleaned up automatically on the next start.
96
+ - **Daemon stuck**: close all `mysticals` windows, then `pkill -f 'cli.js --daemon'` (Windows: end the background `node` process in Task Manager) and start again.
97
+ - **Linux: "Secret Service … failed"**: install `secret-tool` and make sure a keyring is running and unlocked (on a headless box, `gnome-keyring-daemon --unlock`).
98
+ - **Keychain prompt**: on first use macOS asks to allow access to the `mysticals-terminal` Keychain item. Choose **Always Allow**. If you deny it, saved credentials can't be decrypted and accounts have to be added again.
99
+ - **Google sign-in not available**: the build had no Google OAuth client. See below.
100
+
101
+ ## Development
102
+
103
+ From the repo root:
104
+
105
+ ```sh
106
+ pnpm i
107
+ cp .env.example .env # optional, for Google accounts
108
+ pnpm --filter mysticals build # dist/cli.js
109
+ node apps/terminal/dist/cli.js # run it
110
+ MYSTICALS_MOCK=1 node apps/terminal/dist/cli.js # with fake accounts
111
+ pnpm --filter mysticals dev # rebuild on change
112
+ pnpm --filter mysticals test # unit, UI and daemon tests
113
+ pnpm --filter mysticals typecheck
114
+ ```
115
+
116
+ After a rebuild, close every window so the old daemon exits before you test the new one.
117
+
118
+ ### Google OAuth client
119
+
120
+ Create a Google Cloud OAuth client of type **Desktop app** (steps in [CONTRIBUTING.md](https://github.com/a1exalexander/mysticals/blob/main/CONTRIBUTING.md#google-oauth-client-for-google-accounts)) and put it in the repo-root `.env`:
121
+
122
+ ```
123
+ MYSTICALS_GOOGLE_CLIENT_ID=...apps.googleusercontent.com
124
+ MYSTICALS_GOOGLE_CLIENT_SECRET=...
125
+ ```
126
+
127
+ The values are embedded into `dist/cli.js` at build time. The same variables set in the environment at runtime override them.
128
+
129
+ ### Publish
130
+
131
+ Releases go out from a `v*` tag in CI, together with the desktop app. See [Releasing](https://github.com/a1exalexander/mysticals/blob/main/CONTRIBUTING.md#releasing).
132
+
133
+ ## License
134
+
135
+ MIT — see [LICENSE](https://github.com/a1exalexander/mysticals/blob/main/LICENSE).