Packages are really great to share code between multiple projects or to open source them. It's easy to setup, write tests and share them.
To create the Swift package use one of those commands:
swift package init
swift package init --type executable