Skip to main content

Streaming

Beta Feature

Streaming is a beta feature under active development. The behavior and configuration may change in future releases.

Streaming renders your prompt progressively instead of waiting for every segment to finish. The prompt is displayed immediately, slow segments show a placeholder, and the prompt updates in place as their data becomes available.

In addition, streaming runs a single background oh-my-posh serve process per shell session which renders every prompt on request. This removes the process start per prompt (the largest cost on Windows) and keeps segment caches warm in memory, making every prompt faster. The process lives and dies with your shell session, restarts automatically when it fails, and Oh My Posh falls back to the classic per-prompt rendering when it can't be used.

Configuration

Set the streaming property to a positive integer representing the timeout in milliseconds for pending segments. Segments that don't complete within the timeout render the segment's placeholder property (default ...) and update in place once resolved.

{
"streaming": 100
}
NameTypeDefaultDescription
streamingintenable streaming mode with a timeout in milliseconds for pending segments
placeholderstring...segment level - the text to display while the segment is still resolving
warning

Setting a very low timeout (e.g., 0 or 50ms) may cause visual glitches depending on the shell's rendering capabilities. We recommend starting with a timeout of around 100ms and adjusting based on your experience.

Shell support

Streaming is supported in powershell, zsh, fish and cmd. For any other shell, the setting has no effect and prompts render the classic way. The available functionality differs per shell:

Requires PowerShell 6 or later for the background process; Windows PowerShell 5.1 and sessions in ConstrainedLanguage mode use a streaming process per prompt instead.

  • live updates: the prompt repaints in place as pending segments resolve, even while you're already typing
  • transient prompt: streamed along with the primary prompt and cached, so pressing Enter renders the transient prompt without starting a process
  • background process: started during shell initialization so the first prompt is fast, restarted automatically when it fails, and abandoned for the session in favor of per-prompt rendering after repeated failures

Feedback

If you encounter issues or have suggestions for the streaming feature, please open an issue on the Oh My Posh GitHub repository.