Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsMay 19, 2026·3 min de lectura

Oh My Posh — Cross-Platform Customizable Shell Prompt Engine

A prompt theme engine that works with any shell on any OS, rendering rich segments for Git, language versions, cloud context, and system status using Nerd Font icons.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Native · 96/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Prompt
Instalación
Single
Confianza
Confianza: Established
Entrada
Oh My Posh
Comando CLI universal
npx tokrepo install 5dbe8e9e-539f-11f1-9bc6-00163e2b0d79

Introduction

Oh My Posh is a shell-agnostic prompt renderer that transforms the terminal prompt into an informative, visually rich status line. It displays Git branch and status, language runtime versions, Kubernetes context, execution time, and dozens of other segments. Written in Go, it runs on Bash, Zsh, Fish, PowerShell, cmd, and Nushell across macOS, Linux, and Windows.

What Oh My Posh Does

  • Renders a fully customizable prompt for any shell on any operating system
  • Displays segments for Git status, Node/Python/Go/Rust versions, cloud context, and more
  • Supports 100+ built-in themes with live preview via the theme browser
  • Uses Nerd Font glyphs for icons, separators, and powerline-style segments
  • Provides a configuration-driven approach using JSON, YAML, or TOML theme files

Architecture Overview

Oh My Posh is a single Go binary that the shell calls before rendering each prompt. It reads a theme configuration file that defines segments, colors, and layout. Each segment is a Go module that queries system state (Git repo, environment variables, running processes) and formats output. The engine supports primary, secondary, and transient prompts, plus right-aligned segments. Rendering targets ANSI escape sequences compatible with all modern terminal emulators.

Self-Hosting & Configuration

  • Install via Homebrew, winget, Scoop, or direct download from GitHub releases
  • Add the eval or oh-my-posh init line to your shell's RC file
  • Choose a theme from the built-in gallery or create a custom .omp.json file
  • Enable specific segments by adding them to the theme config with their properties
  • Use oh-my-posh debug to troubleshoot segment detection and rendering issues

Key Features

  • Works identically across Bash, Zsh, Fish, PowerShell, cmd, and Nushell
  • 100+ community themes with a visual browser at ohmyposh.dev
  • Tooltips that appear contextually when specific tools are detected
  • Transient prompt support to keep scrollback clean
  • Extensible with custom segments via shell commands or HTTP endpoints

Comparison with Similar Tools

  • Starship — Rust-based cross-shell prompt; Oh My Posh offers more theming depth and segment options
  • Powerlevel10k — Zsh-only prompt theme; Oh My Posh works across all shells and OS platforms
  • Pure — minimalist Zsh prompt; Oh My Posh provides richer information density
  • Oh My Zsh — Zsh framework with prompt themes; Oh My Posh is shell-agnostic and standalone
  • Tide — Fish-specific prompt; Oh My Posh brings comparable features to every shell

FAQ

Q: Do I need Nerd Fonts installed? A: Themes that use icons require a Nerd Font patched terminal font. Minimal themes work without them.

Q: Does it slow down my shell? A: Prompt rendering typically takes 20-50ms. The --debug flag shows timing per segment for optimization.

Q: Can I use it alongside Oh My Zsh? A: Yes. Oh My Posh replaces only the prompt theme; Oh My Zsh plugins and aliases continue to work.

Q: How do I create a custom theme? A: Copy an existing .omp.json file and modify segments, colors, and icons. The documentation covers every segment property.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados