|
1 | 1 | # codeme.nvim |
2 | 2 |
|
3 | | -> Beautiful coding activity dashboard for Neovim |
| 3 | +> Beautiful coding dashboard for Neovim |
4 | 4 |
|
5 | | -## Features |
6 | | - |
7 | | -- 100% private and local - all data stored in SQLite on your machine |
8 | | -- Tab-based dashboard with 6 interactive views |
9 | | -- GitHub-style contribution heatmap (12 weeks) |
10 | | -- Language and project breakdowns with visual bar graphs |
11 | | -- Daily goals with progress tracking |
12 | | -- Streak tracking with flame visualization |
13 | | -- Achievements and gamification |
14 | | -- Session tracking for focused coding periods |
15 | | -- Trend comparisons (today vs yesterday, this week vs last) |
16 | | -- Peak productivity insights |
17 | | -- Auto-tracking on file save |
18 | | -- Zero config - works out of the box |
19 | | -- **Adaptive colorscheme** - automatically adapts to ANY Neovim colorscheme (Catppuccin, Gruvbox, Tokyo Night, Nord, etc.) |
20 | | -- Smooth colorscheme transitions - updates instantly when you change themes |
21 | | - |
22 | | -## Privacy |
| 5 | +Zero config. 100% private. Auto-adapts to your colorscheme. |
23 | 6 |
|
24 | | -Your coding data never leaves your machine: |
| 7 | + |
25 | 8 |
|
26 | | -- SQLite database stored locally at `~/.local/share/codeme/` |
27 | | -- No accounts, no cloud sync, no telemetry |
28 | | -- You own your data |
| 9 | +## Install |
29 | 10 |
|
30 | | -## Installation |
31 | | - |
32 | | -### Prerequisites |
33 | | - |
34 | | -- Neovim >= 0.11 |
35 | | -- [Codeme binary](https://github.com/tduyng/codeme) - auto-installed on first use |
36 | | - |
37 | | -### Using lazy.nvim |
| 11 | +### lazy.nvim |
38 | 12 |
|
39 | 13 | ```lua |
40 | 14 | { |
41 | 15 | "tduyng/codeme.nvim", |
| 16 | + cmd = { "CodeMe", "CodeMeToggle" }, |
42 | 17 | config = function() |
43 | | - require("codeme").setup({ |
44 | | - -- Optional configuration |
45 | | - auto_install = true, -- Auto-install binary if not found (default: true) |
46 | | - auto_track = true, -- Auto track on save (default: true) |
47 | | - }) |
| 18 | + require("codeme").setup() |
48 | 19 | end, |
49 | | - cmd = { "CodeMe", "CodeMeToggle", "CodeMeInstall" }, |
50 | 20 | } |
51 | 21 | ``` |
52 | 22 |
|
53 | | -### Using native vim.pack (Neovim 0.12+) |
| 23 | +### vim.pack (Neovim 0.12+) |
54 | 24 |
|
55 | 25 | ```lua |
56 | | -vim.pack.add({ |
57 | | - "https://github.com/tduyng/codeme.nvim", |
58 | | -}) |
59 | | - |
| 26 | +vim.pack.add("https://github.com/tduyng/codeme.nvim") |
60 | 27 | require("codeme").setup() |
61 | 28 | ``` |
62 | 29 |
|
63 | | -### Binary Installation |
64 | | - |
65 | | -The codeme binary will be **automatically installed** on first use. If you prefer manual installation: |
66 | | - |
67 | | -```bash |
68 | | -# Download from GitHub releases |
69 | | -# Go to https://github.com/tduyng/codeme/releases |
70 | | -# Download for your platform (macOS arm64 or x86_64) |
71 | | - |
72 | | -# Or use the Neovim command |
73 | | -:CodeMeInstall |
74 | | -``` |
| 30 | +The [codeme binary](https://github.com/tduyng/codeme) auto-installs on first use. |
75 | 31 |
|
76 | 32 | ## Usage |
77 | 33 |
|
78 | | -### Commands |
79 | | - |
80 | | -| Command | Description | |
81 | | -| ----------------- | ---------------------------------------- | |
82 | | -| `:CodeMe` | Open the beautiful dashboard | |
83 | | -| `:CodeMeToggle` | Toggle dashboard visibility | |
84 | | -| `:CodeMeToday` | Show today's stats notification | |
85 | | -| `:CodeMeProjects` | Show project breakdown | |
86 | | -| `:CodeMeInstall` | Install/update codeme binary from GitHub | |
87 | | -| `:CodeMeVersion` | Show installed codeme version | |
| 34 | +```vim |
| 35 | +:CodeMe " Open dashboard |
| 36 | +:CodeMeToggle " Toggle visibility |
| 37 | +:CodeMeToday " Today's stats notification |
| 38 | +``` |
88 | 39 |
|
89 | | -### Dashboard |
| 40 | +**Keybinding example:** |
90 | 41 |
|
91 | | -**Navigation** |
| 42 | +```lua |
| 43 | +vim.keymap.set("n", "<leader>cm", "<cmd>CodeMe<cr>") |
| 44 | +``` |
92 | 45 |
|
93 | | -- `<Tab>` or `L` - Next tab |
94 | | -- `<S-Tab>` or `H` - Previous tab |
95 | | -- `1-6` - Jump to specific tab |
96 | | -- `q` or `<Esc>` - Close dashboard |
| 46 | +## Dashboard |
97 | 47 |
|
98 | | -**Tabs** |
| 48 | +**Navigate:** |
99 | 49 |
|
100 | | -1. **βοΈ Today** - Today's coding session with time, lines, files, languages, top files, sessions, hourly activity, and daily goal progress |
101 | | -2. **π
Weekly** - Week summary with comparison to last week and GitHub-style contribution heatmap |
102 | | -3. **π Overview** - Overall stats with streak flames, coding trends, and totals |
103 | | -4. **π‘ Insights** - Peak productivity times, comparisons, and achievements |
104 | | -5. **π» Languages** - Top languages breakdown with time and lines |
105 | | -6. **π₯ Projects** - Active projects breakdown |
| 50 | +- `Tab` / `L` β Next tab |
| 51 | +- `Shift-Tab` / `H` β Previous tab |
| 52 | +- `1-5` β Jump to tab |
| 53 | +- `q` / `Esc` β Close |
106 | 54 |
|
107 | | -#### Today |
| 55 | +**Tabs:** |
108 | 56 |
|
109 | | - |
| 57 | +| Tab | Content | |
| 58 | +| --------------- | ----------------------------------- | |
| 59 | +| π **Overview** | Streaks, achievements, totals | |
| 60 | +| β° **Activity** | Today's sessions, languages, files | |
| 61 | +| π
**Weekly** | GitHub-style heatmap, weekly trends | |
| 62 | +| π **Work** | Projects and languages breakdown | |
| 63 | +| π **Records** | Personal bests and milestones | |
110 | 64 |
|
111 | | -#### Overview |
| 65 | + |
| 66 | + |
| 67 | + |
112 | 68 |
|
113 | | - |
| 69 | +## Features |
114 | 70 |
|
115 | | -#### Languages |
| 71 | +β¨ Auto-tracking - Saves trigger tracking automatically |
| 72 | +π Private - SQLite database at `~/.local/share/codeme/` |
| 73 | +π¨ Adaptive - Matches ANY colorscheme instantly |
| 74 | +π 12-week heatmap - GitHub-style contribution graph |
| 75 | +π₯ Streaks - Track your coding momentum |
| 76 | +π Achievements - Unlock as you code |
| 77 | +π Goals - Daily time and lines targets |
| 78 | +β‘ Sessions - 15min idle timeout grouping |
116 | 79 |
|
117 | | - |
| 80 | +## Achievements |
118 | 81 |
|
119 | | -#### Projects |
| 82 | +Unlock achievements as you code: |
120 | 83 |
|
121 | | - |
| 84 | +| Icon | Name | Unlock | |
| 85 | +| ---- | ----------------- | ------------------- | |
| 86 | +| π₯ | 5-Day Fire | 5-day streak | |
| 87 | +| 𧨠| 30-Day Streak | 30-day streak | |
| 88 | +| π₯ | 90-Day Inferno | 90-day streak | |
| 89 | +| π | 180-Day Blaze | 180-day streak | |
| 90 | +| π | Eternal Flame | 365-day streak | |
| 91 | +| π§οΈ | 1K Line Wave | 1,000 lines | |
| 92 | +| β‘ | 10K Line Surge | 10,000 lines | |
| 93 | +| βοΈ | 50K Line Flood | 50,000 lines | |
| 94 | +| π | 100K Line Ocean | 100,000 lines | |
| 95 | +| β‘ | 50h Spark | 50 hours total | |
| 96 | +| π©οΈ | 1K h Lightning | 1,000 hours | |
| 97 | +| βοΈ | 5K h Thunder | 5,000 hours | |
| 98 | +| π | 10K h Mastery | 10,000 hours | |
| 99 | +| π‘ | 20K h Grandmaster | 20,000 hours | |
| 100 | +| π | Bilingual | 2 languages | |
| 101 | +| π | Polyglot | 5 languages | |
| 102 | +| π§ | Polyglot Master | 10 languages | |
| 103 | +| π | Code Polymath | 15 languages | |
| 104 | +| π
| Dawn Coder | Code before 6 AM | |
| 105 | +| π | Night Coder | Code after midnight | |
| 106 | +| β | 2h Warm Up | 2+ hour session | |
| 107 | +| π― | 4h Focus | 4+ hour session | |
| 108 | +| π | 6h Flow State | 6+ hour session | |
| 109 | +| π§ | 8h Deep Work | 8+ hour session | |
| 110 | +| π§ββοΈ | 10h Monk Mode | 10+ hour session | |
| 111 | +| π | 12h Legendary | 12+ hour session | |
122 | 112 |
|
123 | 113 | ## Configuration |
124 | 114 |
|
125 | 115 | ```lua |
126 | 116 | require("codeme").setup({ |
127 | | - -- Binary settings |
128 | | - codeme_bin = "codeme", -- Binary name (auto-detected if installed) |
129 | | - auto_install = true, -- Auto-install binary if not found |
| 117 | + -- Binary |
| 118 | + codeme_bin = "codeme", -- Auto-detected |
| 119 | + auto_install = true, -- Install if missing |
130 | 120 |
|
131 | | - -- Tracking settings |
132 | | - auto_track = true, -- Track files on save |
133 | | - track_on_idle = false, -- Track on cursor idle (not implemented) |
| 121 | + -- Tracking |
| 122 | + auto_track = true, -- Track on save |
| 123 | + verbose = false, -- Show notifications |
134 | 124 |
|
135 | | - -- UI settings |
136 | | - verbose = false, -- Show tracking notifications |
137 | | - |
138 | | - -- Daily goals (set to 0 to disable) |
| 125 | + -- Goals (0 to disable) |
139 | 126 | goals = { |
140 | | - daily_hours = 4, -- Daily goal in hours |
141 | | - daily_lines = 500, -- Daily goal in lines |
| 127 | + daily_hours = 4, -- Hours per day |
| 128 | + daily_lines = 500, -- Lines per day |
142 | 129 | }, |
143 | 130 | }) |
144 | 131 | ``` |
145 | 132 |
|
146 | | -### Custom Keybinding |
147 | | - |
148 | | -```lua |
149 | | -vim.keymap.set("n", "<leader>cm", "<cmd>CodeMe<cr>", { desc = "Open CodeMe Dashboard" }) |
150 | | -vim.keymap.set("n", "<leader>ct", "<cmd>CodeMeToggle<cr>", { desc = "Toggle CodeMe" }) |
151 | | -``` |
| 133 | +## Colorscheme Magic |
152 | 134 |
|
153 | | -## Colorscheme Support |
154 | | - |
155 | | -CodeMe automatically adapts to **ANY** Neovim colorscheme! It intelligently extracts colors from your active theme's highlight groups, ensuring the dashboard always looks beautiful and cohesive. |
156 | | - |
157 | | -### How it works |
158 | | - |
159 | | -- **Automatic color extraction** - Colors are pulled from standard highlight groups (String, Function, Error, etc.) |
160 | | -- **Instant updates** - Dashboard colors update automatically when you change colorschemes |
161 | | -- **Universal compatibility** - Works with ALL colorschemes: Catppuccin, Gruvbox, Tokyo Night, Nord, Everforest, Kanagawa, and more |
162 | | -- **Graceful fallbacks** - If a color isn't found, it intelligently falls back to ensure nothing breaks |
163 | | - |
164 | | -### Example |
| 135 | +Works with **every** colorscheme automatically: |
165 | 136 |
|
166 | 137 | ```lua |
167 | | --- Switch colorscheme anytime - CodeMe adapts instantly! |
168 | 138 | vim.cmd.colorscheme("catppuccin") |
169 | | -vim.cmd("CodeMe") |
| 139 | +vim.cmd("CodeMe") -- Perfect Catppuccin colors |
170 | 140 |
|
171 | | --- Change to Gruvbox - dashboard colors update automatically |
172 | 141 | vim.cmd.colorscheme("gruvbox") |
173 | | -vim.cmd("CodeMe") |
| 142 | +vim.cmd("CodeMe") -- Now perfectly Gruvbox |
174 | 143 |
|
175 | | --- Try Tokyo Night - perfect color harmony maintained |
176 | 144 | vim.cmd.colorscheme("tokyonight") |
177 | | -vim.cmd("CodeMe") |
| 145 | +vim.cmd("CodeMe") -- Instantly Tokyo Night themed |
178 | 146 | ``` |
179 | 147 |
|
180 | | -No configuration needed - it just works! The dashboard will always match your editor's aesthetic. |
| 148 | +No config needed. It extracts colors from your active theme and updates instantly when you change colorschemes. |
181 | 149 |
|
182 | | -## Achievements |
| 150 | +## Privacy |
183 | 151 |
|
184 | | -Unlock achievements as you code: |
| 152 | +Your data never leaves your machine: |
185 | 153 |
|
186 | | -| Achievement | Description | |
187 | | -| ---------------------- | -------------------------------- | |
188 | | -| π― First Steps | Track your first coding activity | |
189 | | -| π₯ Getting Started | Maintain a 3-day coding streak | |
190 | | -| β‘ Weekly Warrior | Maintain a 7-day coding streak | |
191 | | -| π Monthly Master | Maintain a 30-day coding streak | |
192 | | -| π» Code Machine | Write 1,000 lines of code | |
193 | | -| π Prolific Programmer | Write 10,000 lines of code | |
194 | | -| β° Dedicated Developer | Code for 10 hours total | |
195 | | -| π Century Coder | Code for 100 hours total | |
196 | | -| π Polyglot | Code in 5 different languages | |
197 | | -| π
Early Bird | Code before 7 AM | |
198 | | -| π¦ Night Owl | Code after midnight | |
| 154 | +- SQLite at `~/.local/share/codeme/codeme.db` |
| 155 | +- No accounts, no cloud, no telemetry |
| 156 | +- You own everything |
199 | 157 |
|
200 | 158 | ## License |
201 | 159 |
|
202 | 160 | MIT |
203 | 161 |
|
204 | 162 | --- |
205 | 163 |
|
206 | | -Made with β€οΈ for the Neovim community |
| 164 | +Made with β€οΈ for Neovim |
0 commit comments