clockify-cli clone

clockify-cli clone

Copy a time entry and starts it

Synopsis

Copy a time entry and starts it.

Running time entry will be stopped using the start time of this new entry. If you don’t want to stop them, use the flag --no-closing.

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

The rules defined in the workspace and project will be checked before creating it.

If no start time (--when) is set then the current time will be used. The same applies to end time (--when-to-close).

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

When setting a date/time input (--when and --when-to-close) you can use any of the following formats to set then:

  • 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 in --help for more information about creating new time entries. Use clockify-cli report --help for more information about printing time entries.

clockify-cli clone { <time-entry-id> | last| ^<n> } [flags]

Examples

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

Tags:
 * Development (`62ae28b72518aa18da2acb49`)

$ clockify-cli clone last -d "Adding examples to clone" --md
ID: `62ae4b304ebb4f143c931d50`  
Billable: `yes`  
Locked: `no`  
Project: Clockify Cli (`621948458cb9606d934ebb1c`)  
Task: Clone Command (`62ae4af04ebb4f143c931d2e`)  
Interval: `2022-06-18 22:11:16` until `now`  
Description:
> Adding examples to clone

Tags:
 * Development (`62ae28b72518aa18da2acb49`)

$ clockify-cli clone last -d "Adding examples to in" -T pair --task "in command" --md
ID: `62ae4dfe4ebb4f143c932106`
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 in

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 clone
  -j, --json                   print as JSON
  -m, --md                     print as Markdown
      --no-closing             don't close any active time entry
  -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, if not informed will use current time (default "2024-06-15 17:21:50")
  -e, --when-to-close string   when the entry should be closed, if not informed will let it open (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