← 返回
效率工具 中文

Habit Tracker

Track habits, log completions, and analyze progress with CLI commands. Use when user wants to build habits, track daily/weekly/monthly routines, log habit co...
通过 CLI 命令追踪习惯、记录完成情况并分析进度,适用于建立每日/每周/每月习惯并记录完成情况的场景。
harrylabsj
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 394
下载
💾 2
安装
1
版本
#latest

概述

Habit Tracker

A command-line habit tracking tool for building consistency and monitoring progress.

Features

  • Habit Definition: Create habits with custom frequency (daily/weekly/monthly), targets, and reminders
  • Habit Logging: Log completions manually with optional notes and custom dates
  • Statistics: View completion rates, streaks, and trends
  • Progress Reports: Visual progress bars and summary reports
  • Smart Reminders: Check for due habits based on reminder times

Installation

The habit tracker is available as a Node.js CLI tool. No dependencies required.

CLI Commands

Add a Habit

node scripts/habit-cli.js add "Exercise" --frequency daily --target 1 --reminder "08:00"

Options:

  • --frequency: daily, weekly, or monthly (default: daily)
  • --target: completions per period (default: 1)
  • --reminder: time in HH:MM format
  • --description: habit description

List Habits

node scripts/habit-cli.js list

Log a Completion

node scripts/habit-cli.js log "Exercise" --count 1 --note "Morning run"

Options:

  • --count: number of completions (default: 1)
  • --date: YYYY-MM-DD format (default: today)
  • --note: optional note

View Logs

node scripts/habit-cli.js logs "Exercise" --days 7

View Statistics

node scripts/habit-cli.js stats "Exercise" --days 30

Shows:

  • Total completions
  • Active days
  • Completion rate
  • Current streak
  • Longest streak

Generate Report

node scripts/habit-cli.js report --days 7

Displays visual progress bars and summary for all habits.

Edit a Habit

node scripts/habit-cli.js edit "Exercise" --target 2 --reminder "07:00"

Delete a Habit

node scripts/habit-cli.js delete "Exercise"

Check Reminders

node scripts/habit-cli.js reminder

Data Storage

Habits and logs are stored in ~/.config/habit-tracker/:

  • habits.json: Habit definitions
  • logs.json: Completion logs

Automation

Cron Job for Reminders

Add to crontab for hourly reminder checks:

0 * * * * node /path/to/habit-tracker/scripts/habit-cli.js reminder

Daily Report

0 21 * * * node /path/to/habit-tracker/scripts/habit-cli.js report --days 1

Integration

This skill can be triggered by:

  • Direct CLI commands
  • Scheduled cron jobs
  • Event-based triggers (e.g., after completing a task)

Examples

Track a new habit:

habit add "Read 30 minutes" --frequency daily --target 1 --reminder "21:00"
habit log "Read 30 minutes" --note "Finished chapter 5"

Weekly habit with multiple targets:

habit add "Meditate" --frequency weekly --target 5
habit log "Meditate" --count 1

View progress:

habit stats --days 30
habit report --days 7

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 03:39 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,844
developer-tools

JD Shopping

harrylabsj
京东购物助手,专注信任优先的购买决策,提供安全浏览器辅助购物。用于买京东、查自营、看评论、比价、选规格、判断值不值得买、比较京东与其他平台等场景。
★ 1 📥 1,763
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,654