@knpkv/jira-clockify 0.2.0 → 0.5.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/README.md +4 -1
- package/dist/package.json +12 -13
- package/dist/src/bin.js +30 -13
- package/dist/src/bin.js.map +1 -1
- package/dist/src/cli/auth.js +23 -19
- package/dist/src/cli/auth.js.map +1 -1
- package/dist/src/cli/config.js +4 -4
- package/dist/src/cli/config.js.map +1 -1
- package/dist/src/cli/fetchTicket.js +30 -0
- package/dist/src/cli/fetchTicket.js.map +1 -0
- package/dist/src/cli/fuzzySelect.js +6 -5
- package/dist/src/cli/fuzzySelect.js.map +1 -1
- package/dist/src/cli/layers.js +10 -8
- package/dist/src/cli/layers.js.map +1 -1
- package/dist/src/cli/list.js +1 -1
- package/dist/src/cli/list.js.map +1 -1
- package/dist/src/cli/setup.js +19 -19
- package/dist/src/cli/setup.js.map +1 -1
- package/dist/src/cli/timer/discard.js +2 -2
- package/dist/src/cli/timer/discard.js.map +1 -1
- package/dist/src/cli/timer/edit.js +11 -11
- package/dist/src/cli/timer/edit.js.map +1 -1
- package/dist/src/cli/timer/log.js +56 -79
- package/dist/src/cli/timer/log.js.map +1 -1
- package/dist/src/cli/timer/start.js +56 -40
- package/dist/src/cli/timer/start.js.map +1 -1
- package/dist/src/cli/timer/status.js +7 -7
- package/dist/src/cli/timer/status.js.map +1 -1
- package/dist/src/cli/timer/stop.js +183 -59
- package/dist/src/cli/timer/stop.js.map +1 -1
- package/dist/src/main.js +15 -3
- package/dist/src/main.js.map +1 -1
- package/dist/src/services/ClockifyAuth.js +12 -23
- package/dist/src/services/ClockifyAuth.js.map +1 -1
- package/dist/src/services/ConfigService.js +7 -7
- package/dist/src/services/ConfigService.js.map +1 -1
- package/dist/src/services/HomeDirectory.js +14 -0
- package/dist/src/services/HomeDirectory.js.map +1 -0
- package/dist/src/services/StateWriter.js +8 -8
- package/dist/src/services/StateWriter.js.map +1 -1
- package/dist/src/services/TicketService.js +22 -15
- package/dist/src/services/TicketService.js.map +1 -1
- package/dist/src/services/TimerService.js +126 -60
- package/dist/src/services/TimerService.js.map +1 -1
- package/dist/src/tui/App.js +72 -8
- package/dist/src/tui/App.js.map +1 -1
- package/dist/src/tui/atoms/runtime.js +1 -1
- package/dist/src/tui/atoms/runtime.js.map +1 -1
- package/dist/src/tui/atoms/tickets.js +1 -1
- package/dist/src/tui/atoms/tickets.js.map +1 -1
- package/dist/src/tui/atoms/timer.js +7 -2
- package/dist/src/tui/atoms/timer.js.map +1 -1
- package/dist/src/tui/atoms/ui.js +1 -1
- package/dist/src/tui/atoms/ui.js.map +1 -1
- package/dist/src/tui/components/BigTimer.js +2 -2
- package/dist/src/tui/components/BigTimer.js.map +1 -1
- package/dist/src/tui/components/Footer.js +1 -1
- package/dist/src/tui/components/Footer.js.map +1 -1
- package/dist/src/tui/components/Header.js +3 -2
- package/dist/src/tui/components/Header.js.map +1 -1
- package/dist/src/tui/components/PopupMessage.js +7 -2
- package/dist/src/tui/components/PopupMessage.js.map +1 -1
- package/dist/src/tui/components/TicketList.js +3 -2
- package/dist/src/tui/components/TicketList.js.map +1 -1
- package/dist/src/tui/context/theme.js.map +1 -1
- package/dist/src/tui/hooks/useElapsedTimer.js +3 -2
- package/dist/src/tui/hooks/useElapsedTimer.js.map +1 -1
- package/dist/src/tui/hooks/useTerminalSize.js +1 -21
- package/dist/src/tui/hooks/useTerminalSize.js.map +1 -1
- package/dist/src/utils/time.js +55 -5
- package/dist/src/utils/time.js.map +1 -1
- package/dist/test/TimerService.test.js +224 -31
- package/dist/test/TimerService.test.js.map +1 -1
- package/dist/test/fetchTicket.test.js +89 -0
- package/dist/test/fetchTicket.test.js.map +1 -0
- package/dist/test/stopPrompts.test.js +93 -0
- package/dist/test/stopPrompts.test.js.map +1 -0
- package/dist/test/time.test.js +84 -0
- package/dist/test/time.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -17
- package/skills/jcf/SKILL.md +89 -0
- package/skills/jcf/agents/openai.yaml +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knpkv/jira-clockify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "TUI for Jira-Clockify time tracking, attachable to neovim",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "knpkv",
|
|
@@ -13,29 +13,28 @@
|
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|
|
16
|
-
"nvim"
|
|
16
|
+
"nvim",
|
|
17
|
+
"skills"
|
|
17
18
|
],
|
|
18
19
|
"dependencies": {
|
|
19
|
-
"@effect
|
|
20
|
-
"@effect
|
|
21
|
-
"@effect/cli": "latest",
|
|
22
|
-
"@effect/platform": "latest",
|
|
23
|
-
"@effect/platform-node": "latest",
|
|
20
|
+
"@effect/atom-react": "4.0.0-beta.87",
|
|
21
|
+
"@effect/platform-node": "4.0.0-beta.87",
|
|
24
22
|
"@opentui/core": "https://pkg.pr.new/anomalyco/opentui/@opentui/core@367a94087821b3b5feedd35bbb57df43b10a286e",
|
|
25
23
|
"@opentui/react": "https://pkg.pr.new/anomalyco/opentui/@opentui/react@367a94087821b3b5feedd35bbb57df43b10a286e",
|
|
26
|
-
"effect": "
|
|
27
|
-
"react": "^19.
|
|
28
|
-
"@knpkv/
|
|
29
|
-
"@knpkv/
|
|
30
|
-
"@knpkv/jira-api-client": "^0.
|
|
31
|
-
"@knpkv/jira-cli": "^0.
|
|
24
|
+
"effect": "4.0.0-beta.87",
|
|
25
|
+
"react": "^19.2.7",
|
|
26
|
+
"@knpkv/agent-skills": "^0.2.0",
|
|
27
|
+
"@knpkv/atlassian-common": "^0.3.0",
|
|
28
|
+
"@knpkv/jira-api-client": "^0.3.0",
|
|
29
|
+
"@knpkv/jira-cli": "^0.3.0",
|
|
30
|
+
"@knpkv/clockify-api-client": "^0.3.0"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
|
-
"@effect/vitest": "
|
|
33
|
+
"@effect/vitest": "4.0.0-beta.87",
|
|
35
34
|
"@types/node": "latest",
|
|
36
|
-
"@types/react": "^19.
|
|
37
|
-
"tsx": "^4.
|
|
38
|
-
"vitest": "
|
|
35
|
+
"@types/react": "^19.2.17",
|
|
36
|
+
"tsx": "^4.22.4",
|
|
37
|
+
"vitest": "^4.1.9"
|
|
39
38
|
},
|
|
40
39
|
"scripts": {
|
|
41
40
|
"start": "tsx src/bin.ts",
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jcf
|
|
3
|
+
description: Use the @knpkv/jira-clockify CLI to track work across Jira and Clockify. Trigger when the user asks an agent to start, stop, discard, edit, inspect, or manually log time for Jira tickets; configure Jira OAuth or Clockify API access; list current Jira tickets; set default Clockify project, billable flag, or JQL; or launch the jcf TUI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Jcf
|
|
7
|
+
|
|
8
|
+
Use the `jcf` binary to manage Jira-backed Clockify timers.
|
|
9
|
+
|
|
10
|
+
## Preconditions
|
|
11
|
+
|
|
12
|
+
- Configure both services before timer operations: Jira OAuth and Clockify API key.
|
|
13
|
+
- Use `jcf auth status` to check readiness.
|
|
14
|
+
- Timer operations write to Clockify and may write Jira worklogs; confirm ambiguous ticket keys, durations, dates, and comments before running them.
|
|
15
|
+
- Use `jcf list --json` when an agent needs structured ticket data.
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
jcf auth status
|
|
21
|
+
jcf auth jira create
|
|
22
|
+
jcf auth jira configure
|
|
23
|
+
jcf auth jira login
|
|
24
|
+
jcf auth clockify setup
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Configure defaults:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
jcf config show
|
|
31
|
+
jcf config set project
|
|
32
|
+
jcf config set billable
|
|
33
|
+
jcf config set jql 'assignee = currentUser() AND status != Done ORDER BY updated DESC'
|
|
34
|
+
jcf config reset
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Timer Commands
|
|
38
|
+
|
|
39
|
+
Launch the TUI:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
jcf
|
|
43
|
+
jcf tui
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
List available Jira tickets:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
jcf list
|
|
50
|
+
jcf list --json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Start work:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
jcf start PROJ-123
|
|
57
|
+
jcf start PROJ-123 --ago 15m
|
|
58
|
+
jcf start PROJ-123 --since 09:30
|
|
59
|
+
jcf start PROJ-123 --project <clockify-project-id> --billable
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Stop or discard current work:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
jcf status
|
|
66
|
+
jcf stop
|
|
67
|
+
jcf stop --project <clockify-project-id> --billable
|
|
68
|
+
jcf discard
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Log completed work manually:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
jcf log PROJ-123 --time 1h30m
|
|
75
|
+
jcf log PROJ-123 --time 45m --date 2026-06-24 --at 09:00 --comment "Pairing on release notes"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Edit the running timer:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
jcf edit
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Agent Workflow
|
|
85
|
+
|
|
86
|
+
1. Run `jcf auth status` and `jcf status` before changing timer state.
|
|
87
|
+
2. Use `jcf list --json` to resolve issue keys when the user gives a vague ticket description.
|
|
88
|
+
3. Prefer explicit flags for non-interactive work: issue key, duration, date, time, project id, billable flag, and comment.
|
|
89
|
+
4. If no timer is running, `jcf stop` may offer an interactive correction interval; use `jcf log` for deterministic manual logging.
|