Automic VaultAutomic Vault

brew

Install swift-sh with Homebrew

Scripting with easy zero-conf dependency imports. Version 2.5.0 via Homebrew; verified from local package data.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install swift-sh

local Homebrew formula metadata

overview

Package summary

Scripting with easy zero-conf dependency imports

Commands and aliases

  • swift-sh
  • swift-sh-edit

history

Project history and usage

swift-sh is a Swift scripting tool that lets single-file Swift scripts declare third-party SwiftPM dependencies inline on import statements, then builds and runs those scripts through Swift Package Manager.

Project history

The public repository was created in 2019. The README frames the project as a response to the friction of turning a quick Swift script into a full Swift package just to use dependencies, offering a shebang-based workflow instead.

Adoption history

The README documents Homebrew installation and explains that the installed `swift-sh` executable is discoverable through Swift's subcommand mechanism as `swift sh`. Homebrew lists bottles for macOS and Linux, matching the README's stated support for Linux and Mac.

How it is used

A script starts with `#!/usr/bin/swift sh` and declares dependencies in comments after import lines. swift-sh reads those comments, creates a cached SwiftPM package, builds it, and runs it with `swift run`; it also documents `swift sh edit` for Xcode editing and `swift sh eject` for converting a script into a package.

Why package nerds care

swift-sh matters in package-manager culture because it narrows the gap between scripting and package-based dependency resolution. It makes SwiftPM usable for disposable or operational scripts without asking users to keep a full package directory around from the start.

Timeline

  • 2019: Public GitHub repository created.
  • Current docs: Installed with Homebrew or built manually with `swift build`.
  • Current docs: v2 requires Swift 5.1 and uses the active Swift toolchain to generate the temporary package manifest.

Related projects

  • The README lists Beak and Marathon as alternatives and builds on Swift Package Manager, Xcode, and Swift's subcommand dispatch behavior.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 8 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
swift-shcliglobal executable
swift-sh-editcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version2.5.0
manager updated
local dataok
upstreamcurrent
latest detected2.5.0

https://github.com/mxcl/swift-sh

  • infoNo package-manager update timestamp was available.low confidence

install metadata

Package metadata

Package keybrew:swift-sh
Version2.5.0
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/swift-sh
Homepagehttps://github.com/mxcl/swift-sh
Repositoryhttps://github.com/mxcl/swift-sh
Upstream docshttps://github.com/mxcl/swift-sh#readme
LicenseUnlicense
Source archivehttps://github.com/mxcl/swift-sh/archive/refs/tags/2.5.0.tar.gz
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameswift-sh
Version Scheme0
Revision1
Head VersionHEAD
Requirements
  • xcode
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • package relationship graph
  • package version freshness
  • package-page enrichment