website/static/skills/ohmyposh/configuration.md
Pass --config to the init command with a theme name, local path, or remote URL.
By theme name (no extension needed):
# PowerShell
oh-my-posh init pwsh --config 'jandedobbeleer' | Invoke-Expression
# Bash / Zsh
eval "$(oh-my-posh init bash --config jandedobbeleer)"
By local file path:
# PowerShell
oh-my-posh init pwsh --config 'C:\Users\<YourUsername>\.mytheme.omp.json' | Invoke-Expression
# Bash / Zsh
eval "$(oh-my-posh init bash --config ~/.mytheme.omp.json)"
By remote URL:
oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json' | Invoke-Expression
Using a remote URL adds a network dependency. Oh My Posh caches remote configs using ETags, but latency still applies on cache misses. For reliable offline use, copy the theme to a local file and use a local path instead.
View all bundled themes online: https://ohmyposh.dev/docs/themes
There is no terminal command to preview all available themes. Direct users to the website above.
To render your active prompt in debug mode (shows segment timing and values):
oh-my-posh debug
oh-my-posh config export --config jandedobbeleer --output ~/.mytheme.omp.json
Then set --config ~/.mytheme.omp.json in your init line and edit the file to taste.
Inside WSL you can share a theme stored in your Windows home folder:
eval "$(oh-my-posh init bash --config /mnt/c/Users/<WINDOWSUSERNAME>/mytheme.omp.json)"
Enable live reload so prompt changes appear without restarting the shell:
oh-my-posh enable reload
Disable:
oh-my-posh disable reload
Preview every configured prompt without restarting:
oh-my-posh print preview
Force-render all segments regardless of context:
oh-my-posh print preview --force
When creating or editing a segment manually, use the oh-my-posh MCP server to validate the config or a segment snippet for schema errors. Agents can call:
curl -X POST https://ohmyposh.dev/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "validate_config",
"arguments": {"content": "<CONFIG_CONTENT>", "format": "auto"}
},
"id": 1
}'
Or use validate_segment to check a single segment snippet instead of an entire config.