All Projects → lucassabreu → clockify-cli

lucassabreu / clockify-cli

Licence: Apache-2.0 license
A simple cli to manage your time entries on Clockify from terminal

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to clockify-cli

Vscode Kanban
Kanban board for Visual Studio Code.
Stars: ✭ 191 (+92.93%)
Mutual labels:  time-tracker
trax
Simple time tracker designed for ChatOps
Stars: ✭ 40 (-59.6%)
Mutual labels:  time-tracker
chrono
A fast time tracking tool made with love
Stars: ✭ 32 (-67.68%)
Mutual labels:  time-tracker
Klog
A plain-text file format and command line tool for time tracking
Stars: ✭ 222 (+124.24%)
Mutual labels:  time-tracker
goclockify
A terminal-based client for Clockify time tracker
Stars: ✭ 47 (-52.53%)
Mutual labels:  time-tracker
pomogoro
Text-file based todo time tracking
Stars: ✭ 22 (-77.78%)
Mutual labels:  time-tracker
React Rewind
Time Travel Debugger for React useReducer
Stars: ✭ 159 (+60.61%)
Mutual labels:  time-tracker
timenaut
Desktop time tracking application for Windows, Mac and Linux that does not invade your privacy
Stars: ✭ 16 (-83.84%)
Mutual labels:  time-tracker
redmine hourglass
New Redmine plugin to enhance the time tracking abilities, reports and REST-API.
Stars: ✭ 68 (-31.31%)
Mutual labels:  time-tracker
kimai2-cmd
Command line client for Kimai2, the open source, self-hosted time tracker
Stars: ✭ 19 (-80.81%)
Mutual labels:  time-tracker
Wakapi
📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
Stars: ✭ 232 (+134.34%)
Mutual labels:  time-tracker
time
React UI for Wobbly Time Tracker for the Teams
Stars: ✭ 24 (-75.76%)
Mutual labels:  time-tracker
ps4-time-tracking
Util for tracking PlayStation 4 usage times
Stars: ✭ 19 (-80.81%)
Mutual labels:  time-tracker
Hcl
Command-line tool for manipulating Harvest timesheets
Stars: ✭ 219 (+121.21%)
Mutual labels:  time-tracker
g-timetracker
Global Time Tracker
Stars: ✭ 20 (-79.8%)
Mutual labels:  time-tracker
Utt
Ultimate Time Tracker - A simple command-line time tracker written in Python
Stars: ✭ 175 (+76.77%)
Mutual labels:  time-tracker
time-tracker-cli
Super tiny and ligthway time tracker for all cli lovers
Stars: ✭ 79 (-20.2%)
Mutual labels:  time-tracker
legacy-python-cli
Command line interface used by all WakaTime text editor plugins.
Stars: ✭ 1,048 (+958.59%)
Mutual labels:  time-tracker
billwarrior
A Timewarrior report extension for generating invoices in LaTeX
Stars: ✭ 21 (-78.79%)
Mutual labels:  time-tracker
desktop-application
Electron-based desktop time tracker for Cattr
Stars: ✭ 38 (-61.62%)
Mutual labels:  time-tracker

Clockify CLI

A simple cli to manage your time entries on Clockify from terminal

Release GitHub all releases clockify-cli Build Status Go Report Card Netlify Status DeepSource

Features

  • List time entries from a day
    • List in progress entry
  • Report time entries using a date range
    • Inform date range as parameters
    • "auto filter" for last month
    • "auto filter" for this month
  • Start a new time entry
    • Cloning last time entry
    • Ask input interactively
  • Stop the last entry
  • List workspace projects
  • List Clockify Workspaces
  • List Clockify Workspaces Users
  • List Clockify Tags
  • Edit time entry
  • Configuration management
    • Initialize configuration
    • Update individual configuration
    • Show current configuration

How to install Powered By: GoReleaser

Using homebrew:

brew install lucassabreu/tap/clockify-cli

Using snapcraft

sudo snap install clockify-cli

Using go get

go get -u github.com/lucassabreu/clockify-cli

By Hand

Go to the releases page and download the pre-compiled binary that fits your system.

Getting Started

After you install the CLI, run clockify-cli config --init to setup your environment variables. You’ll be prompted to enter your user information. You can get your clockify api token here.

foo@bar:~$ clockify-cli config --init
? User Generated Token: <your-api-token>
? Choose default Workspace: <workspace-id> - John Doe's workspace
? Choose your user: <user-id> - John Doe
? Should try to find projects/tasks/tags by their names? Yes
? Should use "Interactive Mode" by default? Yes
? Which days of the week do you work? monday, tuesday, wednesday, thursday, friday
? Should allow starting time entries with incomplete data? No
? Should show task on time entries as a separated column? Yes

The CLI saves your workspace info and an API token to ~/.clockify-cli.yaml for future use.

If you have installed the client using snap this file will not be accessible to you, but the configs will still be persisted.

Now you’re ready to create your first Clockify entry:

foo@bar:~$ clockify-cli in --interactive
? Choose your project: dddddddddddddddddddddddd - Clockify Cli | Without Client
? Description: Daily Meetting
? Choose your tags: eeeeeeeeeeeeeeeeeeeeeeee - Meetting
? Start: 08:45
? End (leave it blank for empty):
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+
|            ID            |  START   |   END    |   DUR   |   PROJECT    |  DESCRIPTION   |                TAGS                 |
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+
| ffffffffffffffffffffffff | 08:45:00 | 09:16:44 | 0:31:44 | Clockify Cli | Daily Meetting | Meetting (eeeeeeeeeeeeeeeeeeeeeeee) |
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+

The same result can be done without interactive mode using flags (these flags are valid for in, manual, clone, edit and edit-multiple):

