shared-things-server 1.0.1 β 1.0.2
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 +186 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://www.npmjs.com/package/shared-things-daemon"><img src="https://img.shields.io/npm/v/shared-things-daemon.svg" alt="npm version"></a>
|
|
3
|
+
<a href="https://github.com/yungweng/shared-things/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/shared-things-daemon.svg" alt="license"></a>
|
|
4
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/shared-things-daemon.svg" alt="node version"></a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
# shared-things
|
|
8
|
+
|
|
9
|
+
**Sync a Things 3 project between multiple macOS users**
|
|
10
|
+
|
|
11
|
+
Stop duplicating todos manually. shared-things keeps your team's Things 3 project in sync via a lightweight self-hosted serverβperfect for shared shopping lists, family tasks, or team todos.
|
|
12
|
+
|
|
13
|
+
<!--
|
|
14
|
+
TODO: Add demo GIF showing sync in action
|
|
15
|
+
<p align="center">
|
|
16
|
+
<img src="assets/demo.gif" alt="shared-things demo" width="600">
|
|
17
|
+
</p>
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
**Client (each user)**
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g shared-things-daemon
|
|
25
|
+
shared-things init
|
|
26
|
+
```
|
|
27
|
+
That's it. Follow the prompts.
|
|
28
|
+
|
|
29
|
+
## Features
|
|
30
|
+
|
|
31
|
+
- π **Real-time sync** - Changes propagate within 30 seconds
|
|
32
|
+
- π **Self-hosted** - No cloud subscription, host on your own server
|
|
33
|
+
- π₯ **Multi-user** - Each person gets their own API key
|
|
34
|
+
- π€« **Background daemon** - Auto-starts on login, runs silently
|
|
35
|
+
- π οΈ **Interactive CLI** - Easy setup wizard for configuration
|
|
36
|
+
|
|
37
|
+
## Prerequisites
|
|
38
|
+
|
|
39
|
+
- **macOS** with [Things 3](https://culturedcode.com/things/) installed
|
|
40
|
+
- **Node.js >= 18**
|
|
41
|
+
- A server running `shared-things-server` (see [Server Setup](#server-setup))
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
### Interactive Mode
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
shared-things init
|
|
49
|
+
```
|
|
50
|
+
```
|
|
51
|
+
? Server URL: https://things.yourdomain.com
|
|
52
|
+
? API Key: ****
|
|
53
|
+
? Project name in Things: Shared Project
|
|
54
|
+
? Things auth token: ****
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
> **Things auth token:** Required for syncing updates to existing todos. Find it in Things β Settings β General β Things URLs β Enable Things URLs.
|
|
58
|
+
|
|
59
|
+
### After Setup
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
shared-things install # Start daemon (auto-runs on login)
|
|
63
|
+
shared-things status # Check sync status
|
|
64
|
+
shared-things logs -f # Follow sync logs
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### All Commands
|
|
68
|
+
|
|
69
|
+
| Command | Description |
|
|
70
|
+
|---------|-------------|
|
|
71
|
+
| `init` | Setup wizard |
|
|
72
|
+
| `install` | Install launchd daemon (auto-starts on login) |
|
|
73
|
+
| `uninstall` | Remove launchd daemon |
|
|
74
|
+
| `status` | Show sync status & last sync time |
|
|
75
|
+
| `sync` | Force immediate sync |
|
|
76
|
+
| `logs [-f]` | Show logs (`-f` to follow) |
|
|
77
|
+
| `reset [--server]` | Reset local state (`--server` clears server too) |
|
|
78
|
+
| `purge` | Remove all local config |
|
|
79
|
+
|
|
80
|
+
## Server Setup
|
|
81
|
+
|
|
82
|
+
One person hosts the server. Everyone else just needs an API key.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Install
|
|
86
|
+
npm install -g shared-things-server
|
|
87
|
+
|
|
88
|
+
# Create a user (generates API key)
|
|
89
|
+
shared-things-server create-user
|
|
90
|
+
# β User "alice" created. API key: sk_abc123...
|
|
91
|
+
|
|
92
|
+
# Start server
|
|
93
|
+
shared-things-server start -d --port 3334
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Server Commands
|
|
97
|
+
|
|
98
|
+
| Command | Description |
|
|
99
|
+
|---------|-------------|
|
|
100
|
+
| `start [-d] [-p port]` | Start server (`-d` for background) |
|
|
101
|
+
| `stop` | Stop background server |
|
|
102
|
+
| `status` | Show server status |
|
|
103
|
+
| `logs [-f]` | Show logs (`-f` to follow) |
|
|
104
|
+
| `create-user` | Create user and generate API key |
|
|
105
|
+
| `list-users` | List all users |
|
|
106
|
+
| `delete-user` | Delete a user |
|
|
107
|
+
| `reset` | Delete all todos (keeps users) |
|
|
108
|
+
|
|
109
|
+
<details>
|
|
110
|
+
<summary><strong>Production Deployment</strong></summary>
|
|
111
|
+
|
|
112
|
+
### systemd Service
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
sudo tee /etc/systemd/system/shared-things.service << 'EOF'
|
|
116
|
+
[Unit]
|
|
117
|
+
Description=shared-things sync server
|
|
118
|
+
After=network.target
|
|
119
|
+
|
|
120
|
+
[Service]
|
|
121
|
+
Type=simple
|
|
122
|
+
ExecStart=/usr/bin/shared-things-server start --port 3334
|
|
123
|
+
Restart=always
|
|
124
|
+
|
|
125
|
+
[Install]
|
|
126
|
+
WantedBy=multi-user.target
|
|
127
|
+
EOF
|
|
128
|
+
|
|
129
|
+
sudo systemctl enable --now shared-things
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### HTTPS with Caddy
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
things.yourdomain.com {
|
|
136
|
+
reverse_proxy localhost:3334
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
</details>
|
|
141
|
+
|
|
142
|
+
## What Syncs
|
|
143
|
+
|
|
144
|
+
| Synced | Not Synced |
|
|
145
|
+
|--------|------------|
|
|
146
|
+
| Todo title, notes, due date, tags | Completed todos |
|
|
147
|
+
| Headings | Checklist items |
|
|
148
|
+
| | Areas |
|
|
149
|
+
|
|
150
|
+
> **Note:** The project must exist in each user's Things app. Only items within that project sync.
|
|
151
|
+
|
|
152
|
+
## How It Works
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
Things User A ββ Daemon A ββ Server ββ Daemon B ββ Things User B
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Each daemon polls Things every 30 seconds via AppleScript, pushes changes to the server, and pulls updates to apply via Things URL Scheme. Server is the single source of truth (last write wins).
|
|
159
|
+
|
|
160
|
+
## Development
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
git clone https://github.com/yungweng/shared-things.git
|
|
164
|
+
cd shared-things
|
|
165
|
+
pnpm install
|
|
166
|
+
pnpm build
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Contributing
|
|
170
|
+
|
|
171
|
+
Issues and PRs welcome! See [open issues](https://github.com/yungweng/shared-things/issues).
|
|
172
|
+
|
|
173
|
+
## Links
|
|
174
|
+
|
|
175
|
+
- [Repository](https://github.com/yungweng/shared-things)
|
|
176
|
+
- [Issues](https://github.com/yungweng/shared-things/issues)
|
|
177
|
+
- [npm (daemon)](https://www.npmjs.com/package/shared-things-daemon)
|
|
178
|
+
- [npm (server)](https://www.npmjs.com/package/shared-things-server)
|
|
179
|
+
|
|
180
|
+
## Author
|
|
181
|
+
|
|
182
|
+
Maintained by [@yungweng](https://github.com/yungweng)
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shared-things-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Sync server for Things 3 projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"shared-things-server": "dist/cli.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
-
"dist"
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
12
13
|
],
|
|
13
14
|
"scripts": {
|
|
14
15
|
"build": "tsup",
|