npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-swift-package

v1.1.0

Published

An interactive alternative to swift package init

Downloads

15

Readme

create-swift-package header

create-swift-package

create-swift-package demo

A command-line utility to create Swift packages with ✨ flair ✨

  • 🔮 Interactive: Answer a set of questions interactively to configure your shiny new Swift package.
  • ⚒️ Feature-rich: Built-in support for generating library and executable products, mixed-language targets and more.
  • 👷 Extensive support: Allows you to generate packages targeting macOS, iOS, watchOS and tvOS from Swift 5.4+.
  • 🚦 Well-tested: Supported by unit and integration tests over various Swift tools versions.

🎁 Installation

create-swift-package is distributed via npm and for best results requires Node 16.10+ or 18.0.0+. You can run it with npx:

$ npx create-swift-package

🧑‍💻 Usage

Run create-swift-package without any arguments. It runs in interactive mode to prompt you to configure your product and targets. You can optionally provide a directory that you want your new package to be located in.

There are also a couple of command-line flags which are supported:

  • --no-prompt-xcode: When the package has been successfully created, don't prompt you to open it in Xcode.
  • --no-swift-build: By default create-swift-package runs swift build in your new package directory to validate that it has been set up correctly. Disable this check with this flag.
  • --dry-run: Do everything apart from actually creating the package and files.

📦 Supported setups

🛠️ Swift tools

Support for Swift tools versions >= 5.4. Defaults to your currently installed Swift version. Versions greater than your currently installed Swift version are disabled.

📱 Platforms

Supports generating packages for iOS 8.0+, macOS 10.10+, watchOS 2.0+ and tvOS 9.0+

📦 Products

Supports generating both library and executable products.

🗣️ Language support

Swift targets can include either Swift or C-family (C/C++/Objective-C/Objective-C++) code but not both. create-swift-package allows you to create packages that support either Swift code, C-family code or a mix of both:

  • Swift and C-family packages are created with a single target containing either Swift or C-family code.
  • Mixed packages are created with two targets: one which includes Swift code, and another (postfixed with ObjCxx) including C-family code. The swift target depends on the C-family target.

C-style Headers

  • C-family targets require a public headers directory; this defaults to include but can be configured.
  • create-swift-package creates a single umbrella header in your public headers directory with the same name as your C-family target

🏎️ Tests

Test targets can be created for library or executable products, for both Swift and Objective-C targets.

🙋‍♂️ FAQ

Why isn't this written in Swift?

Swift is great for lots of things, but this is a good case of using the right tool for the job. create-swift-package is built using some great npm packages including prompts and ora for its interactivity, which would have been much harder to do in Swift.