Convert Figma logo to code with AI

JanDeDobbeleer logooh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer

16,680
2,338
16,680
25

Top Related Projects

A Zsh theme

172,325

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

:rocket::star: Minimalistic, powerful and extremely customizable Zsh prompt

44,121

☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!

14,343

Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.

Quick Overview

Oh My Posh is a highly customizable prompt theme engine for any shell. It allows users to create and use custom prompts with various information such as Git status, battery level, and execution time. Oh My Posh is designed to work across multiple platforms and shells, providing a consistent and visually appealing command-line experience.

Pros

  • Highly customizable with a wide range of built-in and community-created themes
  • Cross-platform compatibility (Windows, macOS, Linux)
  • Supports multiple shells (PowerShell, Bash, Zsh, Fish, and more)
  • Actively maintained with frequent updates and improvements

Cons

  • Requires installation of a Nerd Font for full functionality
  • Can slightly increase shell startup time, especially with complex themes
  • Learning curve for creating custom themes and configurations
  • May require additional setup steps depending on the shell and operating system

Getting Started

  1. Install Oh My Posh:
# On Windows (PowerShell)
winget install JanDeDobbeleer.OhMyPosh -s winget

# On macOS
brew install jandedobbeleer/oh-my-posh/oh-my-posh

# On Linux
curl -s https://ohmyposh.dev/install.sh | bash -s
  1. Install a Nerd Font (e.g., Meslo LGM NF) and configure your terminal to use it.

  2. Add Oh My Posh to your shell configuration file:

# For Bash (add to ~/.bashrc)
eval "$(oh-my-posh init bash)"

# For PowerShell (add to $PROFILE)
oh-my-posh init pwsh | Invoke-Expression

# For Zsh (add to ~/.zshrc)
eval "$(oh-my-posh init zsh)"
  1. Choose a theme (e.g., "jandedobbeleer") and add it to your configuration:
eval "$(oh-my-posh init bash --config ~/.poshthemes/jandedobbeleer.omp.json)"
  1. Restart your shell or source your configuration file to see the changes.

Competitor Comparisons

A Zsh theme

Pros of powerlevel10k

  • Faster performance and lower CPU usage
  • More customizable prompt segments and icons
  • Better support for Zsh-specific features

Cons of powerlevel10k

  • Limited to Zsh shell environments
  • Steeper learning curve for configuration
  • Less cross-platform compatibility

Code Comparison

powerlevel10k configuration:

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
  dir
  vcs
  newline
  prompt_char
)

oh-my-posh configuration:

{
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        "path",
        "git"
      ]
    }
  ]
}

Both projects aim to enhance the command-line experience with customizable prompts. powerlevel10k excels in Zsh environments, offering superior performance and extensive customization options. However, it's limited to Zsh and may require more effort to set up.

oh-my-posh, on the other hand, provides cross-platform support and works with multiple shells, making it more versatile. It's generally easier to configure but may not offer the same level of performance optimization as powerlevel10k in Zsh environments.

The code comparison shows the different approaches to configuration. powerlevel10k uses Zsh-specific syntax, while oh-my-posh employs a JSON-based configuration that's more shell-agnostic.

172,325

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

Pros of Oh My Zsh

  • Extensive plugin ecosystem with a wide range of pre-configured options
  • Large and active community, providing support and continuous development
  • Designed specifically for Zsh, offering deep integration and optimization

Cons of Oh My Zsh

  • Can be slower to load compared to Oh My Posh, especially with many plugins
  • Limited to Zsh shell, not cross-platform like Oh My Posh
  • Configuration can be more complex for beginners

Code Comparison

Oh My Zsh configuration example:

plugins=(git docker kubectl)
ZSH_THEME="agnoster"
source $ZSH/oh-my-zsh.sh

Oh My Posh configuration example:

oh-my-posh init pwsh --config ~/.poshthemes/jandedobbeleer.omp.json | Invoke-Expression

Both projects aim to enhance the terminal experience, but Oh My Zsh focuses on Zsh customization with a plugin-based approach, while Oh My Posh provides a cross-shell prompt customization tool. Oh My Zsh offers a more comprehensive ecosystem for Zsh users, whereas Oh My Posh provides flexibility across different shells and operating systems.

