cico v1.2.1
cico
This is a minimalistic CLI utility to log your work hours. I made this specifically to fit my own needs, but I believe it could be useful to more people than just myself. The name cico is an abbreviation for clock in clock out.
Installation
To install cico you will need to have Node installed. Simply use npm
or yarn
.
npm install -g cico
# or if you like yarn
yarn global add cico
If your package manager is configured correctly, this will make cico
available globally.
Usage
To get an overview of all commands you can simply run cico
.
The most important commands are clocking in and clocking out respectively. If they are called without any arguments, they will use the current time. You can optionally specify an exact time (hours and minutes) to be used. A 24-hour format is used. You may omit leading zeros on single digit hours.
cico in # Clocks you in with the current time
cico in 6:50 # Clocks you in at 6:50 (overwrities previously set time)
cico out # Clocks you out with the current time
cico out 16:43 # Clocks you out at 16:43 (overwrities previously set time)
When clocking in you will also see a target time. That is the time you would need to clock out at in order to reach a full working day (including break). You can find that information again at any time using the status command.
cico status
#> You clocked in at 07:35.
#> You will need to work until 16:20 for an 8 hour day (45 minute break).
#> 57 minutes still to go!
Of course you might only have 7 hour days at your job or your break is not 45 minutes. These things can be configured. The break can be configured per day, while the hours for a workday are configured globally. The default break can also be configured for every new entry.
cico break 30 # Sets todays break to be 30 minutes
cico config break 60 # Set all future breaks to default to 60 minutes
cico config day 7 # Sets 7 hour workdays
If you need to see the times for a month, you can generate an overview. Overviews contain clock in, clock out, break and overtime for every day of the month. The report also contains the sum of overtimes for the month.
cico report # Report for the current month
cico report 1 # Report for January of the current year
cico report 9 2021 # Report for September of 2021