ishiharaf / tracker

Minimalistic time tracker that outputs an invoice.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Minimalistic time tracker. It calculates the number of hours worked in a day and outputs an invoice. It acts like a time card stamped by a time clock. You can clock in and out for work and a break. I used minimist (1.2.5) as the argument parser.

Table of contents


Create a file inside the hours folder with the MM-DD.log naming scheme. Fill each line with the date and the hours. To add a comment, start the line with a #.

2021/03/18 08:59:13 ~ 12:00:05 - 13:00:29 ~ 17:00:50
2021/03/18 08:58:21 ~ 12:00:37 - 13:00:59 ~ 17:01:41
# Woke up late today
2021/03/19 09:29:03 ~ 17:10:10

You can add the date and the hours manually, or add a snippet to your text editor. I type addDate to add the current date, and addTime to add the current time. This is my VSCode global snippets file:

    "Insert current date": {
        "prefix": "addDate",
        "body": [
        "description": "Insert current date in YY/MM/DD format"

    "Insert current time": {
        "prefix": "addTime",
        "body": [
        "description": "Insert current time in hh:mm:ss format"

Change the contents of to reflect your information, and to reflect the company information. Run the app with node app -w and an invoice will appear inside the invoices folder.

You can pass additional arguments to change some details. To change the invoice or make other changes permanent, you have to edit the source code.


  • -h displays a help message.
  • -a includes additional expenses on the invoice.
  • -w writes an invoice.
  • -i takes a file as the input. The default is MM-DD.log.
  • -o changes the output format. The default is txt. It currently supports txt and html.
  • -d changes the hours on the invoice to decimal
  • -c changes the billed client. Pass the name without the .info. The default is company.
  • -r changes the hourly rate. The default is 16.


To run this project, clone the repository and run it with node. To output the sample log as an invoice, pass -i 2021-03 or -i 2021-03.log as an argument or change the name to reflect the current month and day.

$ node app -w




Minimalistic time tracker that outputs an invoice.

License:GNU General Public License v3.0


Language:JavaScript 68.1%Language:HTML 31.9%