{"id":13478764,"url":"https://github.com/nikolassv/bartib","last_synced_at":"2025-10-21T03:58:52.402Z","repository":{"id":38179664,"uuid":"336082137","full_name":"nikolassv/bartib","owner":"nikolassv","description":"A simple timetracker for the command line. It saves a log of all tracked activities as a plaintext file and allows you to create flexible reports.","archived":false,"fork":false,"pushed_at":"2025-06-16T09:39:09.000Z","size":275,"stargazers_count":774,"open_issues_count":22,"forks_count":41,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-18T21:58:24.084Z","etag":null,"topics":["cli","cli-app","cli-apps","command-line","command-line-app","command-line-application","command-line-tool","productivity","rust","time-tracker","time-tracking","time-tracking-tool","time-tracking-tools"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikolassv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-04T21:04:45.000Z","updated_at":"2025-10-17T15:51:39.000Z","dependencies_parsed_at":"2023-02-01T05:46:09.000Z","dependency_job_id":"ab3dbbf2-5c67-412d-ae60-5a950df652e6","html_url":"https://github.com/nikolassv/bartib","commit_stats":{"total_commits":102,"total_committers":8,"mean_commits":12.75,"dds":"0.17647058823529416","last_synced_commit":"7a4c258a08b8065fe075bd50bbb49620161186f0"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nikolassv/bartib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolassv%2Fbartib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolassv%2Fbartib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolassv%2Fbartib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolassv%2Fbartib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikolassv","download_url":"https://codeload.github.com/nikolassv/bartib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolassv%2Fbartib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280200870,"owners_count":26289477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cli-app","cli-apps","command-line","command-line-app","command-line-application","command-line-tool","productivity","rust","time-tracker","time-tracking","time-tracking-tool","time-tracking-tools"],"created_at":"2024-07-31T16:02:02.453Z","updated_at":"2025-10-21T03:58:52.397Z","avatar_url":"https://github.com/nikolassv.png","language":"Rust","readme":"# Bartib\n\n![Illustration of the White Rabbit from Alice in Wonderland](misc/white-rabbit.png \"Oh dear! Oh dear! I shall be too late\")\n\nBartib is an easy to use time tracking tool for the command line. It saves a log of all tracked activities as a plaintext file and allows you to create flexible reports.\n\n[![Crates info](https://img.shields.io/crates/v/bartib.svg)](https://crates.io/crates/bartib)\n[![License: GPL](https://img.shields.io/badge/license-GPL-blue)](LICENSE)\n[![Number of Stars](https://img.shields.io/github/stars/nikolassv/bartib.svg?style=flat\u0026logo=github\u0026colorB=green\u0026label=stars)](https://github.com/nikolassv/bartib/stargazers)\n![Rust](https://img.shields.io/github/languages/top/nikolassv/bartib?color=orange)\n[![Tests](https://github.com/nikolassv/bartib/actions/workflows/test.yml/badge.svg)](https://github.com/nikolassv/bartib/actions/workflows/test.yml)\n\n## Contents\n\n- [Bartib](#bartib)\n  - [Contents](#contents)\n  - [Tutorial](#tutorial)\n  - [How To ...](#how-to-)\n    - [How to install Bartib](#how-to-install-bartib)\n      - [Download an executable](#download-an-executable)\n      - [With Cargo](#with-cargo)\n      - [From the AUR (Arch Linux)](#from-the-aur-arch-linux)\n      - [Via homebrew](#via-homebrew)\n      - [Via apk (Alpine Linux)](#via-apk-alpine-linux)\n    - [How to build Bartib](#how-to-build-bartib)\n      - [Precision](#precision)\n    - [How to define in which file to save the log of your activities](#how-to-define-in-which-file-to-save-the-log-of-your-activities)\n    - [How to edit or delete tracked activities](#how-to-edit-or-delete-tracked-activities)\n    - [How to activate auto completion](#how-to-activate-auto-completion)\n  - [Command overview](#command-overview)\n    - [The essentials](#the-essentials)\n    - [Getting Help](#getting-help)\n    - [Tracking activities](#tracking-activities)\n    - [Reporting and listing activities](#reporting-and-listing-activities)\n    - [Edit activities](#edit-activities)\n    - [Doing other stuff](#doing-other-stuff)\n\n## Tutorial\n\nAlice is not chasing white rabbits any more. She has a real job now with real clients and project managers. Therefore, she has to keep track of how she uses the hours of her working day. See how Alice uses Bartib for this and learn how you can use it, too.\n\nAt 8:00 a.m. Alice arrives at the office. She got an email from her project manager who asks her to start working right away on _Urgent Task X_ from _Important Project A_. So Alice types at the command line:\n\n```console\nalice@work: ~ $ bartib start -d \"Urgent Task X\" -p \"Important Project\"\n```\n\nAnd Bartib confirms:\n\n```\nStarted activity: \"Urgent Task X\" (Important Project) at 2021-10-29 08:00\n```\n\nAt 8:43 one of her colleagues drops by and they decide to have a coffee. As she cannot bill this time to her clients, Alice stops the running activity in Bartib:\n\n```console\nalice@work: ~ $ bartib stop\nStopped activity: \"Urgent Task X\" (Important Project) started at 2021-10-29 08:00 (43m)\n```\n\nAlmost 10 minutes later she is back at her desk and continues work:\n\n```console\nalice@work: ~ $ bartib continue\nStarted activity: \"Urgent Task X\" (Important Project) at 2021-10-29 08:51\n``` \n\nAt 10:13 another email arrives: _Urgent Task X_ has to wait! Now _More Urgent Task Y_ from _Just Another Project B_ has to be carried out immediately.\n\nAlice types:\n\n```console\nalice@work: ~ $ bartib start -d \"More Urgent Task Y\" -p \"Just Another Project B\"\nStopped activity: \"Urgent Task X\" (Important Project) started at 2021-10-29 09:01 (1h 12m)\nStarted activity: \"More Urgent Task Y\" (Just Another Project B) at 2021-10-29 10:13\n```\n\nSee how Bartib just stops the running activity when another one starts? No need to stop it manually.\n\nIt is a productive morning. After _More Urgent Task Y_ Alice works on other projects and other tasks, but now it is time for lunch and Alice lets Bartib list all the activities she has tracked today until now:\n\n```console\nalice@work: ~ $ bartib list --today\n\nStarted Stopped Description        Project                Duration \n08:00   08:43   Urgent Task X      Important Project         43m      \n08:51   10:13   Urgent Task X      Important Project      1h 22m      \n10:13   10:35   More Urgent Task Y Just Another Project B    22m      \n10:35   10:53   Urgent Task X      Important Project         18m      \n10:53   11:45   Simple Task Z      Less Important Project    52m       \n11:45   12:34   Boring Task XY     Internal Project C        49m    \n```\n\nAfter her lunch break Alice wants to continue work on _More Urgent Task Y_. Instead of typing the task description and the project name again, she asks Bartib for a list of all the tasks she has recently worked on:\n\n```console\nalice@work: ~ $ bartib last\n\n #  Description        Project                \n[3] More Urgent Task Y Just Another Project B \n[2] Urgent Task X      Important Project      \n[1] Simple Task Z      Less Important Project \n[0] Boring Task XY     Internal Project C \n```\n\nAnd she instructs Bartib to continue task #3:\n\n```console\nalice@work: ~ $ bartib continue 3\nStarted activity: \"More Urgent Task Y\" (Just Another Project B) at 2021-10-29 12:52\n```\n\nAn exciting day at work continues. As it is a Friday Alice decides to already leave work at shortly after seven. She stops her latest activity and asks Bartib for a report:\n\n```console\nalice@work: ~ $ bartib report --today\n\nImportant Project.................................  2h 43m\n    Another Task xyz..............................     15m\n    Important Call with the Client................     35m\n    Urgent Task X.................................  1h 53m\n\nInternal Project C................................  4h 30m\n    Another Meeting...............................     45m\n    Boring Task XY................................  1h 15m\n    Long Meeting with Everyone from the Department  2h 30m\n\nJust Another Project B............................     45m\n    More Urgent Task Y............................     45m\n\nLess Important Project............................  2h 27m\n    Simple Task No. 5.............................  1h 35m\n    Simple Task Z.................................     52m\n\nTotal............................................. 10h 25m\n```\n\nAlice is happy. This was just another great day at the company and thanks to Bartib tracking her time was a breeze.\n\nDo you want to be as happy as Alice? Use Bartib!\n\n## How To ...\n\n### How to install Bartib\n\n#### Download an executable\n\nSimply download a suitable executable from \u003chttps://github.com/nikolassv/bartib/releases\u003e and copy it in some directory that is listed in your `PATH` (e.g. ~/bin).\n\n#### With Cargo\n\nYou may also use cargo to install Bartib from crates.io:\n\n```bash\ncargo install bartib\n```\n\n#### From the AUR (Arch Linux)\n\n```sh\nyay -S bartib\n```\n\n#### Via homebrew\n\n```sh\nbrew install bartib\n```\n\n#### Via apk (Alpine Linux)\n\n```sh\napk add bartib\n```\n\n(Currently bartib is only available in the [testing repository](https://pkgs.alpinelinux.org/packages?name=bartib))\n\n#### General Packaging Status\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/bartib.svg)](https://repology.org/project/bartib/versions)\n\n### How to build Bartib\n\nBartib is written in rust. You may build it yourself with the help of cargo. Just clone this repository and execute the `cargo build` command in its main directory:\n\n```bash\ncargo build --release\n```\n\n#### Precision\n\nBy default, Bartib records timestamps in minutes. If you would like to record timestamps with second precision, you can enable the `second-precision` feature:\n\n```bash\ncargo build --features=second-precision --release\n```\n\n### How to define in which file to save the log of your activities\n\nYou may either specify the absolute path to your log as an extra parameter (`--file` or `-f`) to your bartib command:\n\n```bash\nbartib -f /home/username/activities.bartib report\n```\n\nOr you may set the environment variable `BARTIB_FILE` to the path of your log. Just add this line to your `.profile` file:\n\n```bash\nexport BARTIB_FILE=\"/home/username/activities.bartib\"\n```\n\nIf the specified log file does not exist yet Bartib creates it.\n\n### How to edit or delete tracked activities\n\nJust open your activity log in your favorite text editor to edit or delete former activities. You may even add new activities manually in this file. The format is self explanatory.\n\nBartib even offers the `bartib edit` command which opens the log in the editor defined by your `EDITOR` environment variable. If you are unsure whether your edits are readable by bartib, use the `bartib check` command. It will inform you about any parsing errors.\n\n### How to activate auto completion\n\nBartib offers a simple auto completion for project names. This saves you from typing out long project names each time you start a new task. Just source the script [misc/bartibCompletion.sh](misc/bartibCompletion.sh) in your `.bashrc` to enable it.\n\nFor fish users, add the [misc/bartib.fish](misc/bartib.fish) to either the `~/.config/fish/completions/` or `~/.local/share/fish/vendor_completions.d/` directory.\nCurrently, you must set the `BARTIB_FILE` in your fish shell for the project and description names completions.\n\nFor zsh users, the `misc/_bartib` file can be used for completions.\n\n## Command overview\n\nAll these commands require that you have set the `BARTIB_FILE` environment variable to the file path of your activity log. Otherwise they require an additional `-f/--file` parameter between `bartib` and the subcommand (see above: [How to define in which file to save the log of your activities](#how-to-define-in-which-file-to-save-the-log-of-your-activities)).\n\n### The essentials\n\n```bash\nbartib -h    # get help\nbartib start -p \"name of the project\" -d \"description of the activity\"    # start a new activity\nbartib stop    # stop an activity\nbartib list --today    # list all activities of the current day\nbartib report --today    # create a report for today\n```\n\n### Getting Help\n\n```bash\nbartib -h    # Print a concise help\nbartib start -h    # Print a help for any subcommand\n```\n\n### Tracking activities\n\n```bash\nbartib start -p \"The name of the associated project\" -d \"A description of the activity\"    # Start a new activity with a short description and an associated project\nbartib start -p \"The name of the associated project\" -d \"A description of the activity\" -t 13:45    # Start a new activity at a given time\n\nbartib stop    # Stop the currently running activity\nbartib stop -t 14:00    # Stop the currently running activity at a given time\n\nbartib last    # Print a list of the ten most recently used projects and descriptions\nbartib last -n 25   # Prints a list of recently used projects and descriptions with more entries\n\n# All numbers used with the following commands refer to the indexes in the list created with `bartib last`\nbartib continue 5    # Start an activity with a recently used project and description\nbartib continue    # Continue the latest activity\nbartib continue 3 -d \"Another description\"    # Continue activity number 3 but overwrite the description\nbartib continue 7 -t 8:15    # Continue activity number 7 but have it started at a given time\n\nbartib cancel    # Cancels a running activity by deleting its entry in the activity log\n```\n\n### Reporting and listing activities\n\n```bash\nbartib report    # create a report of how much time has been spent on which projects and activities\nbartib report --today    # create a report for today\nbartib report --yesterday    # create a report for yesterday\nbartib report --current_week    # create a report for the current week (since monday)\nbartib report --last_week    # create a report for the last week\nbartib report --date 2021-09-03    # create a report for a given day\nbartib report --from 2021-09-01 --to 2021-09-05    # create a report for a given time range\nbartib report --project \"The most exciting project\"    # create a report for a given project\nbartib report --project \"Maint?nance *\"    # use '?' and '*' as wildcards in project names\nbartib report --round 15m # rounds the start and end time to the nearest duration. Durations can be in minutes or hours. E.g. 15m or 4h\n\nbartib list    # list all activities grouped by day\nbartib list --no_grouping    # list all activities but do not group them by day\n\nbartib list --today    # list todays' activities\nbartib list --yesterday    # list yesterdays' activities\nbartib list --current_week    # list activities of the current week (since monday)\nbartib list --last_week    # list activities of the last week\nbartib list --date 2021-09-03    # list activities on a given day\nbartib list --from 2021-09-01 --to 2021-09-05    # list activities in a given time range\nbartib list --project \"The most exciting project\"    # list activities for a given project\nbartib list --round 15m # rounds the start and end time to the nearest duration. Durations can be in minutes or hours. E.g. 15m or 4h\n\nbartib search \"exiting\"   # search all descriptions and projects for a specific term\nbartib search \"e*t?ng\"   # use '?' and '*' as wildcards\n```\n\n### Edit activities\n\n```bash\nbartib change -d \"A new description\"   # change the description of the current activity\nbartib change -p \"Another project\"   # change the project for the current activity\nbartib change -t 8:15   # change the start time of the current activity\n\nbartib edit   # open the activity log in the editor you have defined in your `EDITOR` environment variable\nbartib edit -e vim    # open the activity log in a given editor\n```\n\n### Doing other stuff\n\n```bash\nbartib current    # show currently running activity\nbartib projects    # list all projects ever used\nbartib projects -c # show current project only\n\nbartib check    # check your activity log for invalid lines\nbartib sanity    # check for activities with logical errors (e.g activities with negative duration)\n```\n","funding_links":[],"categories":["Productivity","Rust","Applications","应用程序 Applications","Others","Time Tracking CLI Tools","\u003ca name=\"time-tracker\"\u003e\u003c/a\u003eTime trackers","Command-Line Productivity"],"sub_categories":["Time Tracking","Productivity","生产力 Productivity"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolassv%2Fbartib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikolassv%2Fbartib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolassv%2Fbartib/lists"}