log
Manage workspace time logs from the command line.
Manage workspace time logs from the command line.
hw log lets you create, list, edit, and delete work log entries in your active workspace. Logs record time worked, optionally against a project, with a start and end time.
Times accept the formats YYYY-MM-DD HH:MM or HH:MM.
Subcommands
hw log create
Create a log.
bash
hw log create <span class="token punctuation">[</span>flags<span class="token punctuation">]</span>
Flags:
text
-d, --description string description of the log
-e, --end-time string end time (YYYY-MM-DD HH:MM or HH:MM)
-p, --project string project ID for the log
-s, --start-time string start time (YYYY-MM-DD HH:MM or HH:MM)
hw log list
List active workspace logs.
bash
hw log list <span class="token punctuation">[</span>flags<span class="token punctuation">]</span>
Flags:
text
-L, --limit int32 limit, number of results per page
-p, --page int32 page, the page of results
hw log edit
Edit a log entry.
bash
hw log edit <span class="token punctuation">[</span>flags<span class="token punctuation">]</span>
Flags:
text
-d, --description string new description for the log
-e, --end-time string end time (YYYY-MM-DD HH:MM or HH:MM)
-l, --log-id string ID of the log to edit
-p, --project string project ID for the log
-s, --start-time string start time (YYYY-MM-DD HH:MM or HH:MM)
hw log delete
Delete logs.
bash
hw log delete <span class="token punctuation">[</span>flags<span class="token punctuation">]</span>
Flags:
text
--ids stringArray Bulk ids to delete separated by comma
Inherited flags
text
--help Show help for command
Examples
bash
<span class="token comment"># Create a simple log</span>
hw log create <span class="token parameter variable">--description</span> <span class="token string">"Worked on feature X"</span>
<span class="token comment"># Create a log with explicit start and end times</span>
hw log create <span class="token parameter variable">-d</span> <span class="token string">"Bug fix"</span> --start-time <span class="token string">"2024-01-15 09:00"</span> --end-time <span class="token string">"2024-01-15 17:00"</span>
<span class="token comment"># Create a log against a project using shorthand flags</span>
hw log create <span class="token parameter variable">-d</span> <span class="token string">"Meeting"</span> <span class="token parameter variable">-p</span> <span class="token string">"project-id"</span> <span class="token parameter variable">-s</span> <span class="token string">"14:00"</span> <span class="token parameter variable">-e</span> <span class="token string">"15:00"</span>
<span class="token comment"># List logs</span>
hw log list
<span class="token comment"># Update a log's description</span>
hw log edit --log-id <span class="token string">"log-id"</span> <span class="token parameter variable">--description</span> <span class="token string">"Updated description"</span>
<span class="token comment"># Delete one or more logs by id</span>
hw log delete <span class="token parameter variable">--ids</span> <span class="token string">"log-id-1,log-id-2"</span>