Build habits like you build code. 像写代码一样养成习惯。
GitHabit is an open-source, offline-first mobile habit tracker designed for developers, efficiency enthusiasts, and geeks. It heavily mimics the aesthetic, concepts, and interaction logic of GitHub.
GitHabit 是一款为开发者、极客和效率爱好者设计的开源、纯离线习惯养成应用,深度还原了 GitHub 的 UI 风格与交互逻辑。不仅能帮你记录日常习惯,还能为你生成专属的 365 天“绿格子”贡献图。
- 📊 Contribution Graph: Visualize your consistency with a 365-day GitHub-style green heatmap. The more you do, the darker the green!
- 📁 Habits as Repositories: Create structured goals with custom colors, target values, and cycle units.
- 💬 Check-ins as Commits: Log your progress with "Commit Messages", specific values, and track your history on a Timeline.
- 📝 Markdown Support: Write detailed
README.mddescriptions for your habits. - 📈 Data Analytics: View your progress through Goal Progress Rings and Line Charts for individual habits.
- 🎨 Geeky Aesthetic: Authentic GitHub Light/Dark themes and typography using Octicons.
- 🔒 Privacy First: 100% offline. All data is securely stored locally via SQLite.
- 💾 Full Data Control: Export and import your entire database as a JSON file.
- 🌍 i18n Support: Switch seamlessly between languages (English / 中文).
- Framework: React Native / Expo (Expo Router)
- Language: TypeScript (Strict Mode)
- Styling: NativeWind (Tailwind CSS for React Native)
- State Management: Zustand
- Local Storage: Expo SQLite
- Icons:
@expo/vector-icons(Octicons)
- Clone the repository
git clone https://github.com/your-username/GitHabit.git cd GitHabit - Install dependencies
npm install
- Start the development server
npx expo start
- Run the app
- Press
ato run on an Android emulator. - Press
ito run on an iOS simulator. - Or scan the QR code with the Expo Go app on your physical device.
- Press
- 📊 贡献热力图 (Contribution Graph):像 GitHub 绿格子一样,可视化你一整年的习惯坚持情况。打卡越多,绿色越深!
- 📁 习惯即仓库 (Repositories):创建结构化的目标,自定义颜色、目标数值和周期单位。
- 💬 打卡即提交 (Commits):用“Commit Message”记录每次打卡的心得,并附带具体数值,在时间线上追踪历史。
- 📝 Markdown 支持:为你的习惯编写详细的
README.md描述和规则。 - 📈 数据分析:通过目标进度环和折线图,直观查看单项习惯的进展与趋势。
- 🎨 极客美学:原汁原味的 GitHub 深色/浅色主题,以及原生 Octicons 图标。
- 🔒 隐私优先:100% 离线运行。所有数据均安全地存储在本地 SQLite 数据库中,不过传云端。
- 💾 数据掌控:支持将所有数据导出为 JSON 文件,或从 JSON 文件导入,换机无忧。
- 🌍 多语言支持:无缝切换英语和中文。
- 框架: React Native / Expo (Expo Router)
- 语言: TypeScript (严格模式)
- 样式: NativeWind (针对 React Native 的 Tailwind CSS)
- 状态管理: Zustand
- 本地存储: Expo SQLite
- 图标库:
@expo/vector-icons(Octicons)
- 克隆项目到本地
git clone https://github.com/your-username/GitHabit.git cd GitHabit - 安装依赖
npm install
- 启动开发服务器
npx expo start
- 运行应用
- 终端中按
a在 Android 模拟器上运行。 - 终端中按
i在 iOS 模拟器上运行。 - 或使用手机上的 Expo Go 应用扫描终端生成的二维码直接在真机运行。
- 终端中按
If you like this project, please consider giving it a ⭐! / 如果喜欢这个项目,欢迎点个 ⭐ 关注!