Introducing SwiftlyGo, a new Swift toolchain installer and manager for Linux

About SwiftlyGo

SwiftlyGo is a re-imagining of the swiftly toolchain installer created by @patrick.
While it shares some features, Swiftlygo has been designed specifically for use with Debian / Ubuntu Linux distributions, and as a replacement for the Swift Community Apt Repository that was maintained by @futurejones.

The main design focuses are:-

  • simple installation
  • simple and easy to use
  • maximum compatibility with popular OS distributions.

SwiftlyGo v1.0 is compatible with x86_64 and aarch64 Linux distributions based on Debian and Ubuntu.
This includes Debian 12 and Ubuntu 24.04 and popular releases such as LinuxMint, popOS, RaspberryPi OS, Zorin, Elementary, etc.

The Swift toolchain packages installed by SwiftlyGo are the official releases from swift.org and are sourced directly from the swift.org downloads.

SwiftlyGo uses the swift.org API to get the latest information about the Swift toolchains available for your system.

Installation

Installation of SwiftlyGo is quick and simple using the install script.
The installation script will check your OS system for Swift compatibility.
Once installed SwiftlyGo is ready for immediate use with no further setup necessary.

curl -L https://swiftlygo.xyz/install.sh | bash
Checking your OS system for Swift compatibility ...

Success! Your OS System is compatible with Swift for Debian 12 / aarch64

Installing SwiftlyGo ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 7296k  100 7296k    0     0  5220k      0  0:00:01  0:00:01 --:--:-- 11.4M

Congratulations! SwiftlyGo has been successfully installed.
 ____          _  __ _   _        ____       
/ ___|_      _(_)/ _| |_| |_   _ / ___| ___  
\___ \ \ /\ / / | |_| __| | | | | |  _ / _ \ 
 ___) \ V  V /| |  _| |_| | |_| | |_| | (_) |
|____/ \_/\_/ |_|_|  \__|_|\__, |\____|\___/ 
                           |___/  v1.0           

For help run 'swiftlygo -h'

Usage

SwiftlyGo has 4 easy to use commands install, delete, activate and list.

  • install - installs the Swift version requested, this can be 'latest' or a specific version like '5.10.1'
  • delete - deletes the Swift version requested
  • activate - activates the Swift version requested
  • list - lists the Swift versions available for your system, the Swift versions installed locally and which Swift version is currently active..

Quick Start Guide

Install Swift

To install the latest version of Swift use this command:-

sudo swiftlygo install latest
Do you want to install Swift version 6.0.3? [Y/n]: y
Installing ...
2025/02/07 23:58:45 Downloading from: https://download.swift.org/swift-6.0.3-release/debian12-aarch64/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-debian12-aarch64.tar.gz
Downloading Swift ... -
File successfully downloaded.
Extracting Swift to: /usr/libexec/swift/6.0.3
Extracting Swift file ... -
Swift 6.0.3 has been installed successfully.

swift --version
Swift version 6.0.3 (swift-6.0.3-RELEASE)
Target: aarch64-unknown-linux-gnu

List Available Swift Versions

To view available Swift versions and the Swift versions installed locally on your system use this command:-

sudo swiftlygo list
Swift versions available for installation on this system:-
5.10.1, 6.0, 6.0.1, 6.0.2, 6.0.3

Locally available versions:-
5.10.1, 6.0.3

The Swift version currently active is - 6.0.3

Activate a Swift Version

Here, when we run swiftlygo list we can see there are 2 locally available versions, 5.10.1 and 6.0.3.
Version 6.0.3 is currently active.
To switch to and activate 5.10.1 use this command:-

sudo swiftlygo activate 5.10.1
Are you sure you want to activate version 5.10.1? [Y/n]: y 
Version 5.10.1 is now activated.

Delete a Swift Version

To delete a version of Swift use this command:-

sudo swiftlygo delete 5.10.1
Are you sure you want to delete version 5.10.1? [Y/n]: y
Deleting ...
Version 5.10.1 deleted.

Removing SwiftlyGo

If you no longer want to use SwiftlyGo, you can easily remove it using the removeSwiftlygo command.

sudo swiftlygo removeSwiftlygo
Are you sure you want to remove SwiftlyGo? [Y/n]: y
Removing swiftlygo ...
removed swiftlygo symlink - /usr/bin/swiftlygo
removed swiftlygo directory - /usr/libexec/swiftlygo
SwiftlyGo removed successfully

This command only removes the SwiftlyGo app.
Swift installations will remain active and installed on your system.

SwiftlyGo can easily be re-installed by running the install script.

curl -sL https://swiftlygo.xyz/install.sh | sudo bash

