Skip to content

Instantly share code, notes, and snippets.

@acebytes
Created July 24, 2026 23:52
Show Gist options
  • Select an option

  • Save acebytes/3608986823fff2502805c576c2e5765f to your computer and use it in GitHub Desktop.

Select an option

Save acebytes/3608986823fff2502805c576c2e5765f to your computer and use it in GitHub Desktop.
How to Install Swift for Jules Autonomous Agent

Install Swift 5.10 for Jules Autonomous Agent

This script automates the installation of the Swift 5.10.1 toolchain within the Jules Google autonomous agent environment. It resolves required system dependencies, downloads the appropriate Ubuntu 22.04 release, and configures the agent's execution path for immediate use.

Requirements

  • Jules autonomous agent environment (Ubuntu 22.04 base system)
  • sudo privileges within the agent environment

Usage

Paste the raw contents of this script directly into the Jules dashboard configuration page for your specific repository:

https://jules.google.com/repo/github/<ACCOUNT>/<REPO>/config

The Jules agent will execute these commands during its initialization sequence to provision the Swift environment for that repository.

Notes

  • System PATH: Instead of modifying user profile files (which may not persist or source correctly in an automated environment), the script symlinks all Swift binaries directly into /usr/local/bin/. This ensures the swift command is globally and immediately accessible to the Jules agent.
  • Installation Path: The toolchain is extracted and permanently housed in /opt/swift.
  • Workspace Cleanup: The downloaded .tar.gz archive is automatically deleted after extraction to maintain a clean working tree for the agent.
# Update package list and install Swift's required dependencies
sudo apt-get update
sudo apt-get install -y clang libpython3-dev libicu-dev curl wget
# Download the official Swift 5.10 tarball
wget https://download.swift.org/swift-5.10.1-release/ubuntu2204/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-ubuntu22.04.tar.gz
# Extract the tarball and move it to a persistent directory
tar -xzf swift-5.10.1-RELEASE-ubuntu22.04.tar.gz
sudo mv swift-5.10.1-RELEASE-ubuntu22.04 /opt/swift
# Clean up the downloaded archive so the git working tree stays clean
rm swift-5.10.1-RELEASE-ubuntu22.04.tar.gz
# Symlink all Swift binaries directly into the system PATH
sudo ln -s /opt/swift/usr/bin/* /usr/local/bin/
# Verify the installation
swift --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment