hzl-cli 1.5.1 → 1.6.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 +233 -132
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,164 +1,246 @@
|
|
|
1
|
-
# HZL
|
|
1
|
+
# HZL (Hazel)
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**A shared task ledger for OpenClaw and poly-agent workflows.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
OpenClaw is great at doing work: running tools, coordinating sub-agents, and maintaining memory.
|
|
6
|
+
What it (and most agent tools) do not give you is a durable, shared backlog that survives:
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
- session boundaries
|
|
9
|
+
- crashes/reboots
|
|
10
|
+
- switching between different agent runtimes (Claude Code, Codex, Gemini, etc.)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
HZL fills that gap: a lightweight, local-first task tracker that any agent can read/write.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Using OpenClaw? Start here: [OpenClaw integration](#openclaw-integration)
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Not using OpenClaw? Jump to: [Using HZL with Claude Code, Codex, Gemini CLI, or any coding agent](#using-hzl-with-claude-code-codex-gemini-cli-or-any-coding-agent)
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
HZL provides:
|
|
16
19
|
|
|
17
|
-
-
|
|
20
|
+
- Projects and tasks
|
|
21
|
+
- Dependencies (`B` waits for `A`)
|
|
22
|
+
- Checkpoints (progress snapshots you can resume from)
|
|
23
|
+
- Leases (time-limited claims for multi-agent coordination)
|
|
24
|
+
- Event history (audit trail)
|
|
25
|
+
- A CLI + JSON output that agents can script against
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
Data is stored in SQLite. Default location: `$XDG_DATA_HOME/hzl/data.db` (fallback `~/.local/share/hzl/data.db`); Windows: `%LOCALAPPDATA%\\hzl\\data.db`.
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
2. **Events are truth.** Every change is an append-only event. Current state is a projection. Full audit trails, reconstructable history.
|
|
29
|
+
---
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
## Why another task tracker?
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
Because most task trackers are built for humans.
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
HZL is built for agents:
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
- It is backend-first, not UI-first. Think "task database with a CLI," not "another Trello."
|
|
38
|
+
- It is model-agnostic. Your tasks live outside any one vendor's memory or chat history.
|
|
39
|
+
- It is multi-agent safe. Leases prevent orphaned work and enable clean handoffs.
|
|
40
|
+
- It is resumable. Checkpoints let an agent crash, reboot, or swap models and keep going.
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
If you already have a favorite human todo app, keep it.
|
|
43
|
+
If you need a shared task state that multiple agents can read/write, that is HZL.
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
---
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
## Where HZL fits
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
### 1) OpenClaw orchestrator + sub-agents
|
|
40
50
|
|
|
41
|
-
|
|
51
|
+
```mermaid
|
|
52
|
+
flowchart LR
|
|
53
|
+
You[You] --> OC["OpenClaw (orchestrator)"]
|
|
54
|
+
OC --> Tools["OpenClaw tools<br/>(browser, exec, email, etc.)"]
|
|
55
|
+
OC <--> HZL[(HZL task ledger)]
|
|
56
|
+
OC --> S1[Claude Code]
|
|
57
|
+
OC --> S2[Codex / other]
|
|
58
|
+
S1 <--> HZL
|
|
59
|
+
S2 <--> HZL
|
|
60
|
+
```
|
|
42
61
|
|
|
43
|
-
|
|
62
|
+
OpenClaw coordinates the work. HZL is the shared, durable task board that OpenClaw and its sub-agents can use across sessions.
|
|
44
63
|
|
|
45
|
-
|
|
64
|
+
### 2) Any poly-agent system (no OpenClaw required)
|
|
46
65
|
|
|
47
|
-
```
|
|
48
|
-
|
|
66
|
+
```mermaid
|
|
67
|
+
flowchart LR
|
|
68
|
+
U[You] --> O["Orchestrator (human or agent)"]
|
|
69
|
+
O <--> HZL[(HZL)]
|
|
70
|
+
O --> C[Claude Code]
|
|
71
|
+
O --> X[Codex]
|
|
72
|
+
O --> G[Gemini]
|
|
73
|
+
C <--> HZL
|
|
74
|
+
X <--> HZL
|
|
75
|
+
G <--> HZL
|
|
49
76
|
```
|
|
50
77
|
|
|
51
|
-
|
|
78
|
+
Same idea: once you are switching tools/models, you need a shared ledger.
|
|
52
79
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
80
|
+
### 3) One agent, many sessions
|
|
81
|
+
|
|
82
|
+
```mermaid
|
|
83
|
+
flowchart LR
|
|
84
|
+
U[You] --> A[Coding agent]
|
|
85
|
+
A <--> HZL
|
|
86
|
+
A --> R[Repo / files]
|
|
59
87
|
```
|
|
60
88
|
|
|
61
|
-
|
|
89
|
+
Use HZL to persist "what's next" and "what changed" between sessions.
|
|
62
90
|
|
|
63
|
-
|
|
64
|
-
# Initialize the database
|
|
65
|
-
hzl init
|
|
91
|
+
### 4) HZL as the backend for your own UI
|
|
66
92
|
|
|
67
|
-
|
|
68
|
-
|
|
93
|
+
```mermaid
|
|
94
|
+
flowchart LR
|
|
95
|
+
UI[Your lightweight web app] --> HZL
|
|
96
|
+
Agents[Agents + scripts] --> HZL
|
|
97
|
+
```
|
|
69
98
|
|
|
70
|
-
|
|
71
|
-
hzl task add "Set up authentication" -P myapp --priority 2 --tags backend,auth
|
|
72
|
-
hzl task add "Write API tests" -P myapp --depends-on <task-id>
|
|
99
|
+
If you want a human-friendly interface, build one. HZL stays the durable backend that both humans and agents can use.
|
|
73
100
|
|
|
74
|
-
|
|
75
|
-
hzl task list --project myapp --available
|
|
101
|
+
---
|
|
76
102
|
|
|
77
|
-
|
|
78
|
-
hzl task next --project myapp
|
|
79
|
-
hzl task claim <task-id> --author agent-1
|
|
80
|
-
hzl task checkpoint <task-id> "Completed OAuth flow"
|
|
81
|
-
hzl task complete <task-id>
|
|
82
|
-
```
|
|
103
|
+
## Quickstart
|
|
83
104
|
|
|
84
|
-
|
|
105
|
+
### Install
|
|
85
106
|
|
|
86
|
-
|
|
107
|
+
Requires Node.js 22.14+.
|
|
87
108
|
|
|
88
109
|
```bash
|
|
89
|
-
|
|
90
|
-
hzl
|
|
91
|
-
hzl task next [--project] # Show next claimable task
|
|
92
|
-
hzl task claim <id> # Claim a task
|
|
93
|
-
hzl task complete <id> # Mark done
|
|
110
|
+
npm install -g hzl-cli
|
|
111
|
+
hzl init
|
|
94
112
|
```
|
|
95
113
|
|
|
96
|
-
###
|
|
114
|
+
### Create a project and tasks
|
|
97
115
|
|
|
98
116
|
```bash
|
|
99
|
-
|
|
100
|
-
hzl task list --project myapp --available --json
|
|
101
|
-
hzl task claim <id> --author agent-1 --json
|
|
117
|
+
hzl project create portland-trip
|
|
102
118
|
|
|
103
|
-
|
|
104
|
-
hzl task
|
|
105
|
-
hzl task
|
|
119
|
+
hzl task add "Check calendars for March weekends" -P portland-trip --priority 5
|
|
120
|
+
hzl task add "Research neighborhoods + activities" -P portland-trip --priority 4
|
|
121
|
+
hzl task add "Shortlist 2-3 weekend options" -P portland-trip --priority 3 \
|
|
122
|
+
--depends-on <calendar-task-id> --depends-on <research-task-id>
|
|
106
123
|
```
|
|
107
124
|
|
|
108
|
-
###
|
|
125
|
+
### Work with checkpoints
|
|
109
126
|
|
|
110
127
|
```bash
|
|
111
|
-
hzl task claim <id> --
|
|
112
|
-
hzl task
|
|
113
|
-
hzl task
|
|
128
|
+
hzl task claim <calendar-task-id> --author trevin-agent
|
|
129
|
+
hzl task checkpoint <calendar-task-id> "Found 3 options: Mar 7-9, 14-16, 21-23"
|
|
130
|
+
hzl task complete <calendar-task-id>
|
|
114
131
|
```
|
|
115
132
|
|
|
116
|
-
###
|
|
133
|
+
### Use JSON output when scripting
|
|
117
134
|
|
|
118
135
|
```bash
|
|
119
|
-
hzl
|
|
120
|
-
hzl task
|
|
121
|
-
hzl task comment <id> "guidance..." # Add steering comments
|
|
136
|
+
hzl task show <id> --json
|
|
137
|
+
hzl task next --project portland-trip --json
|
|
122
138
|
```
|
|
123
139
|
|
|
124
|
-
|
|
140
|
+
---
|
|
125
141
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
142
|
+
## Core concepts (the stuff that matters)
|
|
143
|
+
|
|
144
|
+
### Tasks are units of work, not reminders
|
|
145
|
+
|
|
146
|
+
HZL is optimized for "do work, report progress, unblock the next step."
|
|
147
|
+
|
|
148
|
+
If you need time-based reminders, pair HZL with a scheduler (cron, OpenClaw cron, etc.).
|
|
149
|
+
|
|
150
|
+
### Checkpoints are progress snapshots
|
|
151
|
+
|
|
152
|
+
A checkpoint is a compact, durable record of what happened:
|
|
153
|
+
|
|
154
|
+
- what you tried
|
|
155
|
+
- what you found
|
|
156
|
+
- what's still missing
|
|
157
|
+
- links, commands, or file paths needed to resume
|
|
158
|
+
|
|
159
|
+
### Dependencies encode ordering
|
|
160
|
+
|
|
161
|
+
Dependencies are how an agent avoids premature work:
|
|
162
|
+
|
|
163
|
+
- "Don't search flights before you know dates."
|
|
164
|
+
- "Don't open a PR before tests pass."
|
|
165
|
+
|
|
166
|
+
### Leases make multi-agent handoffs reliable
|
|
167
|
+
|
|
168
|
+
Leases are time-limited claims:
|
|
169
|
+
|
|
170
|
+
- A worker agent claims a task with `--lease 30`
|
|
171
|
+
- If it disappears, the lease expires
|
|
172
|
+
- Another agent can detect stuck work and take over
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Patterns
|
|
177
|
+
|
|
178
|
+
### Pattern: Poly-agent backlog (recommended)
|
|
131
179
|
|
|
132
|
-
|
|
180
|
+
Conventions that help:
|
|
133
181
|
|
|
134
|
-
|
|
182
|
+
- Use consistent author IDs: `openclaw`, `claude-code`, `codex`, `gemini`, etc.
|
|
183
|
+
- Claim tasks before work.
|
|
184
|
+
- Checkpoint whenever you learn something that would be painful to rediscover.
|
|
135
185
|
|
|
136
|
-
|
|
186
|
+
Example handoff:
|
|
137
187
|
|
|
138
188
|
```bash
|
|
139
|
-
|
|
189
|
+
# Orchestrator creates task
|
|
190
|
+
hzl task add "Implement REST API endpoints" -P myapp --priority 2
|
|
191
|
+
TASK_ID=<id>
|
|
192
|
+
|
|
193
|
+
# Worker agent claims with a lease
|
|
194
|
+
hzl task claim "$TASK_ID" --author claude-code --lease 30
|
|
195
|
+
hzl task checkpoint "$TASK_ID" "Endpoints scaffolded; next: auth middleware"
|
|
196
|
+
hzl task complete "$TASK_ID"
|
|
140
197
|
```
|
|
141
198
|
|
|
142
|
-
|
|
199
|
+
### Pattern: Personal todo list (it works, but bring your own UI)
|
|
200
|
+
|
|
201
|
+
HZL can track personal tasks and has the advantage of centralizing agent and personal tasks.
|
|
202
|
+
This enables scenarios like OpenClaw assigning you tasks without needing to sync with other todo systems.
|
|
203
|
+
|
|
204
|
+
HZL itself is not trying to be a polished, human-first todo app. You bring other pieces for that.
|
|
143
205
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
206
|
+
If you want a todo app, build or use a UI:
|
|
207
|
+
|
|
208
|
+
- a tiny web app
|
|
209
|
+
- a TUI wrapper
|
|
210
|
+
- a menu bar widget
|
|
211
|
+
|
|
212
|
+
HZL stays the storage layer and concurrency-safe ledger underneath.
|
|
213
|
+
|
|
214
|
+
---
|
|
149
215
|
|
|
150
|
-
##
|
|
216
|
+
## Using HZL with Claude Code, Codex, Gemini CLI, or any coding agent
|
|
151
217
|
|
|
152
|
-
|
|
153
|
-
|----------|-------------|
|
|
154
|
-
| `HZL_DB` | Override database location |
|
|
155
|
-
| `HZL_CONFIG` | Override config file location (default: `~/.hzl/config.json`) |
|
|
156
|
-
| `HZL_AUTHOR` | Default author for claims/comments |
|
|
157
|
-
| `HZL_AGENT_ID` | Default agent identifier |
|
|
218
|
+
If your coding agent supports an instruction file (for example `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, etc.), add a short policy so the agent reaches for HZL consistently.
|
|
158
219
|
|
|
159
|
-
|
|
220
|
+
### Drop-in policy snippet
|
|
160
221
|
|
|
161
|
-
|
|
222
|
+
```md
|
|
223
|
+
### HZL task ledger (use for multi-step work)
|
|
224
|
+
|
|
225
|
+
When a request has multiple steps, spans multiple sessions, or involves coordination with other agents/tools:
|
|
226
|
+
1) Create or use an HZL project for the work.
|
|
227
|
+
2) Break work into tasks with dependencies.
|
|
228
|
+
3) Claim tasks before work and checkpoint after meaningful progress.
|
|
229
|
+
4) Use `--json` when producing output another tool will parse.
|
|
230
|
+
|
|
231
|
+
Key commands:
|
|
232
|
+
- `hzl project create <name>`
|
|
233
|
+
- `hzl task add "<title>" -P <project> [--depends-on <id>]`
|
|
234
|
+
- `hzl task claim <id> --author <agent-id> [--lease 30]`
|
|
235
|
+
- `hzl task checkpoint <id> "<progress + next step>"`
|
|
236
|
+
- `hzl task complete <id>`
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
That snippet is intentionally short. The goal is consistency, not ceremony.
|
|
240
|
+
|
|
241
|
+
### Claude Code marketplace (optional)
|
|
242
|
+
|
|
243
|
+
HZL includes a Claude Code plugin marketplace with skills that help agents work effectively with HZL.
|
|
162
244
|
|
|
163
245
|
```bash
|
|
164
246
|
# Add the marketplace
|
|
@@ -170,63 +252,82 @@ HZL includes a [Claude Code](https://claude.ai/code) plugin marketplace with ski
|
|
|
170
252
|
|
|
171
253
|
See [`packages/hzl-marketplace`](./packages/hzl-marketplace) for details.
|
|
172
254
|
|
|
173
|
-
##
|
|
255
|
+
## OpenClaw integration
|
|
174
256
|
|
|
175
|
-
|
|
176
|
-
|
|
257
|
+
OpenClaw is a self-hosted AI assistant that can coordinate tools and sub-agents.
|
|
258
|
+
HZL fits well as the task ledger that OpenClaw (and its sub-agents) can share.
|
|
177
259
|
|
|
178
|
-
|
|
260
|
+
### Quick start (recommended)
|
|
179
261
|
|
|
180
|
-
|
|
262
|
+
Copy/paste this into an OpenClaw chat (single prompt):
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
Install HZL from https://github.com/tmchow/hzl and run hzl init. Install the HZL skill from https://www.clawhub.ai/tmchow/hzl. Then append the HZL policy from https://raw.githubusercontent.com/tmchow/hzl/main/docs/openclaw/tools-prompt.md to my TOOLS.md.
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Manual setup
|
|
269
|
+
|
|
270
|
+
1) Install HZL on the machine running OpenClaw:
|
|
181
271
|
|
|
182
272
|
```bash
|
|
183
|
-
npm install
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
273
|
+
npm install -g hzl-cli
|
|
274
|
+
hzl init
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
2) Install the HZL skill from https://www.clawhub.ai/tmchow/hzl
|
|
278
|
+
Skill source (for reference only): **[`docs/openclaw/skill-hzl.md`](./docs/openclaw/skill-hzl.md)**
|
|
279
|
+
|
|
280
|
+
3) Teach OpenClaw when to use HZL (important):
|
|
281
|
+
- Copy/paste from: **[`docs/openclaw/tools-prompt.md`](./docs/openclaw/tools-prompt.md)**
|
|
282
|
+
- Or tell OpenClaw to add this policy to `TOOLS.md`:
|
|
187
283
|
|
|
188
|
-
|
|
189
|
-
|
|
284
|
+
```
|
|
285
|
+
HZL is a tool available to you for task management in certain cases. I want you to add this information to your TOOLS.md in the right way so you remember how to use it:
|
|
286
|
+
https://raw.githubusercontent.com/tmchow/hzl/main/docs/openclaw/tools-prompt.md
|
|
190
287
|
```
|
|
191
288
|
|
|
192
289
|
---
|
|
193
290
|
|
|
194
|
-
##
|
|
291
|
+
## When to use HZL (and when not to)
|
|
292
|
+
|
|
293
|
+
### Use HZL when:
|
|
195
294
|
|
|
196
|
-
|
|
295
|
+
- work has multiple steps and you want explicit sequencing
|
|
296
|
+
- work spans multiple sessions (resume tomorrow with confidence)
|
|
297
|
+
- you are coordinating multiple agents or model providers
|
|
298
|
+
- you need durable status reporting (done / in progress / blocked / next)
|
|
299
|
+
- you want a task ledger your own UI can sit on top of
|
|
197
300
|
|
|
198
|
-
|
|
199
|
-
## Task Management
|
|
301
|
+
### Consider something else when:
|
|
200
302
|
|
|
201
|
-
|
|
303
|
+
- you need time-based reminders or notifications (use a scheduler + a notifier)
|
|
304
|
+
- you need rich human workflow features (due dates, recurring tasks, calendar views)
|
|
305
|
+
- you are tracking an org-wide backlog (GitHub/Jira/etc. may be a better fit)
|
|
306
|
+
|
|
307
|
+
---
|
|
202
308
|
|
|
203
|
-
|
|
309
|
+
## CLI reference (short)
|
|
204
310
|
|
|
205
|
-
|
|
311
|
+
```bash
|
|
312
|
+
hzl init
|
|
206
313
|
|
|
207
|
-
|
|
208
|
-
|
|
314
|
+
hzl project create <name>
|
|
315
|
+
hzl project list
|
|
209
316
|
|
|
210
|
-
|
|
317
|
+
hzl task add "<title>" -P <project>
|
|
318
|
+
hzl task list --project <project>
|
|
319
|
+
hzl task next --project <project>
|
|
211
320
|
|
|
212
|
-
|
|
321
|
+
hzl task claim <id> --author <name> [--lease <minutes>]
|
|
322
|
+
hzl task checkpoint <id> "<message>"
|
|
323
|
+
hzl task complete <id>
|
|
213
324
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
hzl project list # List all projects
|
|
217
|
-
hzl project rename <old> <new> # Rename a project
|
|
325
|
+
hzl task stuck
|
|
326
|
+
hzl task steal <id> --if-expired
|
|
218
327
|
|
|
219
|
-
|
|
220
|
-
hzl task add "Task title" -P <project> # Create task
|
|
221
|
-
hzl task next --project <project> --json # Show next available
|
|
222
|
-
hzl task show <task-id> --json # Task details + history
|
|
223
|
-
hzl task checkpoint <task-id> "<name>" # Save progress
|
|
224
|
-
hzl task complete <task-id> # Mark done
|
|
328
|
+
hzl task show <id> --json
|
|
225
329
|
```
|
|
226
330
|
|
|
227
|
-
Use `--json` for structured output. HZL handles atomic claiming.
|
|
228
|
-
````
|
|
229
|
-
|
|
230
331
|
---
|
|
231
332
|
|
|
232
333
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hzl-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "CLI for HZL - Lightweight task tracking for AI agents and swarms",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"better-sqlite3": "^11.8.1",
|
|
40
40
|
"commander": "^12.0.0",
|
|
41
|
-
"hzl-core": "^1.
|
|
41
|
+
"hzl-core": "^1.6.0",
|
|
42
42
|
"zod": "^3.22.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|