@estruyf/worklog-cli 0.0.0-stage → 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.
Files changed (3) hide show
  1. package/README.md +36 -2
  2. package/dist/worklog.js +2058 -0
  3. package/package.json +27 -4
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # @estruyf/worklog-cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Log work on a task in your [Worklog](https://github.com/estruyf/worklog-web) timesheet repo with one
4
+ command — made for AI agents that finish a piece of work and should leave a trace of it on your
5
+ timesheet. The next time you open Worklog, the task is there, marked as worked.
6
+
7
+ ```bash
8
+ npx @estruyf/worklog-cli log --client acme --title "Fix the mobile picker" \
9
+ --link https://github.com/acme/app/issues/12 --note "Widened the tap targets"
10
+ ```
11
+
12
+ It edits a **local clone of your timesheet repo** and pushes with your own git credentials. It never
13
+ talks to the Worklog site, so there is no token to set up.
14
+
15
+ ## Options
16
+
17
+ | Option | Meaning |
18
+ | --- | --- |
19
+ | `--client` | Client id from `.worklog/config.json`. Required. |
20
+ | `--title` | Title for a new task, or of an open task to log on. Required. |
21
+ | `--link` | Issue or ticket url. The task is found again by it on later runs, archived tasks included. |
22
+ | `--id` | Log on this exact task id instead. |
23
+ | `--note` | Progress note added under the task's `### Notes`. |
24
+ | `--date` | The day worked, `YYYY-MM-DD`. Defaults to today. |
25
+ | `--repo` | Path to the clone. Defaults to `$WORKLOG_REPO`. |
26
+ | `--dry-run` | Print the diff, commit nothing. |
27
+
28
+ The task is matched by `--id`, then `--link`, then an **open task of the same title** for that
29
+ client — so a task you typed into the app yourself is picked up rather than duplicated. With no match
30
+ it is created. Running the same command twice changes nothing.
31
+
32
+ ## Requirements
33
+
34
+ - Node 20 or newer, and git.
35
+ - A clone of your timesheet repo with no uncommitted changes and no unpushed commits — when its push
36
+ loses a race with the app, the CLI resets the clone to the remote and replays its edit on top.
37
+ - Hours are not logged: it records *that* you worked on a task, not for how long.