# codeskyblue/go-sh

like python-sh, for easy call shell with golang.

Repository: https://github.com/codeskyblue/go-sh
Canonical: https://ross.abutalabs.com/products/go-sh
Language: Go
License: Apache-2.0
License Family: permissive
Last push: 2025-05-09T23:07:38+00:00

## Health v2 (maintenance only)
Score: 41/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 20, release rhythm 35, longevity 100
- inputs: {"age_days": 4590, "days_push": 481, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1129, forks 137 (observed 2026-08-28T04:03:42.167274+00:00)

## What it is
A Go library modeled after Python's sh and os/exec that makes calling shell commands easy, with support for pipes, sessions, environment variables, aliases, timeouts, and shell built-ins. It provides a fluent API for composing command pipelines in Go code.

## Use cases
- run shell commands from go
- pipe shell commands in golang
- execute subprocess with timeout in go
- keep environment variables across shell commands in go
- replace bash scripts with go programs
- capture command output in go

## When to choose
- you want a Python-sh-like ergonomic wrapper around os/exec
- you need command pipelines, sessions, aliases, or timeouts in Go
- you're porting shell scripts to Go

## When to avoid
- you only need simple one-off command execution - os/exec suffices
- you need a full shell interpreter or cross-platform shell abstraction
- your project is not in Go

## Facets
- artifact type: library
- maturity: active
- function: developer-tools, cli, concurrency
- domain: developer-tools
- platform: go, windows, cross-platform
- tags: shell-wrapper, os-exec, pipe, session, subprocess, command-line, automation, linux, macos

## Member repositories
- codeskyblue/go-sh (main) score 41

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:42.167274+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:38:24.069192+00:00, confidence not recorded.
  - readme: https://github.com/codeskyblue/go-sh (fetched 2026-08-28T04:03:42.167274+00:00, sha d7c648a413c1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
