https://github.com/jlanzarotta/khronos
A feature rich time tracker written in Go.
https://github.com/jlanzarotta/khronos
cli cli-app go time-tracker time-tracking timetrack timetracker timetracking
Last synced: 21 days ago
JSON representation
A feature rich time tracker written in Go.
- Host: GitHub
- URL: https://github.com/jlanzarotta/khronos
- Owner: jlanzarotta
- License: bsd-3-clause
- Created: 2024-09-12T13:00:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-05-22T17:24:07.000Z (26 days ago)
- Last Synced: 2026-05-22T18:16:30.838Z (26 days ago)
- Topics: cli, cli-app, go, time-tracker, time-tracking, timetrack, timetracker, timetracking
- Language: Go
- Homepage:
- Size: 220 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
image:https://img.shields.io/github/v/release/jlanzarotta/khronos[GitHub Release]
image:https://img.shields.io/badge/License-BSD_3_Clause-blue.svg[link="https://opensource.org/license/BSD-3-clause"]
image:https://github.com/jlanzarotta/khronos/actions/workflows/go.yml/badge.svg[link="https://github.com/jlanzarotta/khronos/actions/workflows/go.yml"]
image:https://img.shields.io/github/downloads/jlanzarotta/khronos/total[GitHub Downloads (all assets, all releases)]
image:https://img.shields.io/github/go-mod/go-version/jlanzarotta/khronos[Go Version]
= Khronos
:toc: preamble
:toclevels: 7
:icons: font
:sectnums:
:numbered:
:table-stripes: even
Khronos is a simple command line tool used to track the time you spend on a
specific project and the one or more tasks associated with that project. It was
inspired by the concepts of utt (Ultimate Time Tracker) and timetrap.
== Version 3.0 and Above
With the introduction of version 3, the entry date/time is now automatically
recorded in UTC timezone, NOT the local timezone. This way, when an entry's
date/time is displayed, it is automatically converted into the running machine's
timezone.
If you are using versions of Khronos before and wish to use version 3.0+, you
should use the `convert` command to convert all the entries in your database
from local timezone to UTC. To do this, execute the following commands after
updating to version 3.0:
[source, shell]
----
# Backup your database... Just in case.
> k backup
Backing up C:\Users\yourname\.khronos.db to C:\Users\yourname\.khronos.db-backup_20250429090217...
Done.
# Convert to UTC...
> k convert
Are you sure you want to convert ALL the entries in your database to UTC? (Y/N (yes/no)) >yes
All entries converted.
----
Your database is now converted and you can continue using version 3.0+...
== Installation
These are the various methods in order to install Khronos on your system.
=== Scoop (Windows)
You can install `khronos` using https://scoop.sh/[scoop]. It is in the `khronos` bucket:
[source, shell]
----
# Add my scoops.
> scoop bucket add jlanzarotta https://github.com/jlanzarotta/scoops
# Install khronos.
> scoop install jlanzarotta/khronos
----
I personally like to alias the Khronos executable (khronos.exe) to a simple
command, in my case, I used 'k'. For Microsoft PowerShell, you can use
[source, shell]
----
> Set-Alias -Name k -Value khronos
----
=== Other Operating Systems
To install Khronos, simply unzip the archive for your specific operating system into the directory of your choice.
== Configuration
When Khronos starts up, it checks to make sure there is a default configuration file. If it does not exist, it is automatically created for you.
NOTE: Khronos supports the use of the _XDG Base Directory Specification_. For more information see https://specifications.freedesktop.org/basedir-spec/latest/
Khronos uses the following precedence order when determining where the configuration file is located. Each item listed takes precedence over the item below it:
[cols="1,1a"]
|===
|Microsoft Windows(R)
|. %XDG_CONFIG_HOME%/khronos/.khronos.yaml
. %USERPROFILE%/.khronos.yaml
|FreeBSD(R), Linux, macOS(R), etc.
|. $XDG_CONFIG_HOME/khronos/.khronos.yaml
. $HOME/.khronos.yaml
|===
=== Default Configuration
The default Microsoft Windows(R) Khronos configuration is as follows. These configuration options can be modified by the user after installation.
[source, yaml]
----
database_file: %USERPROFILE%\.khronos.db <1>
debug: false <2>
display_by_day_totals: true <3>
display_time_in_24h_format: false <4>
display_hms_abbreviated: false <5>
report: <6>
by_day: true
by_entry: true
by_project: true
by_task: true
require_note: false <7>
round_to_minutes: 15 <8>
week_start: Sunday <9>
show_by_day_totals: true <10>
split_work_from_break_time: false <11>
favorites: <12>
- favorite: general+training
- favorite: general+product development
- favorite: general+personal time
- favorite: general+holiday
- favorite: general+vacation/PTO/Comp
----
<1> The database file used by Khronos. Default is `.khronos.db`.
<2> If debug type information should be printed to the screen or not. Default is `false`.
<3> If day totals should be displayed on the reports or not. Default is `true`.
<4> If time should be displayed in 24 hour format or not. Default is `false`.
<5> If hours, minutes, and seconds should be abbreviated to h, m, and s, to save display area.
<6> Indicates which reports to run and which ones not to.
<7> If a note is required when entering a new entry into Khronos. Default is `false`. This overrides favorite specific configuration.
<8> The number of minutes to round up or down to when running reports. This makes it easy to report on consistent time "buckets".
<9> The day used to indicate the start of the week. Some companies' weeks start on Saturday, some on Sunday. This allows you to change that start day to fit your needs. The default is `Sunday`.
<10> Should a daily total be shown for each day when rendering the "by day" report. Default is `true`.
<11> Indicates if work and break time should be split into separate values during reports or not. The default is `false`.
<12> The list of favorites.
== Date/Time
It needs to be noted that date/time is stored in the database in ISO8601 UTC format https://en.wikipedia.org/wiki/ISO_8601. However, whenever a date/time is
rendered on the screen, it is rendered in local time. For example, `2025-04-07T19:35:31+00:00`, which is UTC, is rendered as `2025-04-07T15:35:31-04:00` Eastern Standard Time with Daylight
Savings Time being observed since I set my timezone to EST. Your local time will depend on your current timezone.
== Natural Language Time
Khronos supports natural language time constructs for a subset of
commands. Commands such as hello, add, break, and stretch have additional parameters
that accept time as an argument. Any time you pass a time, Khronos will try
to parse it as a natural language time.
This feature can be very handy if you start a project/task and forget to add it simply by specifying the `--at` subcommand.
[source, shell]
----
$ k hello --at "18 minutes ago"
----
The previous example tells Khronos that you want it to add a <> entry
with the time that was 18 minutes ago.
[source, shell]
----
$ k hello --at "today at 7:30AM"
----
The previous example tells Khronos that you want it to add a <> entry
with the time that was at 7:30AM this morning. This is more straight and to the point.
[source, shell]
----
$ k break lunch --at "12:30"
----
The previous example tells Khronos that you want it to add a <> entry
with the time that was at specifically "12:30PM".
[source, shell]
----
$ k add project+task --at "13:45"
----
The previous example tells Khronos that you want it to add an entry
with the time that was at specifically "13:45".
For more information about Natural Language Time as well as samples, head over
to https://pkg.go.dev/github.com/ijt/go-anytime
== Positional Commands
Khronos has many commands for the user to use:
=== hello
The `hello` command tells Khronos you have arrived and to start tracking
time. This should be the first command you execute at the start of your day.
[source, shell]
----
$ k hello
----
WARNING: Keep in mind that if you forget to execute the `hello` command at the start of the day, Khronos will think you worked throughout the night and calculate your time spent on your task accordingly when you run a `report`. This may or may not be the correct outcome.
=== add
The `add` command tells Khronos that you would like to record a project with optional one or more tasks you have just finished working on.
If you would like to perform an _interactive_ add, simply perform the following command.
[source, shell]
----
$ k add
----
During an _interactive_ add, your list of favorites are displayed and you can interactively select from your list.
[source, shell]
----
Favorites found in configuration file[C:\Users\yourname\.khronos.yaml]:
# | PROJECT+TASK | REQUIRE NOTE*
---+-----------------------------+---------------
0 | general+training | false
1 | general+product development | false
2 | general+personal time | false
3 | general+holiday | false
4 | general+vacation/PTO/Comp | false
* May be overridden by global configuration setting
Please enter the number of the favorite; otherwise, [Return] to quit. > 0
----
In this example, the user chose project/task 0.
If the configuration option `require_note:` is set to `true`, Khronos will prompt the user to enter a note. Otherwise, a note is not required.
[source, shell]
----
Please enter the number of the favorite to add; otherwise, [Return] to quit. > 0
Project[general] Task[training] requires a note...
Enter note or leave blank to quit. >
----
If the note is left blank/empty, nothing is added.
[source, shell]
----
Required note not entered. Nothing added.
----
If no favorites are found in your configuration file, an error is displayed and the interactive add is cancelled.
[source, shell]
----
Fatal: No favorites found in configuration file[C:\Users\jlanzarotta\.khronos.yaml]. Unable to perform an interactive add.
----
If during an add, the project+task is specified, this tells Khronos that you just finished working on the project, `khronos` and the task, `programming`.
[source, shell]
----
$ k add khronos+programming
----
If during an add, you have multiple tasks you finished, you can specify them like below. This tells Khronos that you just finished working on the project, `khronos` and the tasks, `programming` and `documentation`.
[source, shell]
----
$ k add khronos+programming+documentation
----
==== note
The `--note` option tells Khronos that you would like to add a note associated with your new entry.
[source, shell]
----
$ k add khronos+programming --note "I love programming."
----
==== favorite
The `--favorite` option tells Khronos that you would like to use one of your preconfigured favorite project/task combinations. These favorites are stored in the _.khronos.yaml_ file which is located in the installation directory. By default, there are 5 preconfigured favorites; however, you can add as many as you would like.
NOTE: Favorites are 1 based.
Favorites are in the following format:
[source,properties]
----
favorites:
- favorite: general+training
- favorite: general+product development
- favorite: general+personal time
- favorite: general+holiday
- favorite: general+vacation/PTO/Comp
----
If you want to finish working on a known favorite, you can use the `--favorite` flag to specify the favorite.
[source, shell]
----
$ k add --favorite 1
You are about to add this entry
Project[general]
Task[training]
Date[2023-12-07T14:10:02-05:00]...
Continue? Y/N (yes/no)? >
----
The previous command tells Khronos that you just finished working on the favorite referenced by the number '0'. If we look in our _.khronos.yaml_ file for the '0' favorite, we find that it references the 'project1+task1' combination. With that, 'project1+task1' would be automatically logged as being completed.
TIP: Configuring and using favorites helps improve consistency as well as improves speed of entering frequently used project/task combinations.
If you choose `yes`...
[source, shell]
----
Entry added.
----
If you choose `no`...
[source, shell]
----
Nothing added.
----
==== description
An optional description can be added to a favorite. This description will show up on various commands and reports.
Here is an example:
[source,properties]
----
favorites:
- favorite: general+training
- favorite: general+product development
- favorite: general+personal time
- favorite: general+holiday
- favorite: general+vacation/PTO/Comp
- favorite: project1+screen coding task
description: A very important project
.
.
.
----
==== require_note
An optional `require_note` can be added to a favorite. This flag tells Khronos that you want to require the prompting of a note for this specific favorite.
IMPORTANT: If the global `require_note` option is set to `true`, no matter what value you set on a favorite's `require_note`, a note will be required.
# | PROJECT+TASK | REQUIRE NOTE*
---+-----------------------------+---------------
0 | general+training | true
1 | general+product development | false
2 | general+personal time | false
3 | general+holiday | false
4 | general+vacation/PTO/Comp | false
* May be overridden by global configuration setting
=== amend
The `amend` command tells Khronos that you are wanting to modify a recent entry's information. By default, amend amends the most recent entry's information. However, if you would like to get a list of the entries for today, use the `--today` option. More on the `--today` option below.
==== today
Using this option, you are shown a list of all the entries for today. You are then given the opportunity to choose the entry you would like to amend.
[source, shell]
----
+---+----------+----------+---------------------------+
| | PROJECT | TASK(S) | DATE/TIME |
+---+----------+----------+---------------------------+
| 1 | ***hello | | 2024-04-15T07:23:03-04:00 |
| 2 | general | training | 2024-04-15T07:49:12-04:00 |
| 3 | general | training | 2024-04-15T08:29:02-04:00 |
| 4 | general | training | 2024-04-15T08:53:01-04:00 |
| 5 | general | training | 2024-04-15T09:18:23-04:00 |
+---+----------+----------+---------------------------+
Please enter index number of the entry you would like to amend; otherwise, ENTER to quit...
----
You are prompted to modify each of the entry's properties and then asked to validate those modifications before they are committed to the database.
IMPORTANT: The Date/Time must be in ISO8601 format. https://en.wikipedia.org/wiki/ISO_8601
[source, shell]
----
$ k amend
Amending...
Project[proj-001]
Task[meeting]
Note[CRP with customer.]
Date[2024-04-10T10:32:24-04:00]
Enter Project (empty for no change) [proj-001] : proj-002
Enter Task (empty for no change) [meeting] :
Enter Note (empty for no change) [CRP with customer.] :
Enter Date Time (empty for no change) [2024-04-10T10:32:24-04:00] : 2024-04-10T10:302:00-00:00
| OLD | NEW
----------+---------------------------+---------------------------
Project | proj-001 | proj-002
Task | meeting | meeting
Note | CRP with customer. | CRP with customer.
Datetime | 2024-04-10T10:32:24-04:00 | 2024-04-10T10:30:00-00:00
Commit these changes? (Y/N (yes/no))
----
==== date
Using this option, you are shown a list of all the entries for specified date. The date *MUST* be in `YYYY-MM-DD` format. You are then given the opportunity to choose the entry you would like to amend, just like when specifying `today`.
=== backup
The `backup` command tells Khronos that you would like for it to backup your database to a uniquely named _-backup_yyyymmddhhmmss_ backup file.
[source, shell]
----
$ k backup
Backing up C:\Users\yourname\.khronos.db to C:\Users\yourname\.khronos.db-backup_20250429095331...
Done.
----
=== break
The `break` command tells Khronos that you are going on a break. The time associated with breaks is not added to your daily work time. It is considered under the break classification when doing a `report`.
[source, shell]
----
$ k break
You are about to add this break
Break Time
Date[2025-12-12T14:57:31-05:00]...
Continue? Y/N (yes/no) > yes
----
The previous command tells Khronos that you just finished your break.
==== note
The `note` option tells Khronos that you would like to add a note associated with your new break.
[source, shell]
----
$ k break --note lunch
You are about to add this break...
Break Time
Note[lunch]
Date[2025-12-12T14:57:31-05:00]
Continue? Y/N (yes/no) > y
----
The previous command tells Khronos that you just finished your lunch break.
=== edit
The `edit` command tells Khronos you would like to edit the Khronos configuration file with the default system editor.
[source, shell]
----
$ k edit
----
=== nuke
Over time as you enter new entries into the database, the database will naturally grow. To clear out old entries, use the `nuke` command.
==== all
The `all` option tells Khronos that you would like to nuke ALL entries from the database. This includes the current year's entries.
WARNING: Use this with extreme caution as ALL entries will be nuked. You are given ample warning before your entries are actually nuked. YOU HAVE BEEN WARNED.
[source, shell]
----
$ k nuke --all
Are you sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
WARNING: Are you REALLY sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
LAST WARNING: Are you REALLY REALLY sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
All entries nuked.
----
==== prior-years
The `prior-years` option tells Khronos that you would like to nuke all entries prior to the current year. So in other words, if you were tracking the past 5 years worth of entries in your database, and you issued the `prior-years` command, the past 4 years worth of entries would be nuked from the database, leaving just the current year.
NOTE: You are given ample warning before your entries are actually nuked...
[source, shell]
----
$ k nuke --prior-years
Are you sure you want to nuke all entries prior to 2024 from the database? (Y/N (yes/no)) yes
WARNING: Are you REALLY sure you want to nuke all entries prior to 2024 from the database? (Y/N (yes/no)) yes
LAST WARNING: Are you REALLY REALLY sure you want to nuke all entries prior to 2024 from the database? (Y/N (yes/no)) yes
All entries prior to 2024 have been nuked.
----
==== dry-run
The `dry-run` option tells Khronos that you do not really want anything nuked. But instead just report on how many entries would have been nuked.
[source, shell]
----
$ k nuke --all --dry-run
Are you sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
WARNING: Are you REALLY sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
LAST WARNING: Are you REALLY REALLY sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
All 639 entries would have been nuked.
----
==== archive
The `archive` option tells Khronos that you would like to archive the entries that are nuked from your database. The nuked records are written to a _khronos_archive_yyyymmddhhmmss.csv_ file.
[source, shell]
----
$ k nuke --all --archive
Are you sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
WARNING: Are you REALLY sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
LAST WARNING: Are you REALLY REALLY sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
All 639 entries would have been nuked.
$ ls -l
.a--- 58 KB Tue 2025-02-18 08:25:48 PM . khronos_archive_20250218202548.csv
----
==== compress
The `compress` option tells Khronos that you would like to have the archive file automatically compressed. The compression format is _gzip_ and the compressed file will be named _khronos_archive_yyyymmddhhmmss.csv.gz_.
[source, shell]
----
$ k nuke --all --archive --compress
Are you sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
WARNING: Are you REALLY sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
LAST WARNING: Are you REALLY REALLY sure you want to nuke ALL the entries from your database? (Y/N (yes/no)) yes
All 639 entries would have been nuked.
$ ls -l
.a--- 58 KB Tue 2025-02-18 08:25:48 PM . khronos_archive_20250218202548.csv.gz
----
=== show
The `show` command tells Khronos you would like to show various information.
==== favorites
The `favorites` option tells Khronos that you would like to show all your currently configured favorites that are stored in the _.khronos.yaml_ file which is located in the installation directory.
[source, shell]
----
$ k show --favorites
Favorites found in configuration file[C:\Users\yourname\.khronos.yaml]:
# | PROJECT+TASK | REQUIRE NOTE*
---+-----------------------------+---------------
0 | general+training | false
1 | general+product development | false
2 | general+personal time | false
3 | general+holiday | false
4 | general+vacation/PTO/Comp | false
* May be overridden by global configuration setting
----
If one or more of your favorites have an associated Jira Ticket, your favorites will be shown like this:
[source, shell]
----
$ k show --favorites
Favorites found in configuration file[C:\Users\yourname\.khronos.yaml]:
# | PROJECT+TASK | URL | REQUIRE NOTE*
---+-----------------------------+-----------------------------+---------------
0 | general+training | https://yoursite.com/TICKET | false
1 | general+product development | https://yoursite.com/TICKET | false
2 | general+personal time | | false
3 | general+holiday | | false
4 | general+vacation/PTO/Comp | | false
* May be overridden by global configuration setting
----
If one or more of your favorites have an associated description, your favorites will be shown like this:
[source, shell]
----
$ k show --favorites
Favorites found in configuration file[C:\Users\yourname\.khronos.yaml]:
# | PROJECT+TASK | DESCRIPTION | URL | REQUIRE NOTE*
---+-----------------------------+-------------+-----------------------------+---------------
0 | general+training | Training | https://yoursite.com/TICKET | false
1 | general+product development | | https://yoursite.com/TICKET | false
2 | general+personal time | | | false
3 | general+holiday | | | false
4 | general+vacation/PTO/Comp | | | false
* May be overridden by global configuration setting
----
==== statistics
The `statistics` option tells Khronos that you would like to show some statistics related to the entries you have entered into the database.
[source, shell]
----
$ k show --statistics
STATISTIC | VALUE
---------------+----------------------------------------------------------
First Entry | Project[***hello] Task[] Date[2023-11-27T07:17:36-05:00] <1>
Last Entry | Project[***hello] Task[] Date[2024-04-25T07:15:58-04:00] <2>
Total Records | 21 weeks 2 days 22 hours 58 minutes 22 seconds <3>
----
<1> The first entry in the database.
<2> The last entry in the database.
<3> The total duration that is currently in the database.
==== unpushed
The `unpushed` option tells Khronos that you would like to show all entries that have not yet been pushed to the Jira server.
[source, shell]
----
$ k show --unpushed
DATE | PROJECT | TASK | NOTE
------------+---------+--------+--------------------------------------------------
2025-11-17 | Khronos | coding | Working on bug fixes.
2025-11-18 | Khronos | coding | Working on bug fixes.
2025-11-19 | Khronos | coding | Working on bug fixes.
2025-12-01 | Khronos | coding | Working on bug fixes.
2025-12-02 | Khronos | coding | Working on bug fixes.
----
=== report
The `report` command tells Khronos you would like to run a report on your activities. By default, you get the current day's activities.
A couple of things you will notice when you run a report is, first, the header.
[source, shell]
----
============ 2025-01-19 00:00:00(3) to 2025-01-25 23:59:59(4) ============
----
The report header tells you the start and end date/time of the report as well as the week number in parentheses.
Secondly, you will see the _Total Time_. The _Total Time_ can be in two formats, which is controlled by the `split_work_from_break_time` configuration option.
If `split_work_from_break_time` is set to `false`, you will get a combined _Total Time_...
[source, shell]
----
Total Time: 3 hours 45 minutes 0 second
----
If `split_work_from_break_time` is set to `true`, you will get a split _Total Time_...
[source, shell]
----
Total Working Time: 3 hours 30 minutes 0 second
Total Break Time: 15 minutes
----
==== Configuration
As mentioned previously in the <> configuration section, there are options to configure different report sections.
If _by_day: true_, a report by day section is created.
[source, shell]
----
========== By Day ==========
----
If _by_entry: true_, a report by entry section is created.
[source, shell]
----
========== By Entry ==========
----
If _by_project: true_, a report by project section is created.
[source, shell]
----
========== By Project ==========
----
If _by_task: true_, a report by task section is created.
[source, shell]
----
========== By Task ==========
----
==== Options
The `report` command has several handy options that allow you to customize what needs to be reported.
===== --current-week
By specifying the option `--current-week`, this tells Khronos you would like a report for the current week's activities.
[source, shell]
----
$ k report --current-week
----
===== --previous-week
By specifying the option `--previous-week`, this tells Khronos you would like a report for the previous week's activities.
[source, shell]
----
$ k report --previous-week
----
===== --last-entry
By specifying the option `--last-entry`, this tells Khronos you would like a report for just the last entry's activity.
[source, shell]
----
$ k report --last-entry
----
===== --from
By specifying the option `--from` _date_, this tells Khronos you would like the report to start from this specific date.
[source, shell]
----
$ k report --from 2019-03-02
----
===== --to
By specifying the option `--to` _date_, this tells Khronos you would like the report to end at this specific date.
[source, shell]
----
$ k report --to 2019-03-02
----
===== --today
By specifying the option `--today`, this tells Khronos you would like the report specifically for today.
[source, shell]
----
$ k report --today
----
===== --yesterday
By specifying the option `--yesterday`, this tells Khronos you would like the report specifically for yesterday.
[source, shell]
----
$ k report --yesterday
----
===== --date
By specifying the option `--date`, this tells Khronos you would like the report specifically for the given date. The date MUST be in the following format `YYYY-mm-dd`.
[source, shell]
----
$ k report --date 2024-10-11
----
===== --project
By specifying the option `--project`, this tells Khronos you would like the report specifically for the given project.
[source, shell]
----
$ k report --project foobar
----
===== --no-rounding
By specifying the option `--no-rounding`, this tells Khronos you would like all the durations to be their original, unrounded values. This option is good if you have durations that are less than the value you have configured for rounding.
[source, shell]
----
$ k report --from 2019-04-01 --to 2019-04-13 --no-rounding
$ k report --previous-week --no-rounding
----
==== --export type
By specifying the option `--export`, this tells Khronos you would like to export the report to one of three types: CSV, HTML, and Markdown. The default is CSV.
[source, shell]
----
$ k report --current-week --export --type csv
$ k report --previous-week --export --type html
$ k report --export --type md
----
These commands will create a unique report file with the extension associated with the type you specified. CSV produces a file ending in .csv, HTML produces a file ending in .html, and MD produces a file ending in .md.
==== push
By specifying the `--push` option, you tell Khronos that you want to push any unpushed entry's duration and note to the associated Jira Ticket's worklog.
In order to be able to push entries to Jira, you must first add several extra configuration elements to your _.khronos.yaml_ configuration file.
First, you must add the Jira `push:` configuration. This configuration consists of a `type`, a `url`, a `username`, and an `api_key`.
[source, yaml]
----
push:
type: jira <1>
url: https://some_name.atlassian.net <2>
username: username@company.com <3>
api_key: <4>
----
<1> Must always be jira.
<2> The URL to get to the Jira instance.
<3> The username used to log into the Jira instance.
<4> The Jira API-KEY the username uses to log into the Jira instance.
Next, when you define your <<_favorites>>, you *MUST* specify the `ticket` attribute. The `ticket` attribute tells Khronos that this entry is associated with a specific Jira ticket.
[source, yaml]
----
favorites:
- favorite: general+office mgnt(acct/hr/purch)
require_note: true
- favorite: general+training
require_note: true
ticket: GENERAL-003 <1>
----
<1> Tells Khronos that this entry is related to this Jira ticket.
By specifying the `ticket` attribute, Khronos will automatically add a `ticket` property to the entry when it is added to the database.
Now that you have the necessary configuration set up, when you use `--push`, Khronos will use a combination of the push URL along with the ticket to push the entry's duration and note to the Jira Ticket's worklog.
=== stretch
The `stretch` command stretches the last entry to the current or specified date/time.
In the below example, the latest entry is displayed. Khronos will ask you if you want to perform the stretch or not. If you enter (y or Yes), the latest entry is stretched. If you enter (n/No), the latest entry is not stretched.
[source, shell]
----
$ k stretch
You are about to stretch the last entry
Project[general]
Task[meeting]
Note[Sprint Planning]
Date[2026-02-26T10:57:44-05:00]
to 2026-02-26T11:19:42-05:00 which is a difference of 21 minutes 58 seconds...
Continue? Y/N (yes/no) > yes
Last entry was stretched.
----
=== web
The `web` command opens the Khronos website in your default web browser.
[source, shell]
----
$ k web
Opening the Khronos website in your default browser...
----
== Copyright and License
BSD 3-Clause License
Copyright (c) 2018-{localyear}, Jeff Lanzarotta
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.