Visualise a git repository's code history as a candlestick (K-line) chart in your terminal — the same way stock prices are charted.
Each commit is one candle. Adding lines is buying; removing lines is selling. Browse any file, directory, or the whole project.
git clone <this-repo>
cd kode
go install .Or build directly:
go build -o kode .# Analyse the current directory
kode
# Analyse a specific repository
kode /path/to/repo┌─────────────────┬───────────────────────────────────────────────┐
│ ▼ (project) │ src/main.go [10x] │
│ ▼ src/ │ O:320 H:380 L:310 C:350 V:120 │
│ main.go ← │ a1b2c3d 2024-03-15 10 commits │
│ util.go │ ▲ │
│ ▶ pkg/ │ │ ┃ ┃ │
│ go.mod │ │ ┃ ┃ █ ┃ │
│ go.sum │ │ █ ┃ █ █ │
│ │ │ █ █ █ █ │
│ │ └────────────────────────────────── │
│ │ ← → chart ↑ ↓ tree +/- zoom q quit │
└─────────────────┴───────────────────────────────────────────────┘
Left panel — file tree with expand/collapse.
Right panel — K-line chart for the selected node; OHLCV of the focused candle shown in the header.
| Key | Action |
|---|---|
↑ / ↓ |
Navigate the file tree |
Enter / Space |
Expand / collapse directory |
← / → |
Move cursor along the time axis |
+ |
Zoom in (finer granularity) |
- |
Zoom out (merge more commits per candle) |
q / Ctrl+C |
Quit |
| Field | Meaning |
|---|---|
| O Open | Line count before the commit |
| H High | Max of Open and Close |
| L Low | Min of Open and Close |
| C Close | Line count after the commit |
| V Volume | Lines added + deleted in the commit |
| Green | Close ≥ Open (lines grew) |
| Red | Close < Open (lines shrank) |
| Level | One candle represents |
|---|---|
| 1x (default) | 1 commit |
| 5x | 5 commits merged |
| 10x | 10 commits |
| 50x | 50 commits |
| 100x | 100 commits |
When merging: Open = first commit's line count, Close = last commit's line count, High/Low = extremes across the group, Volume = sum. The focused candle stays centred after each zoom.
Selecting a directory shows the combined line count of all files beneath it. Selecting the root node (project) shows the whole repository's trend.
Reads git log --numstat directly — no external storage required.