All Projects → infeeeee → kimai2-cmd

infeeeee / kimai2-cmd

Licence: MIT license
Command line client for Kimai2, the open source, self-hosted time tracker

Programming Languages

javascript
184084 projects - #8 most used programming language
Inno Setup
370 projects

Projects that are alternatives of or similar to kimai2-cmd

kimai2
Docker containers for the kimai2 web application including docker-compose and kubernetes/helm deployment.
Stars: ✭ 106 (+457.89%)
Mutual labels:  kimai, kimai2
trax
Simple time tracker designed for ChatOps
Stars: ✭ 40 (+110.53%)
Mutual labels:  time-tracker
Takt
Track your tasks and time
Stars: ✭ 142 (+647.37%)
Mutual labels:  time-tracker
Wakapi
📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
Stars: ✭ 232 (+1121.05%)
Mutual labels:  time-tracker
Time To Leave
Log work hours and get notified when it's time to leave the office and start to live.
Stars: ✭ 155 (+715.79%)
Mutual labels:  time-tracker
time
React UI for Wobbly Time Tracker for the Teams
Stars: ✭ 24 (+26.32%)
Mutual labels:  time-tracker
Unfog
⏱ Minimalist CLI task & time manager, written in Haskell.
Stars: ✭ 121 (+536.84%)
Mutual labels:  time-tracker
ps4-time-tracking
Util for tracking PlayStation 4 usage times
Stars: ✭ 19 (+0%)
Mutual labels:  time-tracker
www.kimai.org
Website for the time-tracking app Kimai 2
Stars: ✭ 17 (-10.53%)
Mutual labels:  kimai
Klog
A plain-text file format and command line tool for time tracking
Stars: ✭ 222 (+1068.42%)
Mutual labels:  time-tracker
Hcl
Command-line tool for manipulating Harvest timesheets
Stars: ✭ 219 (+1052.63%)
Mutual labels:  time-tracker
React Rewind
Time Travel Debugger for React useReducer
Stars: ✭ 159 (+736.84%)
Mutual labels:  time-tracker
goclockify
A terminal-based client for Clockify time tracker
Stars: ✭ 47 (+147.37%)
Mutual labels:  time-tracker
Gotime
CUI project/task/time tracker written in golang
Stars: ✭ 144 (+657.89%)
Mutual labels:  time-tracker
time-tracker-cli
Super tiny and ligthway time tracker for all cli lovers
Stars: ✭ 79 (+315.79%)
Mutual labels:  time-tracker
Toggldesktop
Toggl Desktop app for Windows, Mac and Linux
Stars: ✭ 1,663 (+8652.63%)
Mutual labels:  time-tracker
Vscode Kanban
Kanban board for Visual Studio Code.
Stars: ✭ 191 (+905.26%)
Mutual labels:  time-tracker
youtrack-worklog-viewer
A tool to keep track of the work hours you spent on issues in the YouTrack issue management system
Stars: ✭ 37 (+94.74%)
Mutual labels:  time-tracker
desktop-application
Electron-based desktop time tracker for Cattr
Stars: ✭ 38 (+100%)
Mutual labels:  time-tracker
pomogoro
Text-file based todo time tracking
Stars: ✭ 22 (+15.79%)
Mutual labels:  time-tracker

Kimai2-cmd

Command line client for Kimai2, the open source, self-hosted time tracker.

interactive restart gif

To use this program you have to install Kimai2 first!

Features

This client is not intended to replace the Kimai webUI, so only basic functions, starting and stopping measurements

Commands:

  • Start, restart and stop measurements
  • List active and recent measurements
  • List projects and activities

UI:

  • Interactive terminal UI with autocomplete
  • Classic terminal UI for integration

Integration:

  • Portable executable for all three platforms
  • Installer for Windows
  • Generate output for Rainmeter (Windows). More info here: kimai2-cmd-rainmeter
  • Generate output for Argos/Kargos/Bitbar (Gnome, Kde, Mac). More info here: kimai2-cmd-argos

