All Projects → blinry → Habitctl

blinry / Habitctl

Minimalist command line tool you can use to track and examine your habits.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Habitctl

Gql
Very simple CLI for many GraphQL schemas in the cloud. Provides autocompletion for GraphQL queries
Stars: ✭ 101 (-63.54%)
Mutual labels:  command, line
Simplecli
Command Line Interface Library for Arduino
Stars: ✭ 135 (-51.26%)
Mutual labels:  command, line
Python
Python cheatsheet
Stars: ✭ 25 (-90.97%)
Mutual labels:  command, line
Neodoc
Beautiful, hand-crafted commandline interfaces for node.js
Stars: ✭ 221 (-20.22%)
Mutual labels:  command, line
google streetview
A command line tool and module for Google Street View Image API
Stars: ✭ 77 (-72.2%)
Mutual labels:  command, line
colortest
Quickly show all your terminal colors
Stars: ✭ 66 (-76.17%)
Mutual labels:  command, line
Bash Argsparse
An high level argument parsing library for bash
Stars: ✭ 128 (-53.79%)
Mutual labels:  command, line
gab-cmdline
A GABStudios Java library to help with command line parsing.
Stars: ✭ 12 (-95.67%)
Mutual labels:  command, line
SimpleCLI
Command Line Interface Library for Arduino
Stars: ✭ 197 (-28.88%)
Mutual labels:  command, line
unosolo
Work-in-progress Rust application that converts C++ header-only libraries to single self-contained headers.
Stars: ✭ 26 (-90.61%)
Mutual labels:  command, line
ucollage
An extensible command line image viewer inspired by vim
Stars: ✭ 161 (-41.88%)
Mutual labels:  command, line
Tonic
A Low Profile Component Framework. Stable, Minimal, Auditable, and Build-Tool-Free.
Stars: ✭ 265 (-4.33%)
Mutual labels:  minimalist
bot-php
Bot line PHP
Stars: ✭ 25 (-90.97%)
Mutual labels:  line
energizedprotection
Energized Protection Magisk Module.
Stars: ✭ 70 (-74.73%)
Mutual labels:  tracking
traq
Super simple email open/click tracking server.
Stars: ✭ 62 (-77.62%)
Mutual labels:  tracking
Shell Safe Rm
😎 Safe-rm: A drop-in and much safer replacement of bash rm with nearly full functionalities and options of the rm command! Safe-rm will act exactly the same as the original rm command.
Stars: ✭ 265 (-4.33%)
Mutual labels:  command
Public activity
Easy activity tracking for models - similar to Github's Public Activity
Stars: ✭ 2,822 (+918.77%)
Mutual labels:  tracking
realtime-facereccpp
Real time face recognition with tracking (mtcnn detection, kcf tracker, arcface loss)
Stars: ✭ 32 (-88.45%)
Mutual labels:  tracking
react-native-tcharts
基于React Native ART的图表组件库
Stars: ✭ 25 (-90.97%)
Mutual labels:  line
droxy
Create commands on your machine that proxy docker run / exec calls
Stars: ✭ 12 (-95.67%)
Mutual labels:  command

habitctl

habitctl is a minimalist command line tool you can use to track and examine your habits. It was born when I grew frustrated with tracking my habits in plain text files using hand-drawn ASCII tables. habitctl tries to get the job done and then get out of your way.

Installation

habitctl is written in the Rust programming language, so you'll need a working, up-to-date Rust installation. You'll probably want to run these commands:

$ curl -f https://sh.rustup.rs > rust.sh
$ sh rust.sh
$ source ~/.cargo/env

Then, compiling habitctl is as easy as this:

$ git clone https://github.com/blinry/habitctl
$ cd habitctl
$ cargo build --release

This will create the binary target/release/habitctl, which you can add to your $PATH. Additionally, I like to set up an alias called h.

Usage

When you run habitctl for the first time, it will set up the required files:

$ h
Welcome to habitctl!

Created /home/seb/.habitctl/habits. This file will list your currently tracked habits.
Created /home/seb/.habitctl/log. This file will contain your habit log.

You don't have any habits set up!
Run `habitctl edith` to modify the habit list using your default $EDITOR.
Then, run `habitctl`! Happy tracking!

