TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/romkatv/powerlevel10k/llms.txt
Use this file to discover all available pages before exploring further.
p10k command is the single user-facing CLI installed by Powerlevel10k. It exposes every runtime capability of the theme — from launching the configuration wizard to controlling which prompt segments are visible — through a set of well-defined subcommands. All Powerlevel10k configuration is read from ~/.p10k.zsh, and p10k is your primary tool for generating, reloading, and dynamically adjusting that configuration without restarting your shell.
Subcommands
p10k configure
Launches the interactive configuration wizard, which walks you through a series of visual questions and writes a fully-commented~/.p10k.zsh based on your answers. If the wizard has already run before, the file is overwritten.
The wizard runs automatically on the first Zsh startup if no
POWERLEVEL9K_* parameters are defined. Set POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true in ~/.zshrc to suppress this auto-launch.POWERLEVEL9K_CONFIG_FILE environment variable:
p10k reload
Re-applies the prompt configuration. You must call this after modifying anyPOWERLEVEL9K_* parameter in an already-running interactive shell (as opposed to editing ~/.p10k.zsh before a new session).
p10k segment
Renders a single user-defined prompt segment. This command is designed to be called inside a customprompt_<name> function during prompt rendering — it cannot be used from the command line directly.
core, add core to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS in ~/.p10k.zsh.
Options
| Flag | Description |
|---|---|
-s STATE | Segment state suffix (uppercase). Different states can have different colors and icons via POWERLEVEL9K_<NAME>_<STATE>_FOREGROUND etc. İ is normalized to I. |
-b BG | Background color. Accepts a color name (blue), 0–255 index, or #RRGGBB. An empty value means transparent. Default is black (0). |
-f FG | Foreground color. Same format as -b. Empty means the terminal default. |
-i ICON | Icon or glyph displayed before the text content. |
-r | Treat the icon as a symbolic reference (e.g., LOCK_ICON) to be resolved by Powerlevel10k. |
+r | Icon is already resolved and should be printed literally (default). |
-e | The text content (-t) undergoes parameter expansion and process substitution. Advanced feature — use with caution. |
+e | Do not expand text content (default). |
-c COND | Condition: if this expression expands to an empty string or false, the segment is hidden. Defaults to 1 (always shown). |
-t TEXT | Main text content of the segment. Undergoes prompt expansion (e.g., %F{blue}%*%f). Default is empty. |
-h | Print usage help and exit. |
p10k display
Shows, hides, or toggles individual prompt parts at runtime without editing~/.p10k.zsh. Changes take effect immediately in ZLE (the line editor), making this ideal for key bindings.
Options
| Flag | Description |
|---|---|
-r | Redisplay (reset) the prompt. |
-a | Dump the current display state into the reply associative array. |
-h | Print help and exit. |
NAME=show | Show the named part. |
NAME=hide | Hide the named part. |
NAME=show,hide | Cycle through the listed states on each invocation. |
Part names
| Pattern | Matches |
|---|---|
empty_line | The empty separator line between prompts |
ruler | The ruler line (if configured) |
N | Entire prompt line N (1-based; negative counts from bottom) |
N/left | Left prompt on line N |
N/right | Right prompt on line N |
N/gap | Gap between left and right prompts on line N |
N/left_frame | Left frame on line N |
N/right_frame | Right frame on line N |
N/left/S | Segment S within the left prompt on line N |
N/right/S | Segment S within the right prompt on line N |
*/kubecontext matches every kubecontext segment regardless of which prompt line it is on.
p10k help
Prints usage documentation forp10k or for a specific subcommand.
p10k finalize
Marks the end of the instant-prompt initialization phase. This is called internally — Powerlevel10k’s instant-prompt snippet adds it to~/.zshrc automatically. You do not need to call it manually.
Calling
p10k finalize outside of the instant prompt context (i.e., when instant prompt is not active) is a no-op. Calling it with the wrong argument prints an error.p10k clear-instant-prompt
Clears any content that was printed by the instant prompt. Useful if you need to programmatically remove the placeholder prompt that appears before Zsh has fully initialized.0.
Key Configuration Variables
The followingPOWERLEVEL9K_* parameters govern the overall behaviour of the theme. Set them in ~/.p10k.zsh (generated by p10k configure) or in ~/.zshrc before sourcing the theme.
Ordered list of segment names to display on the left side of the prompt. Example:
Ordered list of segment names to display on the right side of the prompt. Example:
Controls the instant prompt feature.
verbose— enables instant prompt and prints a warning when console output is detected during initialization.quiet— enables instant prompt without the warning.off— disables instant prompt entirely.
Controls the transient prompt feature, which replaces previous prompts with a condensed version to reduce scrollback clutter.
always— always use transient prompt.same-dir— use transient prompt only when staying in the same directory.off— disabled.
Determines which icon set is used.
nerdfont-complete— all Nerd Fonts glyphs.nerdfont-v3— Nerd Fonts v3 glyphs.powerline— Powerline symbols only.ascii— ASCII-only; works with every font.
Path to the configuration file written by
p10k configure. Defaults to ${ZDOTDIR:-~}/.p10k.zsh. Override this variable before sourcing the theme to use a different location.Set to
true to prevent the configuration wizard from launching automatically when no POWERLEVEL9K_* parameters are defined.Set to
false to enable automatic prompt refresh whenever a POWERLEVEL9K_* parameter is changed, without needing to call p10k reload. Adds a small overhead to every prompt.An ERE regex. When set, the named segment is shown only while the command currently being typed matches this regex. Example:
Per-segment color overrides. Colors can be specified as a 0–255 index or as a
#RRGGBB hex string (requires truecolor terminal).