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.
- Jules autonomous agent environment (Ubuntu 22.04 base system)
sudoprivileges within the agent environment
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.
- 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 theswiftcommand 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.gzarchive is automatically deleted after extraction to maintain a clean working tree for the agent.