clockify-cli edit

clockify-cli edit

Edit a time entry

Synopsis

Edit a time entry. Only the inputs sent thought flags will be changed, any other properties will remain the same.

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

Examples

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

Tags:
 * Development (`62ae28b72518aa18da2acb49`)

# changing the description on the running time entry
$ clockify-cli edit current -d "Adding examples to edit" --md
ID: `62ae4b304ebb4f143c931d50`  
Billable: `yes`  
Locked: `no`  
Project: Clockify Cli (`621948458cb9606d934ebb1c`)  
Task: Edit Command (`62ae4af04ebb4f143c931d2e`)  
Interval: `2022-06-18 22:01:16` until `now`  
Description:
> Adding examples to edit

Tags:
 * Development (`62ae28b72518aa18da2acb49`)

# change the description, task, and tags
$ clockify-cli edit -d "Adding examples to edit" -T pair --task "in command" --md
ID: `62ae4b304ebb4f143c931d50`  
Billable: `yes`
Locked: `no`
Project: Clockify Cli (`621948458cb9606d934ebb1c`)
Task: In Command (`62ae29e62518aa18da2acd14`)
Interval: `2022-06-18 22:13:14` until `now`
Description:
> Adding examples to edit

Tags:
 * Pair Programming (`621948708cb9606d934ebba7`)

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
  -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, --when string          when the entry should be started
  -e, --when-to-close when   when the entry should be closed (same formats as when)

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