# bitfield/script

Making it easy to write shell-like scripts in Go

Repository: https://github.com/bitfield/script
Canonical: https://ross.abutalabs.com/products/bitfield-script
Homepage: https://bitfieldconsulting.com/subscribe
Language: Go
License: MIT
License Family: permissive
Topics: shell, cat, curl, cut, files, find, go, golang, grep, head, http, jq, ls, script, sed, tail, uniq, wc, xargs, tee
Last push: 2026-08-15T11:47:10+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 35, longevity 100
- inputs: {"age_days": 2692, "days_push": 18, "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 7030, forks 367 (observed 2026-08-28T04:09:55.054046+00:00)

## What it is
A Go library that makes it easy to write shell-like scripts in Go using a fluent pipeline API inspired by Unix tools like grep, sed, and jq. It provides composable operations on streams of data such as reading files, filtering lines, counting matches, and running subprocesses.

## Use cases
- read a file and count lines in Go
- filter lines matching a pattern like grep
- write sysadmin scripts in Go instead of bash
- pipe stdin through transformations and write to stdout
- concatenate multiple files and filter errors
- replace shell pipelines with type-safe Go code

## When to choose
- you want shell-script simplicity with Go's type safety and error handling
- you're writing small sysadmin or automation tools in Go
- you need composable stream operations like grep, head, tail, or wc in Go code

## When to avoid
- you need high-performance bulk data processing where pipeline overhead matters
- your task is complex application logic better served by idiomatic Go without shell abstractions
- you're not using Go

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools, file-system, http-client, parser, cli
- domain: developer-tools, files
- platform: go, cross-platform, windows
- tags: shell-scripting, pipeline, unix-tools, sysadmin, stream-processing, command-line, automation, linux, macos

## Member repositories
- bitfield/script (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:55.054046+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-29T17:40:35.280024+00:00, confidence not recorded.
  - readme: https://github.com/bitfield/script (fetched 2026-08-28T04:09:55.054046+00:00, sha 04d9698f8ead)
  - homepage: https://bitfieldconsulting.com/subscribe (fetched 2026-08-29T08:36:23.366886+00:00, sha 39c14b79f656)
  - site_page: https://bitfieldconsulting.com/ (fetched 2026-08-29T08:36:23.375907+00:00, sha f89253543134)
- Data as of 2026-08-30T08:39:29.467469+00:00.
