macOS
brew install swift-shlocal Homebrew formula metadata
brew
swift-sh のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install swift-shlocal Homebrew formula metadata
概要
Scripting with easy zero-conf dependency imports
履歴
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.
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.
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.
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.
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.
セキュリティ状態
narrow executable package without higher-risk signals.
リスク グリーン · 信頼度 低 · appliance
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
swift-sh | cli | グローバル実行可能ファイル | |
swift-sh-edit | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
https://github.com/mxcl/swift-sh
インストールメタデータ
| パッケージキー | brew:swift-sh |
|---|---|
| バージョン | 2.5.0 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/swift-sh |
| ホームページ | https://github.com/mxcl/swift-sh |
| リポジトリ | https://github.com/mxcl/swift-sh |
| 上流ドキュメント | https://github.com/mxcl/swift-sh#readme |
| ライセンス | Unlicense |
| ソースアーカイブ | https://github.com/mxcl/swift-sh/archive/refs/tags/2.5.0.tar.gz |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定義 |
| サービス | 宣言なし |
レジストリ情報
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | swift-sh |
| Version Scheme | 0 |
| Revision | 1 |
| Head Version | HEAD |
| Requirements |
|
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
ソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.