# Oh My Posh — Cross-Platform Prompt Theme Engine > Oh My Posh is a customizable cross-platform prompt theme engine written in Go that works with any shell including PowerShell, Bash, Zsh, Fish, and Nushell. ## Install Save as a script file and run: # Oh My Posh — Cross-Platform Prompt Theme Engine ## Quick Use ```bash # Install (Linux/macOS) curl -s https://ohmyposh.dev/install.sh | bash -s # Initialize in Bash eval "$(oh-my-posh init bash --config ~/.poshthemes/jandedobbeleer.omp.json)" ``` ## Introduction Oh My Posh is a prompt theme engine that renders informative, visually consistent shell prompts across every major platform and shell. Built as a single Go binary with no runtime dependencies, it brings a unified prompt experience whether you use PowerShell on Windows or Zsh on macOS. ## What Oh My Posh Does - Renders customizable shell prompts using segment-based configuration files - Ships with 100+ built-in themes in JSON, YAML, or TOML format - Displays git status, language versions, cloud context, and system metrics - Supports PowerShell, Bash, Zsh, Fish, Cmd, and Nushell - Provides Nerd Font icon rendering for visual indicators in terminal prompts ## Architecture Overview Oh My Posh runs as a compiled Go binary invoked by the shell's prompt hook on each command. It reads a theme configuration file, evaluates segment conditions, gathers environment data such as git state and language versions, then outputs an ANSI-escaped string. Segments render in configurable blocks (left, right, newline) with customizable separators and color schemes. ## Self-Hosting & Configuration - Install via Homebrew, winget, Scoop, or direct binary download - Theme files use JSON, YAML, or TOML with a well-documented schema - Each segment is independently toggled, styled, and conditionally displayed - Custom themes can be built from scratch or derived from built-in presets - Shell integration requires adding a single init line to your profile file ## Key Features - Cross-platform: identical prompt rendering on Windows, macOS, and Linux - Shell-agnostic: one configuration works across all supported shells - Transient prompt: displays a simplified prompt for previous command lines - Tooltips: context-sensitive right-aligned prompts triggered by specific commands - Palette support: define reusable color variables across your theme ## Comparison with Similar Tools - **Starship** — Rust-based, cross-platform; Oh My Posh offers deeper theming control and PowerShell-native origins - **Powerlevel10k** — Zsh-only with instant prompt; Oh My Posh covers all shells with one config - **Tide** — Fish-only theme framework; Oh My Posh is shell-agnostic - **Pure** — Minimal Zsh prompt; Oh My Posh provides richer segment types and conditional logic ## FAQ **Q: Does Oh My Posh slow down my prompt?** A: It is compiled Go optimized for low latency. Most prompts render in under 50 ms even with multiple segments enabled. **Q: Do I need Nerd Fonts?** A: Nerd Fonts are recommended for icon glyphs but not required. Themes can fall back to plain-text indicators. **Q: Can I use it inside VS Code or other IDE terminals?** A: Yes. Set your IDE terminal font to a Nerd Font and add the init line to your shell profile. **Q: How do I preview or switch themes?** A: Run `oh-my-posh font install` for fonts and `oh-my-posh init --config ` to switch. A built-in theme browser is available on the docs site. ## Sources - https://github.com/JanDeDobbeleer/oh-my-posh - https://ohmyposh.dev/docs --- Source: https://tokrepo.com/en/workflows/asset-260f0073 Author: Script Depot