← 全部工具

26zl/PowerShellPerfect

热度 65 更新于 测试与安全

Windows PowerShell profile with a p10k-style install wizard, 145+ commands, Oh My Posh theming, fuzzy search, and built-in security/sysadmin tooling.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

PowerShellPerfect

Stability. The command surface, install flow, and extension points are settled, and new work stays additive where it can. Every push and pull request runs PSScriptAnalyzer, a Windows PowerShell 5.1 + PowerShell 7 parse and load check, a sandboxed install/uninstall cycle, and a functional command suite. Pin -ExpectedSha256 when you want byte-identical installs. Bug reports and PRs are welcome (see CONTRIBUTING.md). A modern PowerShell profile for Windows. The installer drops you into a p10k configure-style install wizard that picks your theme, color scheme, font, and feature toggles — then ships 145+ commands (Unix-style utilities plus git, network, security, sysadmin, WSL, and docker), a tuned Oh My Posh prompt, fuzzy search, zoxide, and a full uninstall + self-update behind it.

# Review-first (recommended): prints the install-bundle SHA256 and STOPS before changing anything.
$setup = irm "https://github.com/26zl/PowerShellPerfect/raw/main/setup.ps1"
& ([scriptblock]::Create($setup))

# Then apply, pinned to the hash the step above printed (reproducible, integrity-checked):
& ([scriptblock]::Create($setup)) -ExpectedSha256 '<hash-printed-above>'

Run in an elevated PowerShell window. The default flow above verifies download integrity before touching your machine. Prefer one step and willing to trust-on-download? Append -SkipHashCheck:

& ([scriptblock]::Create($setup)) -SkipHashCheck

What the hash proves: the printed SHA256 is computed over the bytes you just downloaded, so -ExpectedSha256 guarantees a reproducible, untampered-in-transit apply — not that the bytes match what the maintainer published. For true upstream-authenticity pinning, verify the commit SHA out-of-band (browser / signed tag) before trusting a hash. See SECURITY.md.

The install wizard runs by default — pick theme / scheme / font / features interactively, or pass -SkipWizard for repo defaults. The terminal restarts when setup finishes (new tab in Windows Terminal, or a new window otherwise). For the best experience use PowerShell 7+.

Contents

  • Requirements · Install Wizard · At a glance · Install (alternatives)
  • Updates · Uninstall · Customization · Keyboard Shortcuts
  • Commands · Compared to alternatives · Troubleshooting · Tests · Roadmap

Requirements

| | | | --- | --- | | OS | Windows 10 / 11 (Windows Terminal recommended) | | Shell | Windows PowerShell 5.1 (works) or PowerShell 7+ (recommended; every PS5/PS7 API fork is guarded) | | Privileges | Elevated session for install/uninstall (font + machine-scope steps). Day-to-day commands need no admin. | | Network | First install fetches the profile bundle + (optionally) Oh My Posh, a Nerd Font, and CLI tools via winget. TLS 1.2+ is enforced on PS5.1. | | Optional tools | eza, bat, ripgrep, fzf, zoxide, oh-my-posh — installed by setup; every command degrades gracefully if a tool is absent. |

Install Wizard

Inspired by powerlevel10k's p10k configure. Runs automatically on every interactive install — it's the default experience, not an opt-in. Non-interactive environments skip it.

# Default trusted-download flow — wizard runs as part of installation
$setup = irm "https://github.com/26zl/PowerShellPerfect/raw/main/setup.ps1"
& ([scriptblock]::Create($setup)) -SkipHashCheck

# Bypass the wizard and apply repo defaults (Tokyo Night + CascadiaCode):
.\setup.ps1 -SkipWizard

# Resume a half-finished wizard (state persisted in %TEMP%\psp-wizard-state.json):
.\setup.ps1 -Resume

# Re-run the wizard any time after install (downloads latest setup.ps1 + elevates):
Reconfigure-Profile

Steps (all accept Enter to keep the default / skip):

  • Quick start — one-key preset: Tokyo Night scheme, CascadiaCode Nerd Font, VS Code editor, dark chrome, default features. Answer yes to jump straight to the summary.
  • Oh My Posh theme — live fetch from JanDeDobbeleer/oh-my-posh/themes via GitHub API. Pick by number or partial name. Network failure falls back to pure.
  • Color scheme — curated 7-pack: Tokyo Night (default), Gruvbox Dark, Dracula, Catppuccin Mocha, Nord, One Half Dark, Solarized Dark. Full scheme definitions embedded; no extra network.
  • Nerd Font — Caskaydia, JetBrainsMono, FiraCode, Meslo, Hack, or Iosevka. Fetches latest release tag from ryanoasis/nerd-fonts automatically.
  • Tab bar color + window chrome — presets (scheme-match, pure black, custom hex) + applicationTheme dark/light.
  • Terminal appearance — opacity, useAcrylic, font size, cursor shape, padding, scrollbar state, history size. Each prompt keeps the current default on Enter.
  • PSReadLine colors — derive from chosen scheme (default) / shipped palette / skip.
  • Background image — optional path + opacity (0.05–0.50). Skipped by default.
  • Editor preference — VS Code, Notepad++, Neovim, Vim, Notepad, or a custom exe. Used by edit, ep, hosts, etc.
  • Telemetry opt-out + feature toggles — psfzf, predictions, startupMessage, perDirProfiles, commandOverrides — y/n per item with sensible defaults.

Design: