Downloads of v 3.180.1:


Last Update:

10 Sep 2021

Package Maintainer(s):

Software Author(s):

  • JanDeDobbeleer


powershell oh-my-posh posh conemu


This is not the latest version of Oh-My-Posh available.

  • 1
  • 2
  • 3

3.180.1 | Updated: 10 Sep 2021



Downloads of v 3.180.1:



Software Author(s):

  • JanDeDobbeleer

  • 1
  • 2
  • 3
Oh-My-Posh 3.180.1

This is not the latest version of Oh-My-Posh available.

  • 1
  • 2
  • 3

All Checks are Passing

3 Passing Tests

Validation Testing Passed

Verification Testing Passed


Scan Testing Successful:

No detections found in any package files


To install Oh-My-Posh, run the following command from the command line or from PowerShell:


To upgrade Oh-My-Posh, run the following command from the command line or from PowerShell:


To uninstall Oh-My-Posh, run the following command from the command line or from PowerShell:


NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to

4. Choose your deployment method:

choco upgrade oh-my-posh -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

choco upgrade oh-my-posh -y --source="'STEP 3 URL'"

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0

Exit $exitCode

- name: Ensure oh-my-posh installed
    name: oh-my-posh
    state: present
    version: 3.180.1
    source: STEP 3 URL

See docs at

chocolatey_package 'oh-my-posh' do
  action    :install
  version  '3.180.1'
  source   'STEP 3 URL'

See docs at

    Name: oh-my-posh,
    Version: 3.180.1,
    Source: STEP 3 URL

Requires Otter Chocolatey Extension. See docs at

cChocoPackageInstaller oh-my-posh
   Name     = 'oh-my-posh'
   Ensure   = 'Present'
   Version  = '3.180.1'
   Source   = 'STEP 3 URL'

Requires cChoco DSC Resource. See docs at

package { 'oh-my-posh':
  provider => 'chocolatey',
  ensure   => '3.180.1',
  source   => 'STEP 3 URL',

Requires Puppet Chocolatey Provider module. See docs at

salt '*' chocolatey.install oh-my-posh version="3.180.1" source="STEP 3 URL"

See docs at

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved as a trusted package on 10 Sep 2021.



Oh my Posh is a custom prompt engine for any shell that has the ability to adjust the prompt string with a function or variable.

Oh my Posh 3 vs Oh my Posh 2

Oh my Posh 3 is the offspring of Oh my Posh, a prompt theme engine for PowerShell. Oh my Posh started out by being inspired from tools like oh my zsh when nothing was available specifically for PowerShell.

Over the years, I switched operating system/main shell quite a lot, even on Windows via the WSL. This made it so that my prompt wasn't portable enough, I wanted the same visual/functional experience regardless of the shell I was working in. Hello world Oh my Posh 3!


Traditionally, prompt tools work with custom scripts per theme (just like Oh my Posh did) or a lot of CLI configuration switches to define what it looks like. With Oh my Posh, I wanted to start from a single configuration file that could easily be shared anywhere, removing the need to really grasp what goes on underneath.

When you look at prompts like Agnoster or Paradox, you notice they usually consist of a few building blocks which contain one or more segments that display some sort of information. The configuration of Oh my Posh works exactly like that. Blocks are a combination of one or more segments.

The basic layout of the config file is as follows.

    "blocks": []

A block has properties that indicate its position and the segments it will render.

    "blocks": [
            // positioning metadata (not shown)
            "segments": []

A segment renders a single context like showing the current folder, user information or git status when relevant. It can be styled any way you want, resulting in visualizing the prompt you are looking for.

For your convenience, the existing themes from Oh my Posh have been added to version 3, so you can get started even without having to understand the theming. So, let's no longer waste time on theory, have a look at the configuration guide to get started right away!

$ErrorActionPreference = 'Stop';
$pp = Get-PackageParameters

$InstallArgs = @{ 
    PackageName    = $env:ChocolateyPackageName
    FileType       = 'exe'
    SilentArgs     = '/VERYSILENT'
    Url64bit       = ''
    Checksum64     = 'df603264158e7367e08bcc78633f58d7e2f0f54978bd17018c1f50905994f235bd28e637352ff3d2864ff0d616d898a202bb7ff24b87240808892aef1b37a5cf'
    ChecksumType64 = 'sha512'

Install-ChocolateyPackage  @InstallArgs

Write-Output "PROFILE: $profile"
if (Test-Path $profile) {
    $oldprofile = Get-Content $profile
    $OhMyPoshInprofile = @(
        ($oldprofile | Select-String -SimpleMatch 'Import-Module oh-my-posh' | Select-Object -ExpandProperty Line)
        ($oldprofile | Select-String -SimpleMatch 'Invoke-Expression (oh-my-posh --init --shell pwsh' | Select-Object -ExpandProperty Line)
        ($oldprofile | Select-String -SimpleMatch 'Set-PoshPrompt' | Select-Object -ExpandProperty Line)

    if ($pp['Theme']) {
        $themeName = $pp['Theme']
        if (Test-Path "$env:LocalAppDataPrograms/oh-my-posh/themes/$($themeName).omp.json") {
            $ohMyPoshprofileLine = "Invoke-Expression (oh-my-posh --init --shell pwsh --config ""$env:LocalAppData/Programs/oh-my-posh/themes/$($themeName).omp.json"")"
            # $ohMyPoshprofileLine = "Set-PoshPrompt -Theme $themeName" # Suggestion for possible alternative
            if ($OhMyPoshInprofile) {
                # If a theme is set, Overwrite old line to set new theme
                foreach ($existingLine in $OhMyPoshInprofile) {
                    Write-Host "Overwriting Old Oh-My-Posh line: $existingLine with $ohMyPoshprofileLine"
                    $oldprofile | ForEach-Object { $_ -replace $existingLine, $ohMyPoshprofileLine } | Set-Content -Path $profile -Force
            else {
                Add-Content -Path $profile -Value $ohMyPoshprofileLine -Force
        else {
            Throw "Could not find Theme $themeName @ $env:LocalAppDataPrograms/oh-my-posh/themes/$($themeName).omp.json";
        if (-Not($OhMyPoshInprofile)) {
            Add-Content -Path $profile -Value "Invoke-Expression (oh-my-posh --init --shell pwsh --config ""$env:LocalAppData/Programs/oh-my-posh/themes/$($themeName).omp.json"")";
            Add-Content -Path $profile -Value 'Use the command ''Get-PoshThemes'' to display every available theme in the current directory'
            Add-Content -Path $profile -Value '# For information about setting your oh-my-posh themes:'
        if (-Not($OhMyPoshInProfile)) {
            # Add-Content -Path $PROFILE -Value 'Invoke-Expression (oh-my-posh --init --shell pwsh --config "$(scoop prefix oh-my-posh)/themes/jandedobbeleer.omp.json")';
            Add-Content -Path $PROFILE -Value 'Set-PoshPrompt -Theme jandedobbeleer'; # Newer method of setting theme
            Add-Content -Path $PROFILE -Value 'Use the command ''Get-PoshThemes'' to display every available theme in the current directory'
            Add-Content -Path $PROFILE -Value '# For information about setting your oh-my-posh themes:'

    Write-Host "oh-my-posh has been added to your profile. You may wish to append 'Set-PoshPrompt paradox' to set a theme"
else {
    Write-Host "No Powershell profile was found. You may wish to create a profile and append 'Invoke-Expression (oh-my-posh --init --shell pwsh --config ""$env:LocalAppData/Programs/oh-my-posh/themes/themename.omp.json"")' to enable oh-my-posh. 'Get-PoshThemes' will list available themes for you"
#Remove added lines from Profile
if ($PROFILE -and (Test-Path $PROFILE)) {
    $oldProfile = @(Get-Content $PROFILE)

    $newProfile = @()
    foreach($line in $oldProfile) {
        if($line -like 'Import-Module posh-git') {
            Write-Host "'Import-Module posh-git' was found in your profile but is not being removed."
        if ($line -like 'Import-Module oh-my-posh' -or $line -like 'Invoke-Expression (oh-my-posh --init --shell pwsh*') {
        if($line -like 'Set-PoshPrompt*') {
            Write-Host "'$line' was setting a theme for your profile but is being removed."
        $newProfile += $line
    Set-Content -path $profile -value $newProfile -Force
    Write-Host "oh-my-posh has been removed from your Powershell profile."
    Write-Host "No Powershell Profile was found. You may need to undo changes to your Powershell profile manually."

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Oh-My-Posh 3.180.2 255 Tuesday, September 14, 2021 Approved
Oh-My-Posh 3.180.1 2447 Friday, September 10, 2021 Approved
Oh-My-Posh 3.180.0 2129 Sunday, September 5, 2021 Approved
Oh-My-Posh 3.177.0 1352 Saturday, September 4, 2021 Approved
Oh-My-Posh 3.176.0 91 Saturday, September 4, 2021 Approved
Oh-My-Posh 3.175.0 55 Saturday, September 4, 2021 Approved
Oh-My-Posh 3.174.0 14 Saturday, September 4, 2021 Approved
Oh-My-Posh 3.144.0 2129 Sunday, April 25, 2021 Approved

This package has no dependencies.

Discussion for the Oh-My-Posh Package

Ground Rules:

  • This discussion is only about Oh-My-Posh and the Oh-My-Posh package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Oh-My-Posh, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus