auto-clock-cli 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +27 -30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-clock-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool for automatic clock in/out with HRMS integration",
5
5
  "main": "clock.js",
6
6
  "bin": {
package/readme.md CHANGED
@@ -4,20 +4,8 @@ A CLI tool to automatically clock in and clock out at scheduled times.
4
4
 
5
5
  ## Installation
6
6
 
7
- ### Option 1: Install globally from npm (for team members)
8
7
  ```bash
9
- npm install -g auto-clock
10
- ```
11
-
12
- ### Option 2: Install from local folder
13
- ```bash
14
- cd /path/to/auto-clock
15
- npm install -g .
16
- ```
17
-
18
- ### Option 3: Run directly without installing
19
- ```bash
20
- node /path/to/auto-clock/clock.js <command>
8
+ npm install -g auto-clock-cli
21
9
  ```
22
10
 
23
11
  ## Quick Start
@@ -40,9 +28,9 @@ auto-clock in # Clock in now
40
28
  auto-clock out # Clock out now
41
29
  ```
42
30
 
43
- ### 3. Set up automatic scheduling
31
+ ### 3. Enable automatic scheduling
44
32
  ```bash
45
- auto-clock cron # Shows cron commands to copy
33
+ auto-clock enable # Enable smart auto clock
46
34
  ```
47
35
 
48
36
  ## Commands
@@ -52,10 +40,16 @@ auto-clock cron # Shows cron commands to copy
52
40
  | `auto-clock setup` | Interactive setup wizard |
53
41
  | `auto-clock in` | Clock in now |
54
42
  | `auto-clock out` | Clock out now |
43
+ | `auto-clock smart` | Smart clock (auto detects if in/out needed) |
44
+ | `auto-clock history [days]` | Show clock history (default: 14 days) |
45
+ | `auto-clock reclock` | Request reclock for a single day |
46
+ | `auto-clock reclock-range` | Request reclock for multiple days |
47
+ | `auto-clock enable` | Enable smart auto clock |
48
+ | `auto-clock disable` | Disable auto clock |
55
49
  | `auto-clock schedule` | Change clock in/out times |
56
- | `auto-clock cron` | Show cron setup instructions |
57
50
  | `auto-clock status` | Show current configuration |
58
51
  | `auto-clock logs` | Show recent logs |
52
+ | `auto-clock token` | Manually set JWT token |
59
53
  | `auto-clock help` | Show help |
60
54
 
61
55
  ## Configuration
@@ -63,34 +57,37 @@ auto-clock cron # Shows cron commands to copy
63
57
  Config is stored at: `~/.auto-clock/config.json`
64
58
  Logs are stored at: `~/.auto-clock/clock.log`
65
59
 
66
- ## Scheduling with Cron (macOS/Linux)
60
+ ## Smart Auto Clock
67
61
 
68
- After running `auto-clock cron`, copy the displayed commands to your crontab:
62
+ The `enable` command sets up smart auto clock that:
63
+ - Checks every 10 minutes during work hours
64
+ - Auto clocks IN if: after your clock-in time and not yet clocked in
65
+ - Auto clocks OUT if: after your clock-out time and not yet clocked out
66
+ - Only runs Monday-Friday
69
67
 
70
- ```bash
71
- crontab -e
72
- ```
68
+ **Benefit:** Even if you open your laptop late, it will still clock you in!
73
69
 
74
- Example cron entries (8:00 AM clock in, 5:00 PM clock out, Mon-Fri):
75
- ```cron
76
- 0 8 * * 1-5 /path/to/node /path/to/clock.js in >> ~/.auto-clock/clock.log 2>&1
77
- 0 17 * * 1-5 /path/to/node /path/to/clock.js out >> ~/.auto-clock/clock.log 2>&1
78
- ```
70
+ ## Reclock
79
71
 
80
- **Note:** Your computer must be ON and awake at scheduled times.
72
+ If you forgot to clock in/out, use reclock:
73
+
74
+ ```bash
75
+ auto-clock reclock # Single day
76
+ auto-clock reclock-range # Multiple days (date range)
77
+ ```
81
78
 
82
79
  ## For Multiple Users
83
80
 
84
81
  Each user:
85
- 1. Installs the tool: `npm install -g auto-clock`
82
+ 1. Installs: `npm install -g auto-clock-cli`
86
83
  2. Runs setup: `auto-clock setup`
87
- 3. Configures cron: `auto-clock cron`
84
+ 3. Enables: `auto-clock enable`
88
85
 
89
86
  Each user's config is stored separately in their home directory.
90
87
 
91
88
  ## Uninstall
92
89
 
93
90
  ```bash
94
- npm uninstall -g auto-clock
91
+ npm uninstall -g auto-clock-cli
95
92
  rm -rf ~/.auto-clock
96
93
  ```