clocktopus 1.0.4 → 1.0.6
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 +16 -6
- package/dist/dashboard/routes/monitor.js +6 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -10,16 +10,18 @@ CLI-based time-tracking automation for Clockify with idle monitoring, Jira integ
|
|
|
10
10
|
|
|
11
11
|
Most users only need the dashboard — a web UI to manage timers, connect integrations, and monitor idle time.
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Prerequisites
|
|
14
|
+
|
|
15
|
+
[Bun](https://bun.sh) is required (used as the runtime):
|
|
14
16
|
|
|
15
17
|
```bash
|
|
16
|
-
|
|
18
|
+
curl -fsSL https://bun.sh/install | bash
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
### Install
|
|
20
22
|
|
|
21
23
|
```bash
|
|
22
|
-
|
|
24
|
+
bun i -g clocktopus
|
|
23
25
|
```
|
|
24
26
|
|
|
25
27
|
### Run
|
|
@@ -52,9 +54,17 @@ That's it. Start/stop timers from the Home tab.
|
|
|
52
54
|
| `clocktopus serve:stop` | Stop the dashboard daemon |
|
|
53
55
|
| `clocktopus serve:logs` | View dashboard daemon logs |
|
|
54
56
|
|
|
55
|
-
### Desktop App
|
|
57
|
+
### Desktop App (macOS)
|
|
58
|
+
|
|
59
|
+
A menu bar app is available — download the `.dmg` from [GitHub Releases](https://github.com/sajxraj/clocktopus/releases).
|
|
60
|
+
|
|
61
|
+
After installing, remove the quarantine flag (app is not code-signed):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
xattr -cr /Applications/Clocktopus.app
|
|
65
|
+
```
|
|
56
66
|
|
|
57
|
-
|
|
67
|
+
The dashboard server must be running (`clocktopus serve`). See [desktop/README.md](desktop/README.md) for details.
|
|
58
68
|
|
|
59
69
|
---
|
|
60
70
|
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
2
|
import { execSync } from 'child_process';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
const SCRIPT_PATH = path.resolve(__dirname, '../../index.js');
|
|
3
8
|
const monitorRoutes = new Hono();
|
|
4
9
|
function pm2Exec(command) {
|
|
5
10
|
try {
|
|
@@ -32,7 +37,7 @@ monitorRoutes.get('/monitor/status', (c) => {
|
|
|
32
37
|
});
|
|
33
38
|
monitorRoutes.post('/monitor/start', (c) => {
|
|
34
39
|
const bunPath = execSync('which bun', { encoding: 'utf-8' }).trim();
|
|
35
|
-
const result = pm2Exec(`bunx pm2 start
|
|
40
|
+
const result = pm2Exec(`bunx pm2 start ${SCRIPT_PATH} --name clocktopus --interpreter ${bunPath} -- monitor`);
|
|
36
41
|
return c.json(result);
|
|
37
42
|
});
|
|
38
43
|
monitorRoutes.post('/monitor/stop', (c) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clocktopus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "bunx tsc",
|
|
17
17
|
"prepublishOnly": "bunx tsc",
|
|
18
|
+
"postinstall": "cd node_modules/macos-notification-state && node-gyp rebuild 2>/dev/null; cd ../desktop-idle && node-gyp rebuild 2>/dev/null; true",
|
|
18
19
|
"lint": "eslint . --ext .ts",
|
|
19
20
|
"clock": "bun dist/index.js",
|
|
20
21
|
"clockd": "bunx pm2 start dist/index.js --name clocktopus --",
|
|
@@ -41,9 +42,9 @@
|
|
|
41
42
|
"inquirer": "^8.2.4",
|
|
42
43
|
"macos-notification-state": "^3.0.0",
|
|
43
44
|
"node-notifier": "^10.0.1",
|
|
45
|
+
"pm2": "^6.0.8",
|
|
44
46
|
"uuid": "^11.1.0",
|
|
45
|
-
"zod": "^3.25.76"
|
|
46
|
-
"pm2": "^6.0.8"
|
|
47
|
+
"zod": "^3.25.76"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@types/bun": "^1.3.11",
|