PsBash

0.8.14

Real bash commands for PowerShell with typed objects. 76 commands (ls, grep, sort, awk, sed, jq, find, ps, du, tar, etc.) that accept real bash flags and return structured PowerShell objects while producing identical text output. Pipeline bridge pattern preserves typed objects through grep, sort, head, tail.

Minimum PowerShell version

7.0

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name PsBash

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name PsBash

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) Andy Brummer. All rights reserved.

Package Details

Author(s)

  • Andy Brummer

Tags

bash linux cross-platform cli grep awk sed jq pipeline typed-objects powershell-module devops unix shell commands windows macos

Functions

Set-BashErrorMode Invoke-ProcessSub Invoke-BashEcho Invoke-BashPrintf Get-BashPlatform New-BashObject Emit-BashLine ConvertFrom-BashArgs Expand-EscapeSequences New-FlagDefs Invoke-BashLs Get-BashFileInfo Format-BashSize Format-BashDate Format-LsLine Get-LsDisplayName Format-LsGrid ConvertTo-PermissionString Invoke-BashCat Get-BashText Invoke-BashGrep Invoke-BashSort ConvertFrom-HumanNumeric Compare-Version ConvertFrom-MonthName Invoke-BashHead Invoke-BashTail Invoke-BashWc Invoke-BashFind Invoke-BashStat Format-StatString Invoke-BashCp Invoke-BashMv Invoke-BashRm Invoke-BashMkdir Invoke-BashRmdir Invoke-BashTouch Invoke-BashLn Invoke-BashPs Get-LinuxProcEntry Get-DotNetProcEntry Format-PsAuxLine Format-PsCustomLine Invoke-BashSed ConvertFrom-SedExpression Test-SedAddress Invoke-BashAwk ConvertFrom-AwkProgram Split-AwkFields Test-AwkPattern Resolve-AwkExpression Invoke-AwkAction Format-AwkPrintf Resolve-AwkStringFunc Invoke-BashCut Invoke-BashTr Invoke-BashUniq Invoke-BashRev Invoke-BashNl Invoke-BashDiff Invoke-BashComm Invoke-BashColumn Invoke-BashJoin Invoke-BashPaste Invoke-BashTee Invoke-BashXargs Invoke-BashJq ConvertTo-JqJson Invoke-JqFilter Invoke-BashDate Convert-DateFormat Invoke-BashSeq Invoke-BashExpr Invoke-BashDu Invoke-BashTree Invoke-BashEnv Invoke-BashBasename Invoke-BashDirname Invoke-BashPwd Invoke-BashHostname Invoke-BashWhoami Invoke-BashUname Invoke-BashFold Invoke-BashExpand Invoke-BashUnexpand Invoke-BashStrings Invoke-BashSplit Invoke-BashTac Invoke-BashBase64 Invoke-BashMd5sum Invoke-BashSha1sum Invoke-BashSha256sum Invoke-BashFile Invoke-BashRg Invoke-BashGzip Invoke-BashTar Invoke-BashYq ConvertFrom-SimpleYaml ConvertFrom-YamlValue ConvertTo-SimpleYaml Invoke-BashXan Register-BashCompletions Test-BashHelpFlag Show-BashHelp Invoke-BashSleep Invoke-BashTime Invoke-BashWhich Invoke-BashAlias Invoke-BashTrap Invoke-BashReadlink Invoke-BashMktemp Invoke-BashType Invoke-BashBash Invoke-BashRedirect Invoke-BashBackground Invoke-BashWait Invoke-BashJobs Invoke-BashFg Invoke-BashBg Invoke-BashEval Invoke-BashRead Invoke-BashMapfile Invoke-BashShift Invoke-BashRealpath Invoke-BashCommand Invoke-BashSource Invoke-BashUnset Invoke-BashPushd Invoke-BashPopd Invoke-BashDirs Invoke-BashYes Invoke-BashTput Invoke-BashShopt Invoke-BashKill Invoke-BashTest Test-BashCondition Invoke-BashLet Invoke-BashId Invoke-BashShuf

PSEditions

Core

Dependencies

This module has no dependencies.

Release Notes

v0.8.14: Parse-time eval — `eval ARG` is now resolved by PsEmitter at transpile time: arg word parts are reconstructed into the bash source eval would see, which is re-parsed and emitted inline. Static bodies (literals, quoted literals, variable references) fold into normal pwsh with no runtime eval cmdlet. Dynamic bodies — `eval "$(cmd)"`, `eval `cmd``, `eval $((expr))`, `eval <(cmd)` — are rejected at transpile time with a clear message telling the user to inline the command's output, instead of the prior behavior where rc sourcing hung past its timeout on nested ps-bash subprocess spawns. Also: route -c through InteractiveShell.ExpandAliases before transpile for REPL parity, with regression tests for `-c "... --<word> ..."` where `<word>` starts with a recognized short-flag letter. PSBASH_TEST_TIMEOUT wall-clock cap for test.sh. Shell test harness always closes child stdin for clean EOF. install-local.ps1 applies the NTFS rename-to-.old trick to every locked file, not just ps-bash.exe, so a live shell holding Core.dll no longer blocks redeploy. v0.8.13: Bash CLI compatibility for Claude Code wrappers (bundled -lc, -c -l cmd interleaving). Fix three transpiler bugs in Claude prelude (cmd || true, >|, < /dev/null). Add --unix-paths flag and PSBASH_UNIX_PATHS env var for opt-in MSYS drive-path translation. Hide pwsh worker console window when ps-bash spawned by GUI/Node parent. Interactive shell startup loading indicator and console-input restore after foreground children. v0.8.12: Replace all silent catch blocks with stderr logging. Fix sequence suggestion test. v0.8.10: Fix flaky background-job Pester tests and child-process module loading for CI stability. v0.8.9: Add install alias to module manifest. v0.8.8: Fix Ctrl+C in shell mode, ANSI prompt after git pull, install command, --noprofile flag, PATH command resolution, cursor redraw, history deduplication. v0.8.7: Direct execution for interactive external commands (claude, copilot, etc.). v0.8.6: Skip ps -u USER on non-Windows CI. v0.8.5: Skip ps -u USER on Linux CI. v0.8.4: Add missing Set-Alias for balias. v0.8.3: Remove PsBuiltinAliases, combined flag parsing, ls -F/-A/--color, interactive shell, rm nul guard.

FileList

Version History

Version Downloads Last updated
0.8.14 (current version) 5 4/20/2026
0.8.12 4 4/16/2026
0.8.11 2 4/16/2026
0.8.10 4 4/15/2026
0.8.7 2 4/14/2026
0.8.6 2 4/14/2026
0.7.6 5 4/12/2026
0.7.5 4 4/12/2026
0.7.4 3 4/12/2026
0.7.3 5 4/10/2026
0.7.2 3 4/10/2026
0.7.1 4 4/10/2026
0.7.0 5 4/9/2026
0.4.0 13 4/5/2026
0.3.0 4 4/4/2026
0.2.0 347 4/3/2026
0.1.0 38 4/3/2026
Show more