| Crates.io | task2habitica |
| lib.rs | task2habitica |
| version | 0.2.1 |
| created_at | 2026-01-18 20:43:18.731662+00 |
| updated_at | 2026-01-24 13:14:38.09515+00 |
| description | Sync Taskwarrior tasks with Habitica |
| homepage | |
| repository | https://github.com/mainframev/task2habitica-rs |
| max_upload_size | |
| id | 2053059 |
| size | 145,182 |
Bidirectional sync tool between Taskwarrior and Habitica.
cargo install task2habitica
# Clone the repository
git clone https://github.com/mainframev/task2habitica-rs.git
# Build the release binary
cargo build --release
# Install the binary
cp target/release/task2habitica /usr/local/bin/
# Install the hook scripts
mkdir -p ~/.task/hooks
cp hooks/* ~/.task/hooks/
chmod +x ~/.task/hooks/*.task2habitica
You can configure your Habitica credentials using either environment variables or your .taskrc file.
Environment variables take precedence if both are set.
export HABITICA_USER_ID=YOUR_USER_ID
export HABITICA_API_KEY=YOUR_API_KEY
Add your Habitica user ID and API key to your taskrc file:
habitica.user_id=YOUR_USER_ID
habitica.api_key=YOUR_API_KEY
You can find these in your Habitica account settings under Site Data tab.
Add the following User Defined Attributes (UDAs) to your taskrc:
uda.habitica_uuid.label=Habitica UUID
uda.habitica_uuid.type=string
uda.habitica_difficulty.label=Habitica Difficulty
uda.habitica_difficulty.type=string
uda.habitica_difficulty.values=trivial,easy,medium,hard
uda.habitica_task_type.label=Habitica Task Type
uda.habitica_task_type.type=string
uda.habitica_task_type.values=daily,todo
By default, task notes are stored in ~/.task/notes/. You can customize this:
rc.tasknote.location=~/.task/notes/
rc.tasknote.prefix=[tasknote]
rc.tasknote.extension=.txt
Once installed, the hooks will automatically sync your tasks:
Example:
task add "Buy groceries"
task 1 done
# Stats will be displayed on exit
To manually sync all tasks:
task2habitica sync
This is useful when:
Use --verbose flag for detailed output:
task2habitica sync --verbose
Set task difficulty using the habitica_difficulty UDA:
task add "Easy task" habitica_difficulty:easy
task add "Hard boss fight" habitica_difficulty:hard
Difficulty levels:
trivial: 0.1 priority in Habiticaeasy: 1.0 priority (default)medium: 1.5 priorityhard: 2.0 prioritySpecify task type using the habitica_task_type UDA:
task add "Daily exercise" habitica_task_type:daily
task add "One-time task" habitica_task_type:todo
Task notes from Habitica are stored as separate files in ~/.task/notes/:
# Notes are automatically synced
task 1 annotate "This is an annotation, not a note"
# The Habitica notes field will be saved to ~/.task/notes/<uuid>.txt
The sync process:
| Taskwarrior Status | Habitica Status | Sync Behavior |
|---|---|---|
| pending | pending | Synced |
| waiting | pending | Synced |
| completed | completed | Synced, scored on Habitica |
| deleted | (deleted) | Not synced |
| recurring | (template) | Not synced |