← All repos

sh

A shell parser, formatter, and interpreter with bash and zsh support; includes shfmt

bashbeautifyformattergointerpretermkshparserposixshellshfmtzsh
Browse cluster: JavaScript Standard Style Linting
4,228commits
112contributors
3languages

Tech stack & purpose

sh is a shell parser, formatter, and interpreter written in Go that supports POSIX Shell, Bash, Zsh, and mksh. The project includes shfmt, a command-line tool for formatting shell scripts with a canonical style, as well as gosh, a proof-of-concept shell implementation. The library provides multiple packages for different use cases: the syntax package for parsing and inspecting shell scripts, the shell package for high-level operations like expansions, and the interp package for interpreting or running shell scripts. The parser and formatter are also available as a third-party npm package called sh-syntax, which bundles the library compiled to WebAssembly.

Languages

Go
99.9%
Shell
0.1%
Dockerfile
0.0%

Contributors (top 30 of 112)