Downloads of v 6.17.0:


Last Update:

27 Nov 2021

Package Maintainer(s):

Software Author(s):

  • JanDeDobbeleer


powershell oh-my-posh posh conemu


  • 1
  • 2
  • 3

6.17.0 | Updated: 27 Nov 2021



Downloads of v 6.17.0:



Software Author(s):

  • JanDeDobbeleer

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

  • 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


Deployment Method: Individual Install, Upgrade, & Uninstall

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:


Deployment Method:

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

1. Enter Your Internal Repository Url

(this should look similar to

2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • 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. Copy Your Script

choco upgrade oh-my-posh -y --source="'INTERNAL REPO 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="'INTERNAL REPO URL'" 

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

Exit $exitCode

- name: Install oh-my-posh
    name: oh-my-posh
    version: '6.17.0'
    state: present

See docs at

chocolatey_package 'oh-my-posh' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '6.17.0'

See docs at

cChocoPackageInstaller oh-my-posh
    Name     = "oh-my-posh"
    Version  = "6.17.0"
    Source   = "INTERNAL REPO URL"

Requires cChoco DSC Resource. See docs at

package { 'oh-my-posh':
  ensure   => '6.17.0',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',

Requires Puppet Chocolatey Provider module. See docs at

4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

There are versions of this package awaiting moderation . See the Version History section below.

This package was approved as a trusted package on 27 Nov 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     = 'c96722ba7d034c3168fc63d2c9c1bf95b70e287202e75898f642b7e576115e31612ea6c9b0f2d86e74a0070ed0740935b284583762d8a1cbcfea0172636aa215'
    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.

Add to Builder Version Downloads Last Updated Status
Oh-My-Posh 6.19.2 0 Tuesday, November 30, 2021
Waiting for Maintainer
Oh-My-Posh 6.19.1 0 Tuesday, November 30, 2021
Waiting for Maintainer
Oh-My-Posh 6.19.0 1 Monday, November 29, 2021
Waiting for Maintainer
Oh-My-Posh 6.18.1 3 Monday, November 29, 2021
Waiting for Maintainer
Oh-My-Posh 6.18.0 3 Sunday, November 28, 2021
Waiting for Maintainer
Oh-My-Posh 6.15.2 300 Thursday, November 25, 2021 Approved
Oh-My-Posh 6.14.1 163 Thursday, November 25, 2021 Approved
Oh-My-Posh 6.14.0 194 Wednesday, November 24, 2021 Approved
Oh-My-Posh 6.11.2 321 Tuesday, November 23, 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