# mxcl/swift-sh

Easily script with third-party Swift dependencies.

Repository: https://github.com/mxcl/swift-sh
Canonical: https://ross.abutalabs.com/products/swift-sh
Language: Swift
License: Unlicense
License Family: permissive
Topics: swift, scripting
Last push: 2026-06-03T18:37:10+00:00

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

## Adoption (not part of the score)
Stars 1892, forks 63 (observed 2026-08-28T04:05:50.308456+00:00)

## What it is
swift-sh is a command-line tool that lets you write Swift scripts with third-party dependencies declared inline via import comments, without creating a full Swift package. It fetches and resolves dependencies automatically so single-file scripts can run directly.

## Use cases
- write quick swift scripts with third-party dependencies
- run a single swift file that imports a github package
- replace heavyweight swift package setup for small scripts
- make executable swift scripts with a shebang
- pin exact versions or commits of script dependencies
- prototype swift code without swift build

## When to choose
- you want one-file swift scripts that use external packages
- you find swift package manager too heavy for quick automation tasks
- you need version pinning inline in scripts
- you work on macOS or Linux with Swift installed

## When to avoid
- you need a full multi-file package with tests and resources
- you need Windows support today
- your project is a library or app rather than a script

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, package-manager, developer-tools
- domain: developer-tools, programming-languages
- platform: cli
- tags: swift-scripting, shebang, dependency-management, scripting, command-line, automation, macos, linux, swift

## Member repositories
- mxcl/swift-sh (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:50.308456+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-30T03:12:57.988361+00:00, confidence not recorded.
  - readme: https://github.com/mxcl/swift-sh (fetched 2026-08-28T04:05:50.308456+00:00, sha 3b17d4fc4c84)
- Data as of 2026-08-30T08:39:29.467469+00:00.
