Compile from source
Toucan can also be installed by compiling it from source on macOS or Linux.
Prerequisites
Before installing Toucan, verify that Swift 6.0 or later is installed on your macOS or Linux system and any required developer tools (such as Xcode on macOS or build-essential on Linux) are installed beforehand.
For detailed installation instructions, consult the Swift installation guide on swift.org.
Quick install
To install Toucan on macOS or Linux, run the following commands in your terminal.
# clone the repository & install toucan
git clone https://github.com/toucansites/toucan.git
cd toucan
make install
# verify installation
which toucan
Toucan is now installed and ready to use via the toucan
command.
Installation Steps
Follow these steps to install Toucan from source on macOS or Linux.
Clone the Toucan Repository
Open Terminal and run the following command to clone the Toucan repository from GitHub:
git clone https://github.com/toucansites/toucan.git
This command downloads the Toucan repository from GitHub to the local machine.
Navigate to the Toucan Directory
Change to the Toucan directory by running:
cd toucan
This will set your current directory to the Toucan project directory.
Build Toucan
Compile Toucan in release mode by executing:
swift build -c release
This command will build the Toucan project, creating the necessary executable files.
Install Toucan
Install the compiled Toucan binary to /usr/local/bin:
install ./.build/release/toucan-cli /usr/local/bin/toucan
This step places the Toucan executable in a directory included in the system’s PATH, enabling easy execution from the command line.
Verification
To verify that Toucan is installed correctly, run the following command:
which toucan
This should output the path to the toucan executable, confirming that the installation was successful.
# tib@~: which toucan
/usr/local/bin/toucan