Swift Scripting

Open-source Swift projects categorized as Scripting

Top 3 Swift Scripting Projects

  • SwiftBar

    Powerful macOS menu bar customization tool

    Project mention: A curated directory of 700 Mac menu bar apps | news.ycombinator.com | 2022-11-28
  • swift-sh

    Easily script with third-party Swift dependencies.

    Project mention: Using Swift for Scripting | news.ycombinator.com | 2023-01-05

    Yes, swift CLI will compile and run your swift file.

    But many people also want to use libraries. For Python, they use the system libraries or work within an environment with installed libraries (i.e., the library-install process happens at environment-configuration time).

    In Swift, the easiest way to consume libraries is using packages, but that requires a Package.swift declaring the project scope for the script file (which must comply with top-level and main-entrypoint code requirements).

    The easiest way to do that when scripting is a swift tool that manages the process of gathering your library dependencies, auto-generating a project, building the tool, and caching it all so there's no overhead the next time.

    The best available tool now is https://github.com/mxcl/swift-sh. It reads dependency information off import comments.

    It can also generate the project for you, if/when you want to build in XCode (e.g., move into a more complex application, perhaps requiring sandbox declarations).

    Working scripts are not always updated, so any script-build tool has to maintain backwards compatibility, but the swift package manager has changed a lot in recent versions. swift-sh seems to err on the side of backwards compatibility, and does not support e.g., the most recent dependency versioning styles.

    Swift-forum discussions about better support for scripting haven't resulted in any official tooling.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support. Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • Script.swift

    Scripting in Swift with method chaining

    Project mention: Show HN: KS1019/Script.swift: Scripting in Swift with method chaining | news.ycombinator.com | 2022-03-23
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-01-05.

Swift Scripting related posts

Index

What are some of the best open-source Scripting projects in Swift? This list will help you:

Project Stars
1 SwiftBar 2,015
2 swift-sh 1,684
3 Script.swift 1
Build time-series-based applications quickly and at scale.
InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.
www.influxdata.com