mvdan/sh
A shell parser, formatter, and interpreter with bash and zsh support; includes shfmt observed · 2026-08-28
Health v2 · maintenance only
83/100
- Activity 99
- Release rhythm 54
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 129.0
- age_days: 3882
- days_rel: 149
- days_push: 10
- n_releases_24m: 5
Adoption not part of the score
9009 stars · 446 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A Go library and CLI tool (shfmt) that parses, formats, and interprets shell scripts supporting POSIX Shell, Bash, Zsh, and mksh. It exposes packages for syntax parsing, shell expansions, and script interpretation, plus a standalone formatter binary.
Use cases
- format shell scripts consistently
- parse bash scripts into an AST in Go
- run shell scripts from a Go program
- check shell script syntax in CI
- beautify and normalize bash code style
- evaluate shell expansions on strings
When to choose
- you need programmatic parsing or analysis of shell scripts in Go
- you want a deterministic formatter for bash/POSIX scripts
- you need to execute shell scripts embedded in Go applications
When to avoid
- you need a fully POSIX/Bash-faithful interpreter with process forking semantics
- you need zsh-specific advanced features beyond parsing
- you just want shell linting with shellcheck-style checks
Facets
library · maturity active
parser formatter interpreter cli linter developer-tools parsers go windows cross-platform cli shell bash zsh posix mksh shfmt code-formatting static-analysis command-line automation linux macos
4 sources
- readme: https://github.com/mvdan/sh · fetched 2026-08-28 · cc5ae13e4856
- homepage: https://pkg.go.dev/mvdan.cc/sh/v3 · fetched 2026-08-29 · e2bc5b5435bf
- site_page: https://pkg.go.dev/about · fetched 2026-08-29 · 757852027879
- site_page: https://go.dev/project · fetched 2026-08-29 · d5ca00bb378b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mvdan/sh | main | 83 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem