Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is free and source-available on Github. , Charmbracelet's Go TUI framework.
The result is .
Which is a fancy way of saying your entire app boils down to three things:
Model — the state of your program
Update — a function that takes events and returns a new model
View — a function that renders the model to a string
No mutation, no spilled state.
Update and View are pure functions.
The framework handles the event loop, terminal I/O, and all the redrawing so you don't have to.
You just describe what things should look like and it does the dishes.
The model
type model struct {
dir string
entries []os.DirEntry
cursor int
err error
}
That's the entire state of peektea.
The current directory, what's in it, where the cursor sits, and whether something went sideways.
When you navigate into a new directory you don't mutate anything in place, Update hands back a fresh model with the new values.
The update loop (where the tea gets stirred)
Every keypress shows up as a tea.KeyMsg.
You pattern-match on it and return the next model:
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
switch msg.String() {
case "right", "l", "enter":
if len(m.entries) > 0 && m.entries[m.cursor].IsDir() {
next := filepath.Join(m.dir, m.entries[m.cursor].Name())
entries, err := os.ReadDir(next)
if err == nil {
m.dir = next
m.entries = entries
m.cursor = 0
}
}
// ...
}
}
return m, nil
}
That second return value, tea.Cmd, is a function that runs asynchronously and produces the next message.
Here Update is fully synchronous, so we just return nil.
But the moment you want to fetch data or read files in the background, Cmd is how you do it without blocking the UI.
Think of it as putting the kettle on and getting pinged when it's ready, instead of standing there watching it.
One small touch worth calling out: when you go back up to the parent directory, the cursor lands right back on the folder you just came out of, instead of snapping to the top.
It's just a little loop over the entries to find the matching name but it makes navigation feel natural instead of jarring.
The view
Rendering is a pure string transformation.
Bubble Tea calls View() after every Update and redraws the terminal for you.
Styling comes from
What I'd steep next
This is where the ncdu-style dream actually starts brewing:
Open files in your editor/app —enteron a file shells out to vim, or hands it to Nautilus/Nemo/xdg-openbased on type
Image previews in the terminal — render images inline via Kitty/iTerm protocols orchafa
File previews — split the screen, show the selected file's content on the right
Filtering — type to narrow the list (Bubble Tea ships atextinputin
AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.
git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*
Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.
⭐ Star it on GitHub:
Free, Micro AI Code Reviews That Run on Commit
| | | | | |
↗ Original-Artikel auf dev.to lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.Wie bewertest du diesen Beitrag?1 Klick FeedbackTeilen mit Netzwerk & Team:Hat Ihnen dieser Tipp / Anleitung geholfen?Community-Analysen & Experten-Meinungen 0
Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf „ Eigene Analyse verfassen“!Community Pulse: Relevanz-Einschätzung1 Klick Experten-Votum🔴 Akute Relevanz 45%🟡 In Evaluierung 24%🟢 Keine Auswirkung 12%Spannende Innovation 19%Port 8095 EngineVerwandte Story-Cluster & Quellen (Vektor-KI)
Tipp: Mit Pfeiltasten [ ← ] und [ → ] blättern
Ähnliche Beiträge
🔍 Verwandte NewsAuch interessante Nachrichten peektea: brewing a terminal file browser with Bubble Tea
Thematisch verwandte Begriffe: peektea, brewing, terminal, file · 6 Treffer
🔧 AI Nachrichten MacDailyNewsApple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
🔧 AI Nachrichten The Mac ObserverGPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
Laden...Videos werden geladen ...
Laden...Beiträge werden geladen ...
Laden...Videos werden geladen ...
Laden...Beiträge werden geladen ...
Laden...Videos werden geladen ...
Laden...Beiträge werden geladen ...
Laden...Videos werden geladen ...
Laden...Beiträge werden geladen ...
Laden...Videos werden geladen ...
SOCIAL SHARE CARD GENERATOR