Make sure you have your API token handy.
Download the bootstrap script to a temporary location and run it.
cd <temp location>
curl -f https://downloads.flexiclock.com/cli/bootstrap.sh -o ./bootstrap.sh
chmod +x ./bootstrap.sh && ./bootstrap.sh
Clock in by running clocky clock in
Clock out by running clocky clock out
You might want to consider setting an alias for convenience:
alias clock='clocky clock'
Get time reports:
clocky
or clocky day
for today's hours and balance
clocky week
for this weeks's hours and balance
clocky week --num_weeks 2
for this and last week's hours and balance
By default, you will get a formatted time statement like this...
Period Start: 2020-07-27
Period End: 2020-08-02
Worked: 15:23
Target: 35:00
Remaining: 21:37
But you can use clocky week --list|-l
to see a listing format
This format works well with --num-weeks|-n
to get your balances going
back n weeks from this week like this...
$ clocky week -l -n 3
w/c Target Worked Remaining
-----------------------------------------
2020-06-29 21:00 24:47 -3:47
2020-07-06 21:00 12:39 8:21
2020-07-13 21:00 24:06 -3:06
You can pass the --today|-t
option to clocky
to query against a different day.
For example:
# 3 weeks up to the week of the 1st of July
$ clocky -t 2020-07-01 week -l -n3
w/c Target Worked Remaining
-----------------------------------------
2020-06-15 21:00 21:00 0:00
2020-06-22 21:00 21:48 -0:48
2020-06-29 21:00 24:47 -3:47
# Statement for the 1st of July
$ clocky -t 2020-07-01 day
Period Start: 2020-07-01
Period End: 2020-07-01
Worked: 8:51
Target: 4:12
Remaining: -4:39
Your clockings and the policies flexiclock uses to calculate your working time targets are stored in ~/.flexiclock/clockings.txt
and ~/.flexiclock/policies.txt
.
If you want to adjust a clocking, you can edit ~/.flexiclock/clockings.txt
directly. There is one row per clocking and they are formatted CLOCK IN|OUT YYYY-MM-DDTHH24:MM
. Blank lines and lines starting with #
are ignored.
For example:
# Clockings on 17 July 2020
CLOCK IN 2020-07-17T08:55
CLOCK OUT 2020-07-17T13:53