@deckasoft/waify 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Deckasoft
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,83 @@
1
+ # waify
2
+
3
+ > AI-powered daily message sender for WhatsApp, powered by [OpenWA](https://github.com/rmyndharis/OpenWA)
4
+
5
+ Send a daily heartfelt message to someone you care about — automatically generated by AI, delivered via WhatsApp. Set it up once, and `waify` handles the rest.
6
+
7
+ ## Prerequisites
8
+
9
+ - [Docker](https://docs.docker.com/get-started/get-docker/) (for the WhatsApp API server)
10
+ - Node.js 20+
11
+ - A Google Gemini API key — [get one free](https://aistudio.google.com/apikey)
12
+ - A WhatsApp account on your phone
13
+
14
+ ## Quick Start
15
+
16
+ ```bash
17
+ npm install -g @deckasoft/waify
18
+ waify setup # guided wizard: starts OpenWA, scans QR, configures everything
19
+ waify send # send your first message
20
+ ```
21
+
22
+ ## Commands
23
+
24
+ | Command | Description |
25
+ |---|---|
26
+ | `waify setup` | First-run wizard — starts Docker services, links WhatsApp, configures AI and recipient |
27
+ | `waify send` | Generate a message with Gemini and send it via WhatsApp |
28
+ | `waify preview` | Preview generated messages without sending (`-n 3` for multiple candidates) |
29
+ | `waify tui` | Launch the interactive terminal UI (tabs: Home, History, Settings, Prompt, Schedule) |
30
+ | `waify history` | View sent message log (`--tail 20`, `--grep "pattern"`) |
31
+ | `waify config list` | Show current configuration |
32
+ | `waify config get <key>` | Get a single config value |
33
+ | `waify config set <key> <value>` | Update a config value |
34
+ | `waify prompt show` | Show the current AI system prompt and examples |
35
+ | `waify prompt edit` | Open the prompt in `$EDITOR` |
36
+ | `waify prompt add-example <text>` | Add a few-shot example to the prompt |
37
+ | `waify schedule list` | List scheduled jobs |
38
+ | `waify schedule add <name> <cron>` | Add a cron job (e.g. `"0 9 * * *"`) |
39
+ | `waify schedule remove <name>` | Remove a scheduled job |
40
+
41
+ ## Configuration
42
+
43
+ All config files live in `~/.config/waify/`:
44
+
45
+ | File | Contents |
46
+ |---|---|
47
+ | `config.json` | OpenWA URL, session ID, API key, recipient |
48
+ | `prompt.json` | AI system prompt + few-shot examples |
49
+ | `schedule.json` | Scheduled send jobs |
50
+ | `.env` | API keys (Gemini, OpenWA) |
51
+ | `docker-compose.yml` | Generated by `waify setup` |
52
+ | `messages.log` | Send history |
53
+
54
+ **Environment variable overrides:**
55
+
56
+ | Variable | Default | Description |
57
+ |---|---|---|
58
+ | `WAIFY_DATA_DIR` | `~/.config/waify` | Override config directory |
59
+ | `WAIFY_ENV_PATH` | `~/.config/waify/.env` | Override .env file path |
60
+
61
+ ## Scheduling
62
+
63
+ Use `waify schedule add` to create cron jobs. Changes require restarting the scheduler:
64
+
65
+ ```bash
66
+ waify schedule add morning "0 9 * * *"
67
+ docker compose -f ~/.config/waify/docker-compose.yml restart scheduler
68
+ ```
69
+
70
+ ## Powered by OpenWA
71
+
72
+ waify uses [OpenWA](https://github.com/rmyndharis/OpenWA) as its WhatsApp API server. OpenWA runs locally in Docker and exposes a REST API that waify uses to send messages. All your WhatsApp data stays on your machine.
73
+
74
+ ## Roadmap
75
+
76
+ - [ ] Multi-recipient support (schema already supports arrays — currently capped at 1)
77
+ - [ ] Additional AI providers (OpenAI, Anthropic, Ollama) via the `AIProvider` interface
78
+ - [ ] Additional transport adapters (Telegram, SMS)
79
+ - [ ] NX monorepo with the [deckasoft/openwa](https://github.com/deckasoft/openwa) fork
80
+
81
+ ## License
82
+
83
+ MIT — see [LICENSE](LICENSE)