# Installer swift-sh avec Homebrew

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de swift-sh pour les workflows d'agents IA.

## installation

```sh
sudo av install brew:swift-sh
```

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install swift-sh
```

  Preuve: local Homebrew formula metadata

## Faits du paquet

- **Clé du paquet:** brew:swift-sh
- **Gestionnaire de paquets:** Homebrew
- **Version:** 2.5.0
- **Résumé source:** Scripting with easy zero-conf dependency imports
- **Page d'accueil:** <https://github.com/mxcl/swift-sh>
- **Dépôt:** <https://github.com/mxcl/swift-sh>
- **Généré:** 2026-08-03T19:37:03+00:00

## exécutables

- swift-sh (alias)
- swift-sh-edit (alias)

## Comportement d'installation

- Bouteille: non disponible

## Version et fraîcheur

- page générée: 2026-08-03
- version du gestionnaire: 2.5.0
## Historique du projet et usages

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.

### Historique du projet

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.

### Historique d'adoption

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.

### Modes d'utilisation

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.

### Pourquoi les passionnés de paquets s'y intéressent

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.

### Chronologie

- 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.

### Sources

- <https://api.github.com/repos/mxcl/swift-sh>
- <https://formulae.brew.sh/api/formula/swift-sh.json>
- <https://github.com/mxcl/swift-sh#readme>


## Notes de sécurité

narrow executable package without higher-risk signals.

- **Risque Geiger:** vert / faible
- narrow executable package without higher-risk signals


## Combined YAML source

View the package source record on GitHub. [combined/swift-sh.yml](https://github.com/mxcl/pkgdb/blob/main/combined/swift-sh.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
