honeytree 1.1.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +43 -141
- package/bin/honeydew.js +4 -3
- package/package.json +9 -9
- package/src/animation-keyframes.js +890 -0
- package/src/animation.js +151 -0
- package/src/camera.js +54 -0
- package/src/diffactions.js +32 -0
- package/src/diffpanel.js +83 -0
- package/src/diffparser.js +44 -0
- package/src/diffwatch.js +52 -0
- package/src/pointcloud.js +193 -0
- package/src/renderer.js +49 -3
- package/src/renderer3d.js +135 -0
- package/src/scanner.js +102 -0
- package/src/sprites.js +2 -1
- package/src/viewer.js +375 -148
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Varun Nukala
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,186 +1,88 @@
|
|
|
1
1
|
# Honeytree
|
|
2
2
|
|
|
3
|
+
> *your codebase is a forest*
|
|
4
|
+
|
|
3
5
|
[](https://www.npmjs.com/package/honeytree)
|
|
4
6
|
[](https://github.com/Varun2009178/honeytree/blob/main/LICENSE)
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Each prompt plants a new tree. Each tree grows over time. Your forest evolves from a quiet clearing into an ancient woodland — and it never resets.
|
|
9
|
-
|
|
10
|
-
---
|
|
8
|
+
A 3D forest that grows from your codebase. Every file becomes a tree — rendered as a rotatable point cloud right in your terminal using block characters (░▒▓█).
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
No browser. No app. No install beyond npm.
|
|
13
11
|
|
|
14
12
|
```bash
|
|
15
|
-
|
|
16
|
-
honeytree init
|
|
17
|
-
honeytree
|
|
13
|
+
npx honeytree
|
|
18
14
|
```
|
|
19
15
|
|
|
20
|
-
That's it.
|
|
21
|
-
|
|
22
|
-
1. **Install** the CLI globally
|
|
23
|
-
2. **Init** creates your forest file and registers a Claude Code hook
|
|
24
|
-
3. **Run the viewer** in a separate terminal to watch your forest grow
|
|
25
|
-
|
|
26
|
-
After setup, trees are planted automatically after every Claude Code response. No manual steps needed.
|
|
16
|
+
That's it. One command. Run it in any project directory.
|
|
27
17
|
|
|
28
18
|
---
|
|
29
19
|
|
|
30
|
-
##
|
|
20
|
+
## What You See
|
|
31
21
|
|
|
32
|
-
|
|
22
|
+
- Each **file** is a **tree**
|
|
23
|
+
- **Tree height** = file size (bigger files are taller)
|
|
24
|
+
- **Tree species/color** = file type
|
|
25
|
+
- **Canopy density** = git churn (more commits = denser canopy)
|
|
26
|
+
- **Spatial layout** = directory structure (files in the same folder cluster together)
|
|
33
27
|
|
|
34
|
-
|
|
35
|
-
- Adds a `Stop` hook to `~/.claude/settings.json` that runs after every Claude Code response
|
|
28
|
+
### Species
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
| Extension | Species | Color | Shape |
|
|
31
|
+
|-----------|---------|-------|-------|
|
|
32
|
+
| `.js` `.jsx` `.mjs` | Oak | Bright green | Wide ellipsoid |
|
|
33
|
+
| `.ts` `.tsx` | Pine | Teal | Narrow cone |
|
|
34
|
+
| `.css` `.scss` | Birch | Pink | Slim ellipsoid |
|
|
35
|
+
| `.py` | Willow | Lime green | Drooping |
|
|
36
|
+
| `.md` `.json` `.yaml` | Cherry | Pink-purple | Sphere |
|
|
38
37
|
|
|
39
38
|
---
|
|
40
39
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
Honeytree tracks your coding streak — consecutive days where you use Claude Code.
|
|
44
|
-
|
|
45
|
-
- **Active streak**: The viewer and badge show your current streak count (e.g. `7-day streak`)
|
|
46
|
-
- **Broken streak**: Miss a day and your forest starts **wilting** — trees desaturate toward brown, and fog rolls in across the scene
|
|
47
|
-
- **Recovery**: Your next prompt resets the streak to 1 and clears the wilting immediately
|
|
48
|
-
|
|
49
|
-
The longer you go without coding, the worse it gets:
|
|
50
|
-
|
|
51
|
-
| Days idle | Effect |
|
|
52
|
-
|----------:|--------|
|
|
53
|
-
| 1 | Light desaturation, sparse fog |
|
|
54
|
-
| 2 | Noticeable browning, moderate fog |
|
|
55
|
-
| 3 | Heavy browning, dense fog |
|
|
56
|
-
| 4+ | Near-dead forest, thick fog |
|
|
40
|
+
## Controls
|
|
57
41
|
|
|
58
|
-
|
|
42
|
+
| Input | Action |
|
|
43
|
+
|-------|--------|
|
|
44
|
+
| Mouse drag | Rotate the forest |
|
|
45
|
+
| `+` / `=` | Zoom in |
|
|
46
|
+
| `-` / `_` | Zoom out |
|
|
47
|
+
| Arrow keys | Rotate camera |
|
|
48
|
+
| Hover | Show file path (displayed at top) |
|
|
49
|
+
| `r` | Rescan codebase |
|
|
50
|
+
| `q` | Quit |
|
|
59
51
|
|
|
60
52
|
---
|
|
61
53
|
|
|
62
|
-
##
|
|
63
|
-
|
|
64
|
-
Generate a badge for your GitHub README that shows your forest stats and links back to [Honeytree](https://github.com/Varun2009178/honeytree):
|
|
54
|
+
## Install Globally (optional)
|
|
65
55
|
|
|
66
56
|
```bash
|
|
67
|
-
honeytree
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
This creates a `honeytree-badge.svg` file in your current directory and prints the markdown to embed it:
|
|
71
|
-
|
|
72
|
-
```markdown
|
|
73
|
-
[](https://github.com/Varun2009178/honeytree)
|
|
57
|
+
npm install -g honeytree
|
|
58
|
+
honeytree
|
|
74
59
|
```
|
|
75
60
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
| State | Badge color | Example |
|
|
79
|
-
|-------|-------------|---------|
|
|
80
|
-
| Active streak | Green | `42 trees · 7d streak` |
|
|
81
|
-
| Wilting | Orange-red | `42 trees · wilting` |
|
|
82
|
-
| No streak data | Grey | `42 trees` |
|
|
83
|
-
|
|
84
|
-
Re-run `honeytree badge` any time to update the SVG with your latest stats. Commit it to your repo to keep it current.
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## FOREST.md
|
|
89
|
-
|
|
90
|
-
Generate a shareable markdown snapshot of your forest:
|
|
61
|
+
Or point it at a specific directory:
|
|
91
62
|
|
|
92
63
|
```bash
|
|
93
|
-
honeytree
|
|
64
|
+
honeytree view ~/my-project
|
|
94
65
|
```
|
|
95
66
|
|
|
96
|
-
This creates a `FOREST.md` in your current directory with:
|
|
97
|
-
|
|
98
|
-
- Your Honeytree badge (links to the [Honeytree repo](https://github.com/Varun2009178/honeytree))
|
|
99
|
-
- Stats: tree count, streak, biome
|
|
100
|
-
- A plain-text rendering of your forest (tree silhouettes, stars, ground)
|
|
101
|
-
- Total prompts and forest age
|
|
102
|
-
|
|
103
|
-
Commit `FOREST.md` to your repo root so your team can see the forest. When teammates see it, they can install Honeytree themselves — one install spreads to the whole team.
|
|
104
|
-
|
|
105
|
-
Run `honeytree badge` first to generate the SVG, then `honeytree md` to generate the markdown that embeds it.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Biomes
|
|
110
|
-
|
|
111
|
-
Your forest evolves visually as it grows — the sky, ground, and atmosphere all change:
|
|
112
|
-
|
|
113
|
-
| Trees | Biome | What changes |
|
|
114
|
-
|------:|-------|-------------|
|
|
115
|
-
| 0–9 | Clearing | Sparse stars, light ground |
|
|
116
|
-
| 10–24 | Grove | More stars, richer ground |
|
|
117
|
-
| 25–49 | Woodland | Dense canopy, varied starlight |
|
|
118
|
-
| 50–99 | Old Growth | Deep greens, warm starlight |
|
|
119
|
-
| 100+ | Ancient Forest | Richest palette, brightest sky |
|
|
120
|
-
|
|
121
|
-
Trees are never deleted. The forest only grows.
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
## Tree Species
|
|
126
|
-
|
|
127
|
-
Five species are randomly assigned when a tree is planted:
|
|
128
|
-
|
|
129
|
-
| Species | Look |
|
|
130
|
-
|---------|------|
|
|
131
|
-
| Oak | Wide, rounded canopy |
|
|
132
|
-
| Pine | Tall, triangular shape |
|
|
133
|
-
| Birch | Light trunk, bright leaves |
|
|
134
|
-
| Willow | Drooping canopy |
|
|
135
|
-
| Cherry | Pink blossoms |
|
|
136
|
-
|
|
137
|
-
Each species has 4 growth stages (seed, sapling, young, full). Existing trees grow a little with each new prompt.
|
|
138
|
-
|
|
139
67
|
---
|
|
140
68
|
|
|
141
|
-
##
|
|
142
|
-
|
|
143
|
-
| Command | Description |
|
|
144
|
-
|---------|-------------|
|
|
145
|
-
| `honeytree init` | Create forest and register Claude Code hook |
|
|
146
|
-
| `honeytree` | Launch the live viewer |
|
|
147
|
-
| `honeytree plant` | Plant a tree manually (normally runs via hook) |
|
|
148
|
-
| `honeytree badge` | Generate `honeytree-badge.svg` in current directory |
|
|
149
|
-
| `honeytree md` | Generate `FOREST.md` in current directory |
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Viewer
|
|
154
|
-
|
|
155
|
-
The viewer adapts to your terminal width — expand your terminal and new trees will spread across the full width.
|
|
156
|
-
|
|
157
|
-
Press `Ctrl+C` to exit. The viewer shows a summary of your forest when you close it.
|
|
158
|
-
|
|
159
|
-
### Reading the Stats Bar
|
|
160
|
-
|
|
161
|
-
Below your forest you'll see a stats bar like this:
|
|
69
|
+
## How It Works
|
|
162
70
|
|
|
163
|
-
|
|
164
|
-
honeytree · 42 trees · 7-day streak · ████████░░░░ next: oak [woodland]
|
|
165
|
-
```
|
|
71
|
+
A custom terminal-based 3D engine:
|
|
166
72
|
|
|
167
|
-
|
|
73
|
+
1. **Scanner** — walks your project, collects file metadata (size, extension, git history)
|
|
74
|
+
2. **Point cloud** — generates 3D points for each tree based on species shape
|
|
75
|
+
3. **Camera** — orbital rotation with perspective projection
|
|
76
|
+
4. **Rasterizer** — z-buffer depth sorting, block character shading, point splatting
|
|
168
77
|
|
|
169
|
-
|
|
170
|
-
|---------|-------------------|
|
|
171
|
-
| `42 trees` | Total trees in your forest — one planted per prompt, never deleted |
|
|
172
|
-
| `7-day streak` | Consecutive days you've used Claude Code. Resets to 1 if you skip a day |
|
|
173
|
-
| `wilting (2d idle)` | Appears instead of streak when you've been inactive — your forest is dying |
|
|
174
|
-
| `████████░░░░` | Progress bar toward the next milestone (10, 25, 50, 100, 250, 500, 1000 trees) |
|
|
175
|
-
| `next: oak` | The species of the next tree that will be planted |
|
|
176
|
-
| `[woodland]` | Your current biome — evolves as your tree count grows |
|
|
78
|
+
Everything renders to Unicode block characters with 24-bit true color. No WebGL, no canvas, no browser — just your terminal.
|
|
177
79
|
|
|
178
80
|
---
|
|
179
81
|
|
|
180
82
|
## Requirements
|
|
181
83
|
|
|
182
84
|
- Node.js 18+
|
|
183
|
-
-
|
|
85
|
+
- A terminal with true color support (most modern terminals)
|
|
184
86
|
|
|
185
87
|
## Links
|
|
186
88
|
|
package/bin/honeydew.js
CHANGED
|
@@ -14,11 +14,12 @@ if (command === "init") {
|
|
|
14
14
|
} else if (command === "md") {
|
|
15
15
|
const { generateForestMd } = await import("../src/markdown.js");
|
|
16
16
|
await generateForestMd();
|
|
17
|
-
} else if (!command) {
|
|
17
|
+
} else if (!command || command === "view") {
|
|
18
|
+
const targetDir = !command ? process.cwd() : process.argv[3] || process.cwd();
|
|
18
19
|
const { viewer } = await import("../src/viewer.js");
|
|
19
|
-
await viewer();
|
|
20
|
+
await viewer(targetDir);
|
|
20
21
|
} else {
|
|
21
22
|
console.error(`Unknown command: ${command}`);
|
|
22
|
-
console.error("Usage: honeytree [init|plant|badge|md]");
|
|
23
|
+
console.error("Usage: honeytree [init|plant|badge|md|view <dir>]");
|
|
23
24
|
process.exit(1);
|
|
24
25
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "honeytree",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Your codebase is a forest — 3D terminal visualization of any codebase",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"honeytree": "./bin/honeydew.js"
|
|
@@ -11,16 +11,17 @@
|
|
|
11
11
|
"src"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"test": "node --test test/*.test.js"
|
|
14
|
+
"test": "FORCE_COLOR=1 node --test test/*.test.js"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"cli",
|
|
18
18
|
"terminal",
|
|
19
19
|
"forest",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
20
|
+
"3d",
|
|
21
|
+
"codebase",
|
|
22
|
+
"visualization",
|
|
23
|
+
"point-cloud",
|
|
24
|
+
"ascii-art"
|
|
24
25
|
],
|
|
25
26
|
"repository": {
|
|
26
27
|
"type": "git",
|
|
@@ -33,8 +34,7 @@
|
|
|
33
34
|
"author": "Varun Nukala",
|
|
34
35
|
"license": "MIT",
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"chalk": "^5.4.1"
|
|
37
|
-
"honeytree": "^1.1.5"
|
|
37
|
+
"chalk": "^5.4.1"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=18"
|