Requests for integrations with other softwares are welcomed! Just open an issue and show an example output, what you need.

Installation

Download from releases.

You have to create an API password for your username on your Kimai installation. In Kimai: User menu (Top right corner) -> Edit -> API.

Notes on Windows

Portable executable or installer available.

Installer automatically adds the install path to the %PATH% environment variable, so you can use it from command line/powershell system wide. Sign out and in if it's not working.

With the portable version you have to do this manually. Follow this tutorial or a similar one if you don't know how to do it.

Notes on Linux/Mac

Portable executable only. On the following terminal examples use the file name you downloaded.

Make the downloaded binary executable:

sudo chmod +x kimai2-cmd-os

Add kimai2-cmd to path so you have to just type kimai to the terminal:

sudo ln -s /path/to/kimai2-cmd-os /usr/bin/kimai

To remove:

sudo rm /usr/bin/kimai

Install with npm

If npm installed you can install it with the following command:

npm install -g infeeeee/kimai2-cmd

Usage

Two usage modes: interactive and classic ui

Interactive ui

interactive start gif

If you start without any commands, you will get to the interactive UI. Use your keyboard's arrow keys for navigation. On the Start new measurement menu item you can search for project and activity names.

You can exit with ctrl+c any time.

Classic ui

You can find all the options in the help:

$ kimai2-cmd --help

Usage: kimai2-cmd [options] [command]

Command line client for Kimai2. For interactive mode start without any commands. To generate settings file start in interactive mode!

Options:
  -V, --version               output the version number
  -v, --verbose               verbose, longer logging
  -i, --id                    show id of elements when listing
  -b, --argosbutton           argos/bitbar button output
  -a, --argos                 argos/bitbar output
  -h, --help                  output usage information

Commands:
  start [project] [activity]  start selected project and activity
  restart [id]                restart selected measurement
  stop [id] [description]     stop all or selected measurement measurements, [id] is optional, [description] is optional but needs [id]
  rainmeter                   update rainmeter skin
  list-active                 list active measurements
  list-recent                 list recent measurements
  list-projects               list all projects
  list-activities             list all activities
  url                         prints the url of the server

Project and activity names are case insensitive. If your project or activity name contains a space, wrap it in double or single quotes. This example starts project named foo with activity named bar bar:

kimai2-cmd start "foo" "bar bar"

Settings and first run

All settings stored in the settings.ini file. Place this file to the same directory as the executable. If no settings file found you will drop to the interactive UI, where you can add your settings:

interactive settings gif

You can create your settings.ini file manually, by downloading, renaming and editing settings.ini.example.

On the windows installer version settings.ini location: C:\Users\Username\AppData\Roaming\kimai2-cmd\settings.ini

You can also store the settings.ini file in custom location, just export the full path to the KIMAI_CONFIG variable, something like this:

export KIMAI_CONFIG=$XDG_CONFIG_HOME/kimai2/settings.ini

Integration settings are not asked during first run, you have to change them manually in settings.ini. If you don't use an integration, you can safely ignore it's settings.

Development version

Installation

Prerequisites:

  • node js 10+
  • git
git clone https://github.com/infeeeee/kimai2-cmd
cd kimai2-cmd
npm i

Build

Prerequisite: globally installed pkg:

npm i pkg -g

Build for current platform and architecture

npm run build-current

Build x64 executables for linux, mac on linux or on mac

npm run build-nix

About building for other platforms see pkg's documentation, or open an issue and I can build it for you.

Installer (Windows only)

Prerequisite: Inno Setup

  • Create a windows build: npm run build-current
  • Open kimai2-innosetup.iss in Inno Setup

Usage

For interactive mode just simply:

npm start

For usage with options you have pass a -- before the options. You don't need this if you don't use options just commands:

npm start -- -V
npm start start foo bar

On the first run it will ask for your settings, but you can just copy settings.ini.example to settings.ini and modify it with your favorite text editor

Troubleshooting

If you find a bug open an issue here!

License

MIT

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].