PowerShell prompts and a live terminal status line built from the same reusable blocks. Display project context, command results, and system activity in either surface. A native CLI brings the same renderer and built-in blocks to Bash, Zsh, and Fish, without requiring PowerShell or a .NET runtime.
- Prompt layouts — one or two rows, left and right groups, and compact transient prompts.
- Status line — a separate row of system activity and other blocks on supported terminals.
- Appearance — gradients, Powerline or rounded segments, and Nerd Font, Unicode, or plain text icons.
- Reusable blocks — built-in blocks and custom PowerShell script blocks for both surfaces.
- Background updates — slow blocks retain their last result; updates pause after a minute of inactivity.
- Shell integration — prompt and command markers, exit status, and working-directory reporting for supported terminals, with optional terminal progress.
Importing the module does not change the prompt. Enable the prompt and status line separately.
Run Show-Examples.ps1 to preview these layouts in one terminal. These images capture the preview commands' rendered output; command text, exit codes, and durations are examples. Rows labelled "sample" use fixed session counts, weather, uptime, CPU, and RAM values.
Install-Module StatuslineDownload the package for your platform from
GitHub Releases: Linux packages
are available as .deb, .rpm, and .tar.gz; macOS ARM64 as .pkg and .tar.gz.
Install the package, or extract the archive to a directory on PATH, then
initialize StatusLine in your shell:
# Bash
eval "$(statusline init bash)"# Zsh
eval "$(statusline init zsh)"# Fish
statusline init fish | sourceThese commands enable the default prompt for the current session. Use --config PATH
to load a JSON configuration, or --install to save the initialization hook in your
shell profile. The live status bar is enabled separately and requires a supported
Unix terminal such as Contour. The prompt also works in terminals without status-bar support.
See the CLI guide for installation, persistent setup, supported blocks, and configuration examples, including a gradient status bar with OS and shell version.
| Command | Purpose |
|---|---|
| Enable-StatusLine | Start or reconfigure the live status line |
| Disable-StatusLine | Stop status-line updates |
| Enable-Prompt | Install or reconfigure your prompt |
| Disable-Prompt | Restore your previous prompt |
| New-StatusLineBlock | Create a reusable block for either surface |
| Show-Prompt / Show-StatusLine | Preview settings without enabling them |
| Measure-Codepoint | Inspect Unicode width and grapheme measurements |
| Show | Blocks |
|---|---|
| Project context | Directory, Git, Package, VirtualEnv |
| Command and session information | Status, Duration, HistoryId, Errors, StackCount, NestedPrompt, Runspaces |
| System activity | Cpu, Gpu, Network, SystemMemory, ProcessMemory, Battery |
| Runtime versions | Shell, PowerShell, Node, Python, Dotnet, Go, Rust, Java, Ruby |
| Environment and services | User, Host, Os, Elevation, Aws, Azure, Kubernetes, Docker |
| Time and weather | Clock, Date, Uptime, Weather |
Blocks with nothing to show are omitted. See the block reference for details and platform availability.
The current source targets .NET 10 and requires PowerShell 7.6 or newer. Build from the repository root, then import the module:
./build.ps1
Import-Module ./output/StatusLine.psd1
Enable-Prompt./build.ps1 and StatusLine.slnx build and test the PowerShell module only.
The module ships one StatusLine.dll; native CLI publishing is a separate,
explicit operation.
Source lives under src/Core (shared blocks and rendering), src/PowerShell
(module commands and host integration), and src/Cli (native executable and
shell adapters). Both host projects compile Core directly, without a separate
Core assembly. New files in each source folder are included automatically.
Module tests remain under tests; CLI tests live under tests/Cli.
For Nerd Font icons and segment separators, use a patched font such as Cascadia Mono NF.
Prefer a plain look? Try Enable-Prompt -IconSet None -Style Plain.
The default prompt shows Directory, Git, Status and Duration. The default statusline shows Cpu, ProcessMemory and Clock, keeping the two surfaces complementary. All other blocks remain available when selected explicitly.
Keep your working directory and branch on the left, with command duration and a clock on the right. Transient mode compacts previous prompts after you press Enter.
$promptOptions = @{
Left = 'Directory', 'Git', 'Errors'
Right = 'Duration', 'Clock'
StartColor = '#275DAD'
EndColor = '#E8A33D'
Transient = $true
}
Enable-Prompt @promptOptionsTo give elevated sessions their own gradient, add these optional entries to the splat:
$promptOptions.ElevatedColorStart = '#ff7b00ff'
$promptOptions.ElevatedColorEnd = '#cc2200'
Enable-Prompt @promptOptionsSupply both colors or neither. This works with or without an Elevation block;
unelevated sessions keep the normal StartColor and EndColor.
Right-hand blocks automatically get a context row above input, leaving the editing line clear.
The optional ╭─ / ╰─ markers connect the rows when -ConnectRows is enabled.
Add shared blocks beside the input marker with Input.
$promptOptions = @{
Left = 'Directory', 'Git', 'VirtualEnv'
Right = 'Status', 'Duration'
Input = 'Errors', 'NestedPrompt'
ConnectRows = $true
}
Enable-Prompt @promptOptionsOn a terminal with host-writable status-line support, such as Contour, keep system activity visible separately from your prompt. The middle group stays centered as other values change.
$statusLineOptions = @{
Left = 'Duration', 'Status'
Center = 'Weather', 'Uptime'
Right = 'Network', 'Cpu', 'SystemMemory', 'Clock'
StartColor = '#244A73'
EndColor = '#62C4A6'
}
Enable-StatusLine @statusLineOptionsWeather is opt-in and requests data from wttr.in; -WeatherLocation chooses the location.
Duration is captured by the prompt, so enable both to show it on the statusline. The prompt can be
used independently of status-line support. Contour users should read the
scrollback setting.
Create a block, then reuse it in your prompt or statusline. Built-in blocks can have their own colors:
$duration = New-StatusLineBlock -Kind Duration -Foreground White -Background '#1034A6'
$processes = New-StatusLineBlock -ScriptBlock {
"Processes: $((Get-Process).Count)"
} -IntervalMilliseconds 5000 -Foreground '#FFAA33'
Enable-Prompt -Left @('Directory', 'Git', $processes) -Right $durationCustom scripts refresh in the background only while selected. See custom blocks for session information, styling and timeouts. Keep the same definition object to share its cached script output between the prompt and statusline. No registration or unregister step is needed.
- Native CLI guide — Bash, Zsh, and Fish setup, configuration examples, supported blocks, and configuration examples.
- Configuration guide — layouts, colors, directory display, idle behavior, terminal compatibility, and troubleshooting.
- File output for Contour — an alternative to host-writable output.
- Command reference and
Get-Help Enable-Prompt -Examples.

