PsBash
0.10.4
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
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
Compare-Version Complete-BashBgJob ConvertFrom-AwkProgram ConvertFrom-BashArgs ConvertFrom-HumanNumeric ConvertFrom-MonthName ConvertFrom-SimpleYaml ConvertFrom-YamlValue ConvertTo-BrowseRow ConvertTo-JqJson ConvertTo-PermissionString ConvertTo-SimpleYaml Disable-BashHookPrompt Emit-BashLine Enable-BashHookPrompt Expand-AwkString Expand-EscapeSequences Find-JqBranchKeyword Find-JqKeyword Find-JqTopLevelChar Find-JqTopLevelStr Format-AwkPrintf Format-BashDate Format-BashSize Format-LsGrid Format-LsLine Format-PsAuxLine Format-PsCustomLine Get-BashBgRunspacePool Get-BashFileInfo Get-BashItem Get-BashLsProviderEntries Get-BashPlatform Get-BashText Get-BrowseDisplayProperties Get-BrowseTargetText Get-DotNetProcEntry Get-JqMatchingBracket Get-LinuxProcEntry Get-LsDisplayName Get-LsEntryFromFsi Get-LsEntryFromPsItem Initialize-BrowseAdapters Invoke-AwkAction Invoke-BashAwk Invoke-BashBackground Invoke-BashBg Invoke-BashEcho Invoke-BashFg Invoke-BashJobs Invoke-BashKill Invoke-BashRedirect Invoke-BashSed Invoke-BashWait Invoke-BrowseAction Invoke-BrowseCommand Invoke-BrowseInteractive Invoke-JqFilter Invoke-JqIf Invoke-JqRecurse Invoke-JqSelect Invoke-ProcessSub Invoke-ProcessSubPipeline Invoke-ProcessSubString New-BashObject New-BrowseAction New-BrowseAdapter New-BrowseBinding New-BrowseSafetyPreview New-FlagDefs Open-BashFileReader Read-AwkBlock Read-BashFileBytes Read-BashFileLines Read-BashFileRaw Read-BashFileStreaming Register-BashCompletions Register-BashLsProvider Resolve-AwkExpression Resolve-AwkStringFunc Resolve-BashGlob Resolve-BrowseAdapter Resolve-JqDotPath Resolve-JqStringInterpolation Set-BashDisplayProperty Set-BashErrorMode Show-BashHelp Split-AwkFields Split-AwkFuncArgs Split-AwkStatements Split-JqComma Split-JqPipe Test-AwkPattern Test-BashCondition Test-BashHelpFlag Test-BrowseCommandRequiresConfirmation Write-BashError Write-BashFileRaw Write-BashFileText Write-BashHostStderr
PSEditions
Dependencies
This module has no dependencies.
Release Notes
v0.10.4: Fix two bash-tokenization gaps. (1) A # in the middle of a word was wrongly treated as a comment, so abc#def and URLs like http://x/p#section lost everything from the #. (2) Bracket/quote scanning was not quote-aware, so a ) inside a string closed a $(...) early and a $(...) inside double quotes terminated at the wrong quote — e.g. echo $(grep ")" f) and echo "$(echo "hi")" mangled. The lexer now uses one set of mutually-recursive, quote-aware region scanners, and the parser reuses them instead of its own duplicate copies. v0.10.3: Fix heredoc body corruption. A here-document body was rebuilt by space-joining lexer tokens, so punctuation was mangled (best-ranked (score-desc, newest-first) became best-ranked ( score-desc, newest-first )), runs of whitespace collapsed, and lines beginning with # were dropped as comments. This broke piping multi-line text (e.g. git commit messages) through ps-bash. Heredoc bodies are now sliced verbatim from the original source. v0.10.2: Interactive Ctrl-R history search now collapses duplicate command strings. History stores one row per invocation, so re-running the same command filled the reverse-i-search list with repeats; the search now shows one row per unique command, keeping the best-ranked (most recent / CWD-matching) occurrence. v0.10.1: Fix Claude Code Bash-tool integration. A multi-variable bare assignment in a && / || chain (e.g. the TEMP/TMP env-setup Claude Code prepends to every command) emitted [void]($env:A = ..; $env:B = ..), which PowerShell rejects ("Missing closing )") — so every Bash-tool command failed with "ps-bash: parse error". The emitter now uses [void]$(...) for multi-statement assignments. Regression coverage: BashTranspilerTests, ShellArgsTests, an end-to-end launcher test, and a PowerShell parse-oracle over the wrapper shapes. v0.10.0: Interactive shell features. AI command assist (Ctrl-^) turns a natural-language prompt into a reviewed shell command via an external AI CLI, with a dangerous-command safety classifier (now also flags Invoke-Expression / iex). New opt-in compact-output mode (--compact-output / PSBASH_COMPACT_OUTPUT) replaces raw output with a bounded digest for agent contexts. Completion parameter-value rows now split on the ASCII unit separator so ValidateSet values containing a pipe are no longer truncated. v0.9.13: Fix broken module install. Install-Module PsBash now bundles PsBash.Cmdlets.dll (and its PsBash.Transpiler.dll / Parlot.dll deps) so a plain Install-Module PsBash is self-contained. Previously the registered aliases (ls, cat, grep, ...) resolved to binary cmdlets that were never loaded ("Invoke-BashLs is not recognized"); the module now warns instead of failing silently if the binary companion is absent. v0.9.12: Interactive shell fixes. Auto-loadable PowerShell aliases (tnc, gip) now resolve in the host runspace, and the interactive line editor no longer redraws erratically after launching a node-based GUI CLI such as code. Full version history: https://github.com/standardbeagle/ps-bash/releases
FileList
- PsBash.nuspec
- BashFlagSpecs.json
- Parlot.dll
- PsBash.Cmdlets.dll
- PsBash.Format.ps1xml
- PsBash.Transpiler.dll
- PsBash.psd1
- PsBash.psm1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 0.10.4 (current version) | 4 | 5/29/2026 |
| 0.10.3 | 3 | 5/29/2026 |
| 0.10.2 | 3 | 5/29/2026 |
| 0.10.1 | 4 | 5/29/2026 |
| 0.10.0 | 3 | 5/29/2026 |
| 0.9.13 | 7 | 5/24/2026 |
| 0.9.11 | 16 | 5/22/2026 |
| 0.9.10 | 4 | 5/21/2026 |
| 0.9.9 | 4 | 5/21/2026 |
| 0.9.8 | 5 | 5/20/2026 |
| 0.8.20 | 17 | 4/22/2026 |
| 0.8.19 | 4 | 4/22/2026 |
| 0.8.18 | 4 | 4/22/2026 |
| 0.8.17 | 3 | 4/21/2026 |
| 0.8.16 | 3 | 4/21/2026 |
| 0.8.14 | 9 | 4/20/2026 |
| 0.8.12 | 5 | 4/16/2026 |
| 0.8.11 | 3 | 4/16/2026 |
| 0.8.10 | 5 | 4/15/2026 |
| 0.8.7 | 3 | 4/14/2026 |
| 0.8.6 | 4 | 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 | 95 | 4/3/2026 |