:rocket::star: Minimalistic, powerful and extremely customizable Zsh prompt

Pros of Spaceship Prompt

  • Highly customizable with a wide range of built-in sections
  • Lightweight and fast, with minimal impact on shell performance
  • Extensive documentation and active community support

Cons of Spaceship Prompt

  • Limited to Zsh shell, not cross-platform like Oh My Posh
  • Requires manual configuration for some advanced features
  • Less frequent updates compared to Oh My Posh

Code Comparison

Spaceship Prompt configuration:

SPACESHIP_PROMPT_ORDER=(
  user
  dir
  host
  git
  node
  ruby
  xcode
  swift
  golang
  php
  rust
  docker
  venv
  pyenv
)

Oh My Posh configuration:

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        "path",
        "git",
        "node",
        "python",
        "golang"
      ]
    }
  ]
}

Both prompts offer extensive customization options, but Oh My Posh uses a JSON-based configuration, while Spaceship Prompt uses Zsh syntax. Oh My Posh provides cross-platform support and more frequent updates, while Spaceship Prompt excels in its lightweight design and Zsh-specific optimizations.

44,121

☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!

Pros of Starship

  • Cross-shell compatibility (works with Bash, Zsh, Fish, and more)
  • Faster performance, especially on large repositories
  • Minimal configuration required out-of-the-box

Cons of Starship

  • Less customizable than Oh My Posh
  • Fewer built-in themes compared to Oh My Posh
  • Limited support for Windows-specific features

Code Comparison

Starship configuration (TOML):

[character]
success_symbol = "[➜](bold green)"
error_symbol = "[✗](bold red)"

[git_branch]
symbol = "🌱 "
truncation_length = 4

Oh My Posh configuration (JSON):

{
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        {
          "type": "git",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#193549",
          "background": "#FFFB38"
        }
      ]
    }
  ]
}

Both Starship and Oh My Posh are popular prompt customization tools, but they cater to different user preferences. Starship focuses on simplicity and cross-platform compatibility, while Oh My Posh offers more extensive customization options, particularly for Windows users. The choice between the two depends on individual needs and the specific environment in which they'll be used.

14,343

Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.

Pros of Powerline

  • More established project with a longer history and larger community
  • Supports a wider range of shells and applications beyond just the command prompt
  • Highly customizable with extensive configuration options

Cons of Powerline

  • Can be more complex to set up and configure
  • Written in Python, which may not be ideal for all environments
  • May have higher resource usage compared to Oh My Posh

Code Comparison

Powerline configuration (Python):

{
    "segments": {
        "left": [
            {
                "function": "powerline.segments.common.net.hostname",
                "priority": 10
            },
            {
                "function": "powerline.segments.common.env.user",
                "priority": 30
            },
            {
                "function": "powerline.segments.common.env.virtualenv",
                "priority": 50
            }
        ]
    }
}

Oh My Posh configuration (JSON):

{
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        {
          "type": "session",
          "style": "diamond",
          "foreground": "#ffffff",
          "background": "#61AFEF"
        },
        {
          "type": "path",
          "style": "powerline",
          "foreground": "#ffffff",
          "background": "#C678DD"
        }
      ]
    }
  ]
}

Both projects offer powerful customization options, but Oh My Posh focuses specifically on enhancing the command prompt experience, while Powerline provides a broader range of functionality across various applications.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Oh My Posh logo – Prompt theme engine for any shell

MIT license badge

Build Status badge

Release version number badge

Documentation link badge ohmyposh.dev

Number of GitHub Downloads badge

This repo was made with love using GitKraken.

GitKraken shield

Join the community

Mastodon badge

Discord badge

What started as the offspring of oh-my-posh2 for PowerShell resulted in a cross platform, highly customizable and extensible prompt theme engine. After 4 years of working on oh-my-posh, a modern and more efficient tool was needed to suit my personal needs.

:heart: Support :heart:

Swag - Show your love with a t-shirt!

GitHub - One time support, or a recurring donation?

Ko-Fi - No coffee, no code.

Features

  • Shell and platform agnostic
  • Easily configurable
  • The most configurable prompt utility
  • Fast
  • Secondary prompt
  • Right prompt
  • Transient prompt

Documentation

Documentation

Reviews

Thanks