Habix is a command-line tool that fetches incomplete dailies and todos from Habitica and sends desktop notifications. It helps you stay on top of your daily tasks and to-dos by reminding you of outstanding activities that need your attention.
- Fetch Incomplete Dailies and Todos: Retrieves only incomplete tasks of type
daily
andtodo
from Habitica. - Desktop Notifications: Sends notifications for outstanding tasks using
notify-send
(Linux) or native notifications (macOS). - Secure Credential Storage: Stores your Habitica API credentials securely in
~/Habix-API-Keys/habix-api-keys.txt
. - Simple CLI Commands: Easy-to-use commands for setup, execution, and cleanup.
- Cross-Platform Installation: Supports installation via Cargo and Nix.
- Development Environment: Includes Nix Flake and
shell.nix
for seamless development setup.
- Rust and Cargo: Installed on your system.
- Habitica Account: Required to fetch tasks.
- Linux or macOS: For desktop notifications (Linux uses
notify-send
, macOS uses native notifications). - OpenSSL and pkg-config: Required for building the project.
-
Clone the repository:
git clone https://github.com/wmouton/habix.git cd habix
-
Build the project:
cargo build --release
The compiled binary will be located at:
target/release/habix
-
Install the binary to your system:
cargo install --path .
This will install the
habix
binary to~/.cargo/bin/
, which is typically included in your system'sPATH
. -
(Optional) Move the binary to a directory in your
PATH
for easier access:sudo mv target/release/habix /usr/local/bin/
After installation, set up your Habitica API credentials using the setup
command:
habix setup
This command will prompt you to enter your Habitica User ID and API Token. These credentials will be securely stored in ~/Habix-API-Keys/habix-api-keys.txt
. The directory and file will be created automatically if they don’t exist.
To fetch incomplete dailies and todos and receive desktop notifications, run:
habix run
This will:
- Fetch your incomplete
dailies
andtodos
from Habitica. - Send a desktop notification listing your outstanding tasks.
- Notify you if you're all caught up with no incomplete tasks.
If the API keys file is missing or doesn’t contain valid credentials, the program will print a helpful message prompting you to run habix setup
.
To delete the API keys file and remove your stored credentials, run:
habix clean
This command will:
- Delete the
~/Habix-API-Keys/habix-api-keys.txt
file if it exists. - Print a confirmation message.
If you're using Nix, you can set up the development environment with the provided flake.nix
or shell.nix
.
-
Ensure you have Nix installed and flakes enabled.
-
Clone the repository:
git clone https://github.com/wmouton/habix.git cd habix
-
Enter the development shell:
nix develop
This will provide a shell with all the necessary dependencies (e.g., OpenSSL, pkg-config).
If you prefer not to use flakes, you can still enter a development shell using shell.nix
:
nix-shell
Contributions are welcome! If you'd like to contribute to Habix, follow these steps:
- Fork the project on GitHub.
- Clone your fork and create a new branch:
git checkout -b my-feature-branch
- Make your changes and commit them:
git commit -m "Add my new feature"
- Push your changes to your fork:
git push origin my-feature-branch
- Open a pull request on the main repository.
If you encounter any issues, please open an issue on GitHub.
Habix is licensed under the GPL-3.0 License. See the LICENSE file for details.
-
Set Up Credentials:
habix setup
Enter your Habitica User ID and API Token when prompted. The credentials will be saved in
~/Habix-API-Keys/habix-api-keys.txt
. -
Fetch Outstanding Tasks:
habix run
You’ll receive a desktop notification with your incomplete
dailies
andtodos
. -
Clean Up:
habix clean
This will delete the
~/Habix-API-Keys/habix-api-keys.txt
file.
- Missing API Keys File: If the API keys file is missing or invalid,
habix run
will prompt you to runhabix setup
. - API Errors: If you encounter API errors (e.g.,
401 Unauthorized
), ensure your credentials are correct and up-to-date. - Desktop Notifications: Ensure
notify-send
is installed on Linux or that your macOS system supports native notifications.
Now you're ready to use Habix to stay productive and organized by focusing on your outstanding incomplete dailies and todos! 🚀
If you have the following tasks:
- Incomplete Todo: "Complete the Rust project"
- Completed Daily: "Write documentation"
- Incomplete Daily: "Read a book"
The notification will show:
🔴 You have outstanding tasks 🔴:
Complete the Rust project
Read a book
Enjoy using Habix to stay on top of your tasks! 🚀