clockify-cli split

clockify-cli split

Splits a time entry into multiple time entries

Synopsis

Split a time entry. The time arguments can be more than one, but must be increasing.

If you want to edit the current (running) time entry you can use “current” instead of its ID. To edit the last ended time entry you can use “last” for it, for the one before that you can use “^2”, for the previous “^3” and so on.

By default, the CLI will ask the information interactively; use --interactive=0 to disable it.

If you prefer that it never don’t do that by default, run the bellow command, and use --interactive when you want to be asked:

$ clockify-cli config set interactive false
  • Full Date and Time: “2016-02-01 15:04:05”
  • Date and Time (assumes 0 seconds): “2016-02-01 15:04”
  • Yesterday with Time: “yesterday 15:04:05”
  • Yesterday with Time (0 seconds): “yesterday 15:04”
  • Today at Time: “15:04:05”
  • Today at Time (assumes 0 seconds): “15:04”
  • 10mins in the future: +10m
  • 1min and 30s ago: -90s
  • 1hour and 10min ago: -1:10s
  • 1day, 10min and 30s ago: -1d10m30s

To be able to use names of resources instead of its IDs you must enable the feature ‘allow-name-for-id’, to do that run the command (the commands may take longer to look for the resource id):

$ clockify-cli config set allow-name-for-id true

Use clockify-cli report --help for more information about printing time entries.

clockify-cli split { <time-entry-id> | current | last | latest | ^n }  <time>... [flags]

Examples

# starting a time entry
$ clockify-cli in --project cli --tag dev -d "Doing work before lunch" --task "edit" --md
ID: `62ae4b304ebb4f143c931d50`  
Billable: `yes`  
Locked: `no`  
Project: Clockify Cli (`621948458cb9606d934ebb1c`)  
Task: Edit Command (`62ae4af04ebb4f143c931d2e`)  
Interval: `2022-06-18 11:01:16` until `now`  
Description:
> Adding docs to edit

Tags:
 * Development (`62ae28b72518aa18da2acb49`)

# splits the time entry at lunch and now
$ clockify-cli split 12:00 13:30 --format '{{.ID}},{{.TimeInterval.Start|ft}}'
62ae4b304ebb4f143c931d50,11:01
3c931d502ae4b3064ebb4f14,12:00
ebb4f143c962ae4b30431d50,13:30

Options

  -v, --csv                  print as CSV
  -F, --duration-float       prints only the sum of duration as a "float hour"
  -D, --duration-formatted   prints only the sum of duration formatted
  -f, --format string        golang text/template format to be applied on each time entry
  -h, --help                 help for split
  -j, --json                 print as JSON
  -m, --md                   print as Markdown
  -q, --quiet                print only ID
      --tz string            time zone to be used on the time entries can be 'Local' to use the systems timezone, UTC or valid TZ identifier from the IANA TZ database https://en.wikipedia.org/wiki/List_of_tz_database_time_zones (default "Local")
  -S, --with-totals          add a totals line at the end

Options inherited from parent commands

      --allow-name-for-id           allow use of project/client/tag's name when id is asked
  -i, --interactive                 will prompt you to confirm/complement commands input before executing the action 
  -L, --interactive-page-size int   will set how many items will be shown on interactive mode (default 7)
      --log-level string            { none | debug | info } set log level (default "none")
  -t, --token string                clockify's token
                                    Can be generated here: https://clockify.me/user/settings#generateApiKeyBtn
  -u, --user-id string              user id from the token
  -w, --workspace string            workspace to be used

SEE ALSO

  • clockify-cli - Allow to integrate with Clockify through terminal
Auto generated by spf13/cobra on 15-Jun-2024