Run h edith and change the content of the habits file, for example like this:

# The numbers specifies how often you want to do a habit:
# 1 means daily, 7 means weekly, 0 means you're just tracking the habit. Some examples:

1 Meditated
7 Cleaned the apartment
0 Had a headache
1 Used habitctl

Here are some more ideas of what to track:

  • got up at a certain time
  • used a spaced repetition software like Anki
  • took a multivitamin
  • cleared my email inbox
  • answered to all texts
  • visited and read all Slack workspaces
  • practiced a language
  • self reflection/used a diary
  • autogenic training
  • published something on my blog/homepage
  • worked on a project
  • did the dishes
  • tidied the apartment
  • closed all browser tabs
  • tracked caloric intake
  • happy
  • flow
  • relaxed
  • coffee intake
  • left my comfort zone
  • thanked someone

Then, simply run h regularly, specify whether or not you did the habit (or needed to skip the habit for some reason - eg. could not clean apartment because you were away for week), and get pretty graphs!

$ h
2018-09-15+02:00:
                Meditated ━       ━ ━  ━━         ━    ━   ━ ━   ━━━━━━━━━━━   ━ ━   ━[y/n/s/⏎] y
    Cleaned the apartment ━──────                 ━──────           ━──────    •······[y/n/s/⏎] n
           Had a headache             ━  ━     ━━                  ━━   ━   ━━        [y/n/s/⏎] n
            Used habitctl    ━ ━━━ ━  ━━━   ━ ━ ━       ━ ━ ━  ━ ━ ━━ ━ ━ ━━━━   ━    [y/n/s/⏎] y
2018-09-16+02:00:
                Meditated        ━ ━  ━━         ━    ━   ━ ━   ━━━━━━━━━━━   ━ ━   ━ [y/n/s/⏎] y
    Cleaned the apartment ──────                 ━──────           ━──────    •······ [y/n/s/⏎] n
           Had a headache            ━  ━     ━━                  ━━   ━   ━━         [y/n/s/⏎] n
            Used habitctl   ━ ━━━ ━  ━━━   ━ ━ ━       ━ ━ ━  ━ ━ ━━ ━ ━ ━━━━   ━    ━[y/n/s/⏎] y

(Some weeks later)

$ h log
                          ▄▃▃▄▄▃▄▆▆▆▅▆▆▇▆▄▃▄▆▃▆▃▆▂▅▄▃▄▅▆▅▃▃▃▆▂▄▅▄▅▅▅▆▄▄▆▇▆▅▅▄▃▅▆▄▆▃▃▂▅▆
                Meditated ━       ━ ━  ━━         ━    ━   ━ ━   ━━━━━━━━━━━   ━ ━   ━━
    Cleaned the apartment ━──────                 ━──────           ━──────    •······        
           Had a headache             ━  ━     ━━                  ━━   ━   ━━         
            Used habitctl    ━ ━━━ ━  ━━━   ━ ━ ━       ━ ━ ━  ━ ━ ━━ ━ ━ ━━━━   ━    ━

                                         ... some habits omitted ...

Yesterday's score: 73.3%

The score specifies how many of the due habits you did that day and removes any you may have skipped from the calculation. The sparkline at the top give a graphical representation of the score. The thick lines in the graph say that you did the habit, the thin lines say that that it was okay that you didn't to it. A thick dot implies you had to skip or were unable to exercise a habit for whatever good reason, and a thin dot indicates the period for which a skip would normally be in effect (in the example above, we are suggesting you could not clean your apartment because you were on a business trip when you'd normally clean it and can thus excuse yourself.).

Also, on the day, if a habit chain is in danger of breaking because it's the last day you can do it before the consistency graph would have a gap in it, habitctl will give you a warning by turning the " " symbol you'd see on the day into an "!".

Enter h help if you're lost:

$ h help
USAGE:
    habitctl [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    ask      Ask for status of all habits for a day
    edit     Edit habit log file
    edith    Edit list of current habits
    help     Prints this message or the help of the given subcommand(s)
    log      Print habit log
    todo     Print unresolved tasks for today

License: GPLv2+

habitctl is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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