Easily add swift packages from the command line

Related tags

JSON swift-add
Overview

swift-add

Easily add Swift packages from the command line!

Note: This is a work-in-progress. Somethings may not work. Please file issues if you run into any problems.

Example

$ swift add johnsundell/Files

Added Files (4.2.0) from https://github.com/johnsundell/Files

Installation

Clone the repository and build:

$ git clone https://github.com/subdigital/swift-add
$ swift build

When you run swift add, the Xcode toolchain will look for a binary named swift-add somewhere in your path. So we need to copy the built binary into your path somewhere:

cp .build/debug/swift-add /usr/local/bin/

Now you're ready!

Usage

Add packages by GitHub short url:

$ swift add sparrowcode/SPSafeSymbols

Specify which products to integrate into your main target:

$ swift add firebase/firebase-ios-sdk -p FirebaseAnalytics -p FirebaseAuth

Roadmap

  • add with GitHub short repo
  • add with name (will search Swift Package Index)
  • specify exact version, tag, branch

LICENSE

MIT License

You might also like...
[Deprecated] A shiny JSON parsing library in Swift :sparkles: Loved by many from 2015-2021
[Deprecated] A shiny JSON parsing library in Swift :sparkles: Loved by many from 2015-2021

🚨 Deprecation Notice 🚨 Gloss has been deprecated in favor of Swift's Codable framework. The existing Gloss source is not going away, however updates

HandyJSON is a framework written in Swift which to make converting model objects to and from JSON easy on iOS.

HandyJSON To deal with crash on iOS 14 beta4 please try version 5.0.3-beta HandyJSON is a framework written in Swift which to make converting model ob

Himotoki (紐解き) is a type-safe JSON decoding library written purely in Swift.

Himotoki Himotoki (紐解き) is a type-safe JSON decoding library written purely in Swift. This library is highly inspired by the popular Swift JSON parsin

JASON is a faster JSON deserializer written in Swift.
JASON is a faster JSON deserializer written in Swift.

JASON is a faster JSON deserializer written in Swift. JASON is the best framework we found to manage JSON at Swapcard. This is by far the fastest and

ObjectMapper is a framework written in Swift that makes it easy for you to convert your model objects to and from JSON.

ObjectMapper is a framework written in Swift that makes it easy for you to convert your model objects (classes and structs) to and from J

PMJSON provides a pure-Swift strongly-typed JSON encoder/decoder

Now Archived and Forked PMJSON will not be maintained in this repository going forward. Please use, create issues on, and make PRs to the fork of PMJS

SwiftyJSON makes it easy to deal with JSON data in Swift.

SwiftyJSON SwiftyJSON makes it easy to deal with JSON data in Swift. Platform Build Status *OS Linux Why is the typical JSON handling in Swift NOT goo

macOS app to generate Swift 5 code for models from JSON (with Codeable)
macOS app to generate Swift 5 code for models from JSON (with Codeable)

SwiftyJSONAccelerator - MacOS app Codeable Model file Generator For Swift 5 Version v2.2 Generate initializer function for classes Application Downloa

The easy to use Swift JSON decoder
The easy to use Swift JSON decoder

Unbox is deprecated in favor of Swift’s built-in Codable API and the Codextended project. All current users are highly encouraged to migrate to Codable as soon as possible.

Comments
  • Allow integrating executable products

    Allow integrating executable products

    Currently if you add a package that has an executable product, it fails

    swift add alexito4/RuneterraWallpapersDownloader swift_add/AddPackageCommand.swift:143: Fatal error: Unhandled product type: executable [1] 44792 trace trap ../.build/debug/swift-add alexito4/RuneterraWallpapersDownloader

    opened by subdigital 0
  • Use a branch if a swift package has no tags

    Use a branch if a swift package has no tags

    Currently if you try to add a package that has no tags, you get a 404 error:

    HTTP 404 from https://api.github.com/repos/junebash/raylib-swift/git/refs/tags Error: requestFailed

    We should fallback to using the main branch instead for these cases

    opened by subdigital 0
Owner
Ben Scheirman
Host of NSScreencast, producing screencasts on iOS and Mac development.
Ben Scheirman
A simple solution to show a toast message by writing single one line of code

easySwiftToast A very simple solution to show a toast message by writing single one line of code. Installation easySwiftToast is available through Coc

wajeehulhassan 7 May 13, 2022
Record your beats easily with DongZ DaZ

DongZ DaZ Record your beats easily with DongZ DaZ. Table of Contents Introduction Technique Features Feedback Introduction A new way to record and sha

Ivan 0 Dec 7, 2021
JSEN (JSON Swift Enum Notation) is a lightweight enum representation of a JSON, written in Swift.

JSEN /ˈdʒeɪsən/ JAY-sən JSEN (JSON Swift Enum Notation) is a lightweight enum representation of a JSON, written in Swift. A JSON, as defined in the EC

Roger Oba 8 Nov 22, 2022
Swift-json - High-performance json parsing in swift

json 0.1.4 swift-json is a pure-Swift JSON parsing library designed for high-per

kelvin 43 Dec 15, 2022
Codable code is a Swift Package that allows you to convert JSON Strings into Swift structs

Codable code is a Swift Package that allows you to convert JSON Strings into Swift structs.

Julio Cesar Guzman Villanueva 2 Oct 6, 2022
Implement dynamic JSON decoding within the constraints of Swift's sound type system by working on top of Swift's Codable implementations.

DynamicCodableKit DynamicCodableKit helps you to implement dynamic JSON decoding within the constraints of Swift's sound type system by working on top

SwiftyLab 15 Oct 16, 2022
AlamofireObjectMappe - An Alamofire extension which converts JSON response data into swift objects using ObjectMapper

AlamofireObjectMapper An extension to Alamofire which automatically converts JSON response data into swift objects using ObjectMapper. Usage Given a U

Tristan Himmelman 2.6k Dec 29, 2022
Decodable Simple and strict, yet powerful object mapping made possible by Swift 2's error handling.

Decodable Simple and strict, yet powerful object mapping made possible by Swift 2's error handling. Greatly inspired by Argo, but without a bizillion

Johannes Lund 1k Jul 15, 2022
Elevate is a JSON parsing framework that leverages Swift to make parsing simple, reliable and composable

Elevate is a JSON parsing framework that leverages Swift to make parsing simple, reliable and composable. Elevate should no longer be used for

Nike Inc. 611 Oct 23, 2022
Freddy - A reusable framework for parsing JSON in Swift.

Why Freddy? Parsing JSON elegantly and safely can be hard, but Freddy is here to help. Freddy is a reusable framework for parsing JSON in Swift. It ha

Big Nerd Ranch 1.1k Jan 1, 2023