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. Star git-lrc to help devs discover the project. Do give it a try and share your feedback.
Last time I ended with two items left on the list.
Filter as you type โ Bubble Tea's
textinputcomponent from bubbles is sitting there waitingHidden file toggle โ show/hide dotfiles
Both ship today.
Press / and start typing, the list narrows instantly.
Press . and dotfiles appear.
Press it again and they vanish.
Filter as you type
The / key enters filter mode.
A text input appears at the bottom of the panel right above the hint bar, like vim's command line.
Type anything and only matching entries stay visible.
Press esc to clear it.
The component doing the work is textinput from charmbracelet/bubbles, a library of ready-made Bubble Tea components.
Wiring it into the model is straightforward:
type model struct {
// ...
filterInput textinput.Model
filtering bool
}
When / is pressed, focus the input and return textinput.Blink, that's the command that starts the cursor blinking animation:
case "/":
m.filtering = true
m.filterInput.Focus()
return m, textinput.Blink
While filtering, most keystrokes go straight to the textinput's own Update.
Navigation keys (โโ) are intercepted first so you can still move the cursor while typing:
if m.filtering {
switch msg.String() {
case "up", "k":
if m.cursor > 0 { m.cursor-- }
case "down", "j":
if m.cursor < len(m.entries)-1 { m.cursor++ }
case "esc":
m.filtering = false
m.filterInput.Blur()
m.filterInput.SetValue("")
m = m.withFilters()
default:
var tiCmd tea.Cmd
m.filterInput, tiCmd = m.filterInput.Update(msg)
m = m.withFilters()
return m, tiCmd
}
}
The tiCmd returned by m.filterInput.Update carries the next blink tick.
You have to pass it back out of Update, drop it and the cursor freezes.
Composable filters with withFilters()
The model now stores two entry slices: allEntries (everything os.ReadDir returned) and entries (what's visible after filters).
Every filter change calls withFilters() to recompute:
func (m model) withFilters() model {
q := strings.ToLower(m.filterInput.Value())
var filtered []os.DirEntry
for _, e := range m.allEntries {
if !m.showHidden && strings.HasPrefix(e.Name(), ".") {
continue
}
if q != "" && !strings.Contains(strings.ToLower(e.Name()), q) {
continue
}
filtered = append(filtered, e)
}
m.entries = filtered
if m.cursor >= len(m.entries) {
m.cursor = max(0, len(m.entries)-1)
}
return m
}
Hidden toggle and text filter compose naturally, you can filter by name with dotfiles visible or hidden simultaneously.
Adding a third filter later means touching one function.
withFilters returns a new model value rather than mutating in place, which fits cleanly with Bubble Tea's immutable-update pattern.
Hidden file toggle
The . key flips showHidden and calls withFilters():
case ".":
m.showHidden = !m.showHidden
m = m.withFilters()
needPreview = true
The hint bar reflects the current state so you always know where you are:
. show hidden โ dotfiles hidden
. hide hidden โ dotfiles visible
Navigating into a directory clears the filter, the search you ran in one folder doesn't carry over to its children.
Makes the behaviour predictable without any extra state to manage.
The vim-style bottom bar
The filter input sits at the bottom of the panel, one line above the hint bar.
That's the slot vim uses for its command line, /pattern, :w, :q so it feels immediately familiar.
When filtering is active the text input renders there instead of the hint.
When you press enter to confirm and leave filter mode, the active filter stays visible:
/main esc to clear
โ/โ โ/enter o open / filter . hide hidden p preview โ/h q
The hint never disappears, even in filter mode it's always one line below.
The layout calculates how many rows the file list consumed and pads blank lines to push both the filter bar and the hint bar to the very bottom of the terminal.
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:
HexmosTech
/
git-lrc
Free, Micro AI Code Reviews That Run on Commit
| ๐ฉ๐ฐ Dansk | ๐ช๐ธ Espaรฑol | ๐ฎ๐ท Farsi | ๐ซ๐ฎ Suomi | ๐ฏ๐ต ๆฅๆฌ่ช | ๐ณ๐ด Norsk | ๐ต๐น Portuguรชs | ๐ท๐บ ะ ัััะบะธะน | ๐ฆ๐ฑ Shqip | ๐จ๐ณ ไธญๆ |
git-lrc
Free, Micro AI Code Reviews That Run on Commit
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.
See It In Action
See git-lrc catch serious security issues such as leaked credentials, expensive cloud operations, and sensitive material in log statements
git-lrc-intro-60s.mp4
Why
- ๐ค AI agents silently break things. Code removed. Logic changed. Edge cases gone. You won't notice until production.
- ๐ Catch it before it ships. AI-powered inline comments show you exactly what changed and what looks wrong.
- ๐ Build aโฆ


Top comments (0)