peektea brews on WSL ๐๐ต (and installs in one line)
Source: Dev.to
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.
Two things I kept putting off.
First: people on Windows asked if peektea runs on WSL. It does now.
Second: โbrew it from sourceโ is a terrible install story for a tool thatโs supposed to be minimal. Thatโs fixed too.
Demo here in case above preview not showing up.
WSL support
WSL is Linux. peektea runs on Linux. So far, so good.
The problem is o the key that opens files.
On a normal Linux machine, pressing o on an image launches feh or eog. On WSL there are no Linux GUI apps.
The call fails silently or prints an error.
peektea now detects WSL at startup:
func IsWSL() bool {
if os.Getenv("WSL_DISTRO_NAME") != "" {
return true
}
data, err := os.ReadFile("/proc/version")
return err == nil && strings.Contains(strings.ToLower(string(data)), "microsoft")
}
Enter fullscreen mode
Exit fullscreen mode
When WSL is detected, file opens route through wslview (from wslu) if itโs installed, otherwise fall back to explorer.exe:
func WSLOpener() string {
if _, err := exec.LookPath("wslview"); err == nil {
return "wslview"
}
if _, err := exec.LookPath("explorer.exe"); err == nil {
return "explorer.exe"
}
if _, err := os.Stat("/mnt/c/Windows/explorer.exe"); err == nil {
return "/mnt/c/Windows/explorer.exe"
}
return ""
}
Enter fullscreen mode
Exit fullscreen mode
Thereโs one more wrinkle: Windows programs canโt read Linux paths like /home/taco/file.png.
They need UNC paths like \\wsl.localhost\Ubuntu\home\taco\file.png.
WSL ships wslpath for exactly this:
func WindowsPath(path string) string {
out, err := exec.Command("wslpath", "-w", path).Output()
if err != nil {
return path
}
return strings.TrimSpace(string(out))
}
Enter fullscreen mode
Exit fullscreen mode
When the configured opener ends in .exe, the path gets converted before the command runs.
wslview handles conversion itself so it doesnโt need this, only raw explorer.exe does.
A minimal terminal file browser built with Bubble Tea.
Peek through your filesystem with arrow keys (or vim keys), then pour each file straight into the app youโve configured for it.
Demo
A quick peek before you steep:
Install
One-liner:
curl -fsSL https://raw.githubusercontent.com/lovestaco/peektea/master/scripts/install.sh | sh
Enter fullscreen mode
Exit fullscreen mode
Download a binary (no Go required) โ grab the latest release for your platform from the releases page:
Platform
File
Linux x86-64
peektea_*linux_amd64.tar.gz*
Linux arm64
peektea*linux_arm64.tar.gz*
macOS x86-64
peektea*darwin_amd64.tar.gz*
macOS Apple Silicon
peektea_darwin_arm64.tar.gz
Extract and put the peektea binary anywhere on your $PATH.
Install with Go:
go install github.com/lovestaco/peektea@latest
Enter fullscreen mode
Exit fullscreen mode
Build from source:
git clone https://github.com/lovestaco/peektea cd peektea make install
Enter fullscreen mode
Exit fullscreen mode
make install puts the binary in ~/go/bin and figures out $PATH for you:
- Already reachable โ done, nothing to do.
~/.local/bin is on your PATH โ symlinks the binary there, works immediately in the current shell.
-
Neither โ appends
~/go/binto your.bashrcโฆpeektea init on WSL
peektea init on a normal Linux machine asks you to pick a text editor, file manager, image viewer, and PDF viewer from whatโs installed.
On WSL there usually arenโt any Linux GUI apps. Asking you to pick between zero options isnโt a great experience.
So on WSL, init skips those categories and sets the Windows opener as the fallback instead of xdg-open.
You still get the full text editor setup (vim, nvim, nano those work fine in WSL), and the Windows side handles everything visual.
Demo here in case the above preview is not showing up.
While at it, peektea init got smarter in general.
If you decline the โalready exists, overwrite?โ prompt, it used to just exit.
Now it keeps your config and continues to the chafa check, so you can re-run peektea init any time just to install extras without nuking your setup.
And if chafa isnโt installed, it doesnโt just print the install command anymore.
It offers to run it:
โโ Image previews
chafa not found โ it renders images right in the terminal (the `p` preview).
Install it now? (sudo apt install -y chafa) [Y/n]:
Enter fullscreen mode
Exit fullscreen mode
It detects your package manager (apt, dnf, pacman, zypper, apk, brew) and runs the right command. Bare enter means yes.
Installation
The other thing that needed fixing: the only install method was cloning the repo and running make install.
That requires Go, git, and knowing where ~/go/bin is.
Too much friction for a tool thatโs supposed to just work.
peektea now ships pre-built binaries for Linux and macOS (x86-64 and arm64) on every release.
One-liner:
curl -fsSL https://raw.githubusercontent.com/lovestaco/peektea/master/scripts/install.sh | sh
Enter fullscreen mode
Exit fullscreen mode
The script detects your OS and architecture, pulls the right binary from the latest release, and installs it to ~/.local/bin or /usr/local/bin whichever is already on your PATH.
With Go:
go install github.com/lovestaco/peektea@latest
Enter fullscreen mode
Exit fullscreen mode
peektea version now works correctly regardless of how you installed it.
When installed via go install, the binary reads its own module version from debug.ReadBuildInfo().
When built with make install, the version comes from git describe via ldflags.
Either way:
peektea version
# peektea v0.2.1 (linux/amd64)
Enter fullscreen mode
Exit fullscreen mode
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:
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โฆ