foo@bar:~$ clockify-cli in -i=false \
  --allow-project-name --project "clockify cli" --description "Daily Metting" \
  --when "08:45" --tag eeeeeeeeeeeeeeeeeeeeeeee
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+
|            ID            |  START   |   END    |   DUR   |   PROJECT    |  DESCRIPTION   |                TAGS                 |
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+
| ffffffffffffffffffffffff | 08:45:00 | 09:16:44 | 0:31:44 | Clockify Cli | Daily Meetting | Meetting (eeeeeeeeeeeeeeeeeeeeeeee) |
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+

After finishing your work you can stop the entry using clockify-cli out

foo@bar:~$ clockify-cli out
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+
|            ID            |  START   |   END    |   DUR   |   PROJECT    |  DESCRIPTION   |                TAGS                 |
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+
| ffffffffffffffffffffffff | 08:45:00 | 09:17:22 | 0:32:22 | Clockify Cli | Daily Meetting | Meetting (eeeeeeeeeeeeeeeeeeeeeeee) |
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+

If you want to re-start the last entry you can use clockify-cli clone last

foo@bar:~$ clockify-cli clone last
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+
|            ID            |  START   |   END    |   DUR   |   PROJECT    |  DESCRIPTION   |                TAGS                 |
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+
| ffffffffffffffffffffffff | 08:45:00 | 09:16:44 | 0:31:44 | Clockify Cli | Daily Meetting | Meetting (eeeeeeeeeeeeeeeeeeeeeeee) |
+--------------------------+----------+----------+---------+--------------+----------------+-------------------------------------+

To see what you did today call clockify-cli report

foo@bar:~$ clockify-cli report --with-totals
+--------------------------+---------------------+---------------------+---------+--------------+---------------+--------------------------------+
|            ID            |        START        |         END         |   DUR   |   PROJECT    |  DESCRIPTION  |              TAGS              |
+--------------------------+---------------------+---------------------+---------+--------------+---------------+--------------------------------+
| ffffffffffffffffffffffff | 2022-02-25 08:45:00 | 2022-02-25 09:00:00 | 0:15:00 | Clockify Cli | Daily Meeting | Meeting                        |
|                          |                     |                     |         |              |               | (eeeeeeeeeeeeeeeeeeeeeeee)     |
+--------------------------+---------------------+---------------------+---------+--------------+---------------+--------------------------------+
| ffffffffffffffffffffffff | 2022-02-25 09:00:00 | 2022-02-25 10:30:00 | 1:30:00 | Clockify Cli | Pair          | Pair Programming               |
|                          |                     |                     |         |              |               | (gggggggggggggggggggggggg)     |
+--------------------------+---------------------+---------------------+---------+--------------+---------------+--------------------------------+
| ffffffffffffffffffffffff | 2022-02-25 10:30:00 | 2022-02-25 12:00:00 | 1:30:00 | Clockify Cli | Pull Review   | Code Review                    |
|                          |                     |                     |         |              |               | (hhhhhhhhhhhhhhhhhhhhhhhh)     |
+--------------------------+---------------------+---------------------+---------+--------------+---------------+--------------------------------+
| TOTAL                    |                     |                     | 3:15:00 |              |               |                                |
+--------------------------+---------------------+---------------------+---------+--------------+---------------+--------------------------------+

If you need to see other days and/or filter by description run clockify-cli report --help to see the options.

Help

Allow to integrate with Clockify through terminal

Usage:
  clockify-cli [command]

Available Commands:
  client            List clients from a workspace
  clone             Copy a time entry and starts it (use "last" to copy the last one)
  completion        Generate completion script
  config            Manages configuration file parameters
  delete            Delete time entry(ies), use id "current" to apply to time entry in progress
  edit              Edit a time entry, use id "current" to apply to time entry in progress
  edit-multiple     Edit multiple time entries at once, use id "current"/"last" to apply to time entry in progress.
  gendocs           Generate Markdown documentation for the clockify-cli.
  help              Help about any command
  in                Create a new time entry and starts it (will close time entries not closed)
  manual            Creates a new completed time entry (does not stop on-going time entries)
  mark-invoiced     Marks times entries as invoiced
  mark-not-invoiced Mark times entries as not invoiced
  me                Show the user info
  out               Stops the last time entry
  project           List projects from a workspace
  report            List all time entries in the date ranges and with more data (format date as 2016-01-02)
  show              Show detailed information about one time entry.
  tags              List tags of workspace
  task              List/add tasks of/to a project
  version           Version of the command
  workspace         List user's workspaces

Flags:
      --allow-name-for-id    allow use of project/client/tag's name when id is asked (defaults to env $CLOCKIFY_ALLOW_NAME_FOR_ID)
      --allow-project-name   allow use of project name when id is asked (defaults to env $CLOCKIFY_ALLOW_PROJECT_NAME)
      --config string        config file (default is $HOME/.clockify-cli.yaml)
      --debug                show debug log (defaults to env $CLOCKIFY_DEBUG)
  -h, --help                 help for clockify-cli
  -i, --interactive          will prompt you to confirm/complement commands input before executing the action (defaults to env $CLOCKIFY_INTERACTIVE).
                             	You can be disable it temporally by setting it to 0 (-i=0 or CLOCKIFY_INTERACTIVE=0)
  -t, --token string         clockify's token (defaults to env $CLOCKIFY_TOKEN)
                             	Can be generated here: https://clockify.me/user/settings#generateApiKeyBtn
  -u, --user-id string       user id from the token (defaults to env $CLOCKIFY_USER_ID)
  -w, --workspace string     workspace to be used (defaults to env $CLOCKIFY_WORKSPACE)

Use "clockify-cli [command] --help" for more information about a command.

See more information about the sub-commands at: https://clockify-cli.netlify.app/en/commands/clockify-cli/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].