# batsh-dev-team/Batsh

A language that compiles to Bash and Windows Batch

Repository: https://github.com/batsh-dev-team/Batsh
Canonical: https://ross.abutalabs.com/products/batsh
Homepage: http://batsh.org
Language: OCaml
License Family: other
Last push: 2023-04-30T02:01:02+00:00

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

## Adoption (not part of the score)
Stars 4353, forks 167 (observed 2026-08-28T04:08:46.355780+00:00)

## What it is
Batsh is a C-based programming language that compiles to both Bash and Windows Batch scripts, letting you write shell scripts once that run on all platforms with no runtime dependencies. It is implemented in OCaml and distributed as a command-line compiler via OPAM.

## Use cases
- write cross-platform shell scripts that run on linux and windows
- compile a script to bash and batch from one source
- replace duplicated bash and batch glue code in a tool
- avoid learning bash and windows batch syntax
- generate platform-specific scripts from a single language

## When to choose
- you maintain a cross-platform tool needing both bash and batch glue scripts
- you want one script source targeting unix and windows shells
- you want zero runtime dependencies in the generated scripts

## When to avoid
- you only target a single operating system
- you need a language with a large ecosystem or active community
- you need advanced shell features beyond what batsh supports

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: compiler, programming-language, cli
- domain: programming-languages, compilers, developer-tools, cross-platform
- platform: windows, cross-platform, cli
- tags: transpiler, bash, batch, shell-scripting, ocaml, write-once-run-anywhere, automation, linux, macos

## Member repositories
- batsh-dev-team/Batsh (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:46.355780+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-29T18:21:30.797540+00:00, confidence not recorded.
  - readme: https://github.com/batsh-dev-team/Batsh (fetched 2026-08-28T04:08:46.355780+00:00, sha 0c1c70311d6c)
  - homepage: http://batsh.org (fetched 2026-08-29T09:10:09.669049+00:00, sha 40065856b848)
- Data as of 2026-08-30T08:39:29.467469+00:00.
