autonag 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 Andrew Morris
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,159 @@
1
+ # autonag
2
+
3
+ A recurring-task tracker with a persistent alarm. Timers count down; when one expires, the alarm rings on any device you have open to the alarm page. It doesn't stop until you mark the task done, snooze it, or silence it. Recurring tasks reschedule automatically.
4
+
5
+ **[autonag.com](https://autonag.com)** — [hosted app](https://app2.autonag.com) — [self-host](https://github.com/voltrevo/autonag)
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g autonag
11
+ ```
12
+
13
+ ## First-time setup
14
+
15
+ Point the CLI at your server and register this device:
16
+
17
+ ```bash
18
+ autonag --server https://your-server.example register mydevice
19
+ ```
20
+
21
+ Your token is saved to `~/.config/autonag/client.json5`. The device starts in PENDING state — an admin must approve it on the server before you can use it. Check your status:
22
+
23
+ ```bash
24
+ autonag status
25
+ ```
26
+
27
+ ## Getting an instance
28
+
29
+ Timers live in an *instance*. Create one:
30
+
31
+ ```bash
32
+ autonag instances request home
33
+ ```
34
+
35
+ Once approved, set it as your default:
36
+
37
+ ```bash
38
+ autonag instances list
39
+ autonag instances select <id>
40
+ ```
41
+
42
+ To join an instance someone else owns, ask them to run `autonag instances invite`, then join with the code they share:
43
+
44
+ ```bash
45
+ autonag instances join <code>
46
+ ```
47
+
48
+ ## Adding timers
49
+
50
+ One-shot reminder due in 2 days:
51
+
52
+ ```bash
53
+ autonag timers add "Doctor follow-up" 2d
54
+ ```
55
+
56
+ Recurring task every 7 days at 9 AM:
57
+
58
+ ```bash
59
+ autonag timers add "Weekly review" 7d --days 7 --anchor 09:00
60
+ ```
61
+
62
+ The first argument is the initial expiry. `--days` makes it recurring; `--anchor` sets the time of day; `--tz` overrides the timezone.
63
+
64
+ ## Checking timers
65
+
66
+ ```bash
67
+ autonag timers list
68
+ ```
69
+
70
+ ```
71
+ ID Name Remaining Recur
72
+ ------------------------------------------------------------
73
+ a1b2c3d4… Doctor follow-up in 1d 23h
74
+ e5f6a7b8… Weekly review in 6d 23h ↻
75
+ ```
76
+
77
+ The ↻ symbol marks recurring timers.
78
+
79
+ ## Completing a timer
80
+
81
+ ```bash
82
+ autonag timers complete e5f6 pass
83
+ ```
84
+
85
+ For a recurring timer this schedules the next occurrence:
86
+
87
+ ```
88
+ Timer "Weekly review" recurred — next: 4/24/2026, 9:00:00 AM
89
+ ```
90
+
91
+ For a one-shot timer it removes it. Reason can be `pass`, `fail`, or any custom string.
92
+
93
+ ## Snoozing and silencing
94
+
95
+ Push a timer's deadline out:
96
+
97
+ ```bash
98
+ autonag timers snooze e5f6 3d
99
+ ```
100
+
101
+ Silence the alarm temporarily (default 30 min):
102
+
103
+ ```bash
104
+ autonag shush
105
+ autonag shush 2h
106
+ autonag unshush
107
+ ```
108
+
109
+ ## Notes and history
110
+
111
+ Attach a description to a timer:
112
+
113
+ ```bash
114
+ autonag timers describe e5f6 "Prep the agenda first"
115
+ ```
116
+
117
+ Add timestamped comments:
118
+
119
+ ```bash
120
+ autonag comments add e5f6 "Done, flagged for follow-up"
121
+ ```
122
+
123
+ See completion history for a recurring timer:
124
+
125
+ ```bash
126
+ autonag timers history e5f6
127
+ ```
128
+
129
+ ## Event log
130
+
131
+ Every action is recorded and replayable:
132
+
133
+ ```bash
134
+ autonag events list
135
+ autonag events skip <event-id> # undo: recompute state as if this event never happened
136
+ ```
137
+
138
+ ## SDK usage
139
+
140
+ The package also exports a typed API client for use in scripts and agents:
141
+
142
+ ```typescript
143
+ import { createApiClient } from "autonag";
144
+
145
+ const api = createApiClient("https://your-server.example", token);
146
+
147
+ const state = await api.getState(instanceId, token);
148
+ const { timer } = await api.addTimer(instanceId, token, "Take medication", Date.now() + 8 * 3600_000);
149
+ await api.completeTimer(instanceId, token, timer.id, "done");
150
+ ```
151
+
152
+ All types (`Timer`, `InstanceState`, `StoredEvent`, etc.) are exported from the package root.
153
+
154
+ ## Full reference
155
+
156
+ ```bash
157
+ autonag --help
158
+ autonag tutorial
159
+ ```
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }