clockify-cli edit-multiple

clockify-cli edit-multiple

Edit multiple time entries at once

Synopsis

Edit multiple time entries at once.

This command does not allow to edit when the time entries start or ended, because different time entries will have different start and end times.

Except on interactive mode where the values informed, even if not changed will be applied to all entries (except for Start and End time). If you wanna edit only some properties, than use the flags without interactive mode, only the input sent thought the flags will be changed.

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

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 edit-multiple { <time-entry-id> | current | last }... [flags]

Examples

# just to help show the data
$ export F="{{.ID}} :: {{ .Description }}
  When: {{ fdt .TimeInterval.Start }} util {{ ft (.TimeInterval.End | now) }}
  Task: {{ .Task.Name }} ({{ .Project.Name}})
  Tags: {{ .Tags }}
"

$ clockify-cli report --format "$F"
62af667c4ebb4f143c9482bb :: Edit multiple entries
  When: 2022-06-19 18:10:01 util 18:10:15
  Task: Edit Command (Clockify Cli)
  Tags: [Development (62ae28b72518aa18da2acb49)]

62af668b49445270d7c092e4 :: Adding examples
  When: 2022-06-19 18:10:15 util 18:29:32
  Task: Edit Command (Clockify Cli)
  Tags: [Development (62ae28b72518aa18da2acb49)]

62af6b0f4ebb4f143c94880e :: More examples
  When: 2022-06-19 18:29:32 util 18:38:12
  Task: Edit Command (Clockify Cli)
  Tags: [Development (62ae28b72518aa18da2acb49)]

# change all to use other task
$ clockify-cli edit-multiple -i=0 -f "$F" current last ^2 --task multiple
62af6b0f4ebb4f143c94880e :: More examples
  When: 2022-06-19 18:29:32 util 18:43:04
  Task: Edit Multiple Command (Clockify Cli)
  Tags: [Development (62ae28b72518aa18da2acb49)]
62af668b49445270d7c092e4 :: Adding examples
  When: 2022-06-19 18:10:15 util 18:29:32
  Task: Edit Multiple Command (Clockify Cli)
  Tags: [Development (62ae28b72518aa18da2acb49)]
62af668b49445270d7c092e4 :: Adding examples
  When: 2022-06-19 18:10:15 util 18:29:32
  Task: Edit Multiple Command (Clockify Cli)
  Tags: [Development (62ae28b72518aa18da2acb49)]

Options

  -A, --allow-incomplete     allow creation of incomplete time entries to be edited later
  -b, --billable             this time entry is billable
  -c, --client string        client of the project to use for time entry
  -v, --csv                  print as CSV
  -d, --description string   time entry description
  -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 edit-multiple
  -j, --json                 print as JSON
  -m, --md                   print as Markdown
  -n, --not-billable         this time entry is not billable
  -p, --project string       project to use for time entry
  -q, --quiet                print only ID
  -T, --tag strings          add tags to the entry (can be used multiple times)
      --task string          add a task to the entry
      --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