How smoonlee/oh-my-posh-profile works
Project type and purpose
• This is a “dotfiles/configuration” repository that provides PowerShell profile setup scripts, terminal configuration, Oh-My-Posh theme JSON, and CI/CD workflows to automate releases. Its purpose is to bootstrap a consistent, cross-platform shell environment (Windows PowerShell, Windows Terminal, WSL/Linux) with modules, fonts, themes, and custom functions.
File structure
• Top-level files:
• Microsoft.PowerShell_profile.ps1 (base profile)
• New-OhMyPoshProfile.ps1 (Windows install script)
• New-OhMyPoshProfile.sh (Linux/WSL install script)
• quick-term-cloud.omp.json (Oh-My-Posh theme config)
• windows-terminal-settings.json (Windows Terminal settings)
• readme.md
• assets/: images (header, previews) and any additional theme resources.
• .github/workflows/: two YAML pipelines for release and tagging.
README for additional insights
• Scripts automate: setting execution policy, cloning repo, installing Nerd Fonts, PowerShell modules (Az, PSReadLine, etc.), Winget packages (AWSCLI, Terraform, kubectl, etc.), linking WSL .kube folder.
• Custom functions added (Get-MyPublicIP, Get-AzSystemUptime, etc.).
• CI/CD pipelines release new versions and tag builds.
a. Main components:
• User Environment
• Windows PowerShell host
• Windows Terminal
• WSL/Linux shell
• Bootstrap Scripts
• New-OhMyPoshProfile.ps1
• New-OhMyPoshProfile.sh
• Configuration Artifacts
• Microsoft.PowerShell_profile.ps1
• quick-term-cloud.omp.json
• windows-terminal-settings.json
• assets/
• External Services
• PowerShell Gallery (module repo)
• Winget (package manager)
• GitHub (repo, raw scripts, Actions)
• Nerd Fonts download site
• External APIs (endoflife.date)
• CI/CD
• GitHub Actions (action-profile-release, action-tag-build-tag)
b. Relationships / interactions:
• User invokes install script → script pulls repo from GitHub → reads configuration files → calls PowerShell Gallery & Winget to install modules and packages → downloads/install Nerd Font → updates Windows Terminal settings → links WSL .kube folder → updates $PROFILE.
• Scripts reference quick-term-cloud.omp.json to configure the Oh-My-Posh prompt.
• CI workflows trigger on tag or push to release updated artifacts (bump version, publish to GitHub Releases).
c. Architectural patterns / principles:
• Single responsibility: separate install logic per platform (PS1 vs. SH).
• Idempotent bootstrapping: re-runnable scripts that detect existing modules/fonts.
• Declarative config: use JSON for theme and terminal settings.
• CI/CD automation: GitHub Actions manage versioning and release.
d. Key technologies / libraries:
• PowerShell (PS 7+, PSReadLine, Posh-Git, Az module…)
• Oh-My-Posh (theme engine)
• Winget
• Git/GitHub
• Windows Terminal JSON schema
• Bash (for Linux/WSL)
Detailed coverage
• Scripts, configs, assets, module/package sources, and CI pipelines
• Data flows:
• GitHub → clone → script → system
• script → PowerShell Gallery & Winget → local installs
• script → modify Windows Terminal JSON → apply settings
• CI Actions → bump version → create Git tag → GitHub Releases