@liebig-technology/clockodo-cli 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.
- package/LICENSE +21 -0
- package/README.md +107 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1535 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 LIEBIG Technology GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# clockodo-cli
|
|
2
|
+
|
|
3
|
+
CLI for the [Clockodo](https://www.clockodo.com) time tracking API. Human-friendly tables and colors, machine-friendly JSON output for AI agents and scripts.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Usage: clockodo [options] [command]
|
|
7
|
+
|
|
8
|
+
Options:
|
|
9
|
+
-j, --json Output as JSON
|
|
10
|
+
-p, --plain Output as plain text (no colors)
|
|
11
|
+
--no-color Disable colors
|
|
12
|
+
--no-input Disable interactive prompts
|
|
13
|
+
-v, --verbose Verbose output
|
|
14
|
+
|
|
15
|
+
Commands:
|
|
16
|
+
config Manage CLI configuration
|
|
17
|
+
status Show running clock and today's summary
|
|
18
|
+
start Start time tracking
|
|
19
|
+
stop Stop time tracking
|
|
20
|
+
entries Manage time entries
|
|
21
|
+
customers Manage customers
|
|
22
|
+
projects Manage projects
|
|
23
|
+
services Manage services
|
|
24
|
+
users User management
|
|
25
|
+
report Aggregated time reports
|
|
26
|
+
absences Manage absences
|
|
27
|
+
worktimes Show work time intervals
|
|
28
|
+
userreport Show user report (overtime, holidays, absences)
|
|
29
|
+
userreports Show user reports for all users
|
|
30
|
+
schema Output machine-readable CLI structure (for AI agents)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Every command supports `--help` for full usage details.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install -g @liebig-technology/clockodo-cli
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Requires Node.js >= 22.
|
|
42
|
+
|
|
43
|
+
## Setup
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
clockodo config set # configure API credentials interactively
|
|
47
|
+
clockodo status # verify it works
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Credentials are stored in `~/.config/clockodo-cli/config.json`. Environment variables `CLOCKODO_EMAIL` and `CLOCKODO_API_KEY` take precedence.
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Time tracking
|
|
56
|
+
clockodo start --customer 123 --service 456 --text "Working on feature"
|
|
57
|
+
clockodo stop
|
|
58
|
+
clockodo status
|
|
59
|
+
|
|
60
|
+
# Entries
|
|
61
|
+
clockodo entries # list today's entries
|
|
62
|
+
clockodo entries --since 2026-01-01 --until 2026-01-31 # date range
|
|
63
|
+
clockodo entries create --from "09:00" --to "12:30" --customer 123 --service 456
|
|
64
|
+
|
|
65
|
+
# Reports
|
|
66
|
+
clockodo report # today
|
|
67
|
+
clockodo report week # this week
|
|
68
|
+
clockodo report month # this month
|
|
69
|
+
|
|
70
|
+
# Absences, work times, user reports
|
|
71
|
+
clockodo absences list --year 2026
|
|
72
|
+
clockodo worktimes --since 2026-02-17 --until 2026-02-21
|
|
73
|
+
clockodo userreport --year 2026
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
When `--customer` or `--service` is not provided, `start` and `entries create` launch an interactive picker (disable with `--no-input`). You can also set defaults via `clockodo config set`.
|
|
77
|
+
|
|
78
|
+
## AI Agent Integration
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# JSON output for structured parsing
|
|
82
|
+
clockodo status --json
|
|
83
|
+
clockodo entries --json | jq '.data[].text'
|
|
84
|
+
|
|
85
|
+
# Auto-JSON when piped (disable with CLOCKODO_AUTO_JSON=0)
|
|
86
|
+
result=$(clockodo status)
|
|
87
|
+
|
|
88
|
+
# Discover all commands and options programmatically
|
|
89
|
+
clockodo schema | jq '.cli.subcommands[].name'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Every error maps to a specific exit code (0=success, 2=invalid args, 4=auth failure, etc.) so agents can branch on the code rather than parsing messages.
|
|
93
|
+
|
|
94
|
+
## Development
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pnpm install
|
|
98
|
+
pnpm dev -- status # run without building
|
|
99
|
+
pnpm build # compile to dist/
|
|
100
|
+
pnpm test # vitest
|
|
101
|
+
pnpm typecheck # tsc --noEmit
|
|
102
|
+
pnpm lint # biome
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
MIT
|
package/dist/index.d.ts
ADDED