Feb 21, 2026 · 3 min read

AI Autocomplete Inside PowerShell with Gemini

aitoolingpowershell

The idea

Normal TAB complete is history and paths. I wanted the shell to guess intent.

Flow

You type → press TAB → PSReadLine captures the buffer → Gemini predicts the full command → buffer is replaced.

Why PowerShell

CMD does not let you inject custom TAB logic. PowerShell + PSReadLine key handlers do.

Latency

The hard part is feel: 400–800ms round-trips are noticeable. Better strategies: double-TAB only, or local history first with AI as fallback.

Syntax-based complete is rules. Intent-based complete is probability — and latency is part of the UX.

Read on Medium