More Information

Website

swiftlygo.xyz
Just a simple landing page.

Github Repository

github.swiftlygo
Documentation, Website and Source Code.
Note: This repo currently only contains the documentation and website.
The source code will be released shortly and will be made available as open source.

Thanks

I hope you find SwiftlyGo useful and I am looking forward to hearing your thoughts and feedback!

8 Likes

Thank you for this initiative.

In what swiftlygo is different from swiftly official package manager ?

After looking at your repo, it looks like only the script of the installer is published. Where can we look at the source of SwiftlyGo itself ?

3 Likes

Hi @sebsto,
As I mentioned in the post, the source code will be released shortly and will be made available as open source.
I would like to tidy up some comments first and create the docs for building the binaries.

Some things that SwiftlyGo does different.

Installation Diffs

  • SwiftlyGo installation supports many different Ubuntu / Debian based distributions and automatically selects and used the correct swift toochain version.
  • swiftly incorrectly detects many systems as 'unsupported' and requires you to manually make a choice from a list. Debian and Ubuntu 24.04 are still unsupported.

Swift Installation Location Diffs

  • SwiftlyGo installs in the standard /usr/libexec/[name]/[version]/ location which allows global use by all users and does not require any $PATH modifications or additions to ~/.profile file.
    This also makes it compatible with Swift versions that were installed using the Swift Community Apt Repository.

  • swiftly uses ~/.local location and usage is swiftly and swift installations are restricted to the current user and requires modifications of $PATH and ~/.profile file.

Listing Swift Versions Diffs

  • SwiftlyGo lists swift versions available for download and locally installed versions
  • swiftly only lists locally installed swift versions

Differences in how dependency installation is handled.

  • Swiftlygo checks that dependencies are installed when installing swift and only installs if needed.
  • swiftly installs dependencies when swiftly is being installed without checking if they are already installed.

Hope that helps.

I have uploaded the source code to the SwiftlyGo repository

If you have GO installed you just need to cd to the source directory and run one of the following commands.

# for installation on x86_64
GOOS=linux GOARCH=amd64 go build -o swiftlygo-x86_64 

# for  installation on arm64 (aarch64)
GOOS=linux GOARCH=arm64 go build -o swiftlygo-aarch64

# to run on your host machine 
go build

The current install location is:-

# swiftlygo installation location
# /usr/libexec/swiftlygo/bin/
# ├── swiftlygo -> symlink to /usr/bin/swiftlygo
# └── swiftlygo.env
#

You can change the install paths in the file_utils.go for testing if needed.

Still working on the docs for setting up build environment and generating binaries. Hope to be finished in a day or two.

2 Likes

Is there a particular reason this utility is written in Go instead of Swift?

4 Likes

Swiftly now has a subcommand list-available to list available version for download

4 Likes

Go was mainly chosen because of its cross-platform compatibility, and greatly reduced binary size. ( around 7MB for Go vs 60MB for Swift)
There are many other reasons but I don't want to start a Swift vs Go comparison debate.

My priorities were, ease of development, portability, functionality and ease of distribution. So for me using Go makes sense.

2 Likes

Wow, looks like a neat project!

1 Like

Since you have disabled the issues tab on GitHub, I guess asking for support in this thread is ok?

I'm running Ubuntu 24.10

❯ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.10
DISTRIB_CODENAME=oracular
DISTRIB_DESCRIPTION="Ubuntu 24.10"

which I believe is a supported version, yet I'm getting:

Checking your OS system for Swift compatibility ...

Sorry you have an unsupported OS version

Any idea why?

@mickeyl the latest supported version is currently Ubuntu 24.04.

I am just finishing testing an update that will add Ubuntu 24.10 and 25.04.

Hopefully it should be released tomorrow.

1 Like

SwiftlyGo v1.1 release.

I have just released SwiftlyGo v1.1 which adds compatibility with Ubuntu 24.10 and 25.04.

Both these versions of Ubuntu can use the same official swift.org version of Swift as Ubuntu 24.04.

Ubuntu 24.10 can use the 24.04 swift release without the need for any changes.

With Ubuntu 25.04, which will be released next month, the default version of python3 is 3.13.
As swift for 24.04 is built with python3.12 we need to explicitly add python3.12-dev as a dependency. (This is all handled by SwiftlyGo, no user input required).
This allows the 24.04 swift version to run without issues on 25.04.

SwiftlyGo v1.1 will automatically detect which Ubuntu version is installed and install the correct version of swift and any dependencies that are needed.

To update from a previous version of SwiftlyGo simply run the install script.

curl -L https://swiftlygo.xyz/install.sh | bash
2 Likes