Installation
When we refer to "Python 3" in this book, we will be referring to any version of Python equal to or greater than version Python 3.10.
Installing Auto
The Auto toolchain includes the autoc compiler and the automan package manager. You will also need the a2p transpiler since this book focuses on transpiling Auto code to Python.
Linux or macOS
Open a terminal and run:
$ curl --proto '=https' https://sh.auto.dev | shThis command downloads a script and installs the Auto toolchain. You might be prompted for your password.
Next, install the a2p transpiler using automan:
$ automan install a2pWindows
Go to the Auto website at <https://auto.dev> and download the Windows installer. Run the installer and follow the on-screen instructions.
Caution: Make sure you check the option to add Auto to your system
PATHduring installation.
After installing the toolchain, install the a2p transpiler:
> automan install a2pInstalling Python
Since this book transpiles Auto code to Python using a2p, you will need Python 3.10 or later installed on your system.
Linux
Use your distribution's package manager. For example, on Debian and Ubuntu:
$ sudo apt-get update && sudo apt-get install python3macOS
Use Homebrew:
$ brew install python3Windows
Download Python from <https://www.python.org/downloads/> and run the installer.
Caution: Make sure you check the option
Add Python to PATHduring installation.
Verifying Your Installation
Open a terminal (or Command Prompt on Windows) and run the following commands to verify that everything is installed correctly:
$ autoc --versionYou should see the version number, for example:
autoc 1.0.0 (2025-01-01)$ a2p --version$ python3 --versionYou should see something like:
Python 3.12.0Note:
$is the prompt of the shell. It will be different for you depending on the settings of your operating system, hence I will indicate the prompt by just the$symbol. On Windows, you may see a>prompt instead.
Caution: The output may be different on your computer depending on the versions of the software installed.
Building the Listings
Throughout this book, you will find code listings that you can compile and run. Each listing is an Auto source file that can be transpiled to Python using the a2p transpiler.
To build a listing, navigate to the listing's directory and run:
$ auto bThis command transpiles the Auto code to Python and runs the resulting Python file. If you encounter any errors, make sure both autoc and python3 are properly installed and accessible from your terminal.
Summary
From now on, we will assume that you have both the Auto toolchain and Python 3.10+ installed on your system.
Next, we will write our first Auto program.