# Installing the Agoric SDK
# Quick Start
go version # Version 1.20.3 or higher node --version # LTS version such as 18.16.0 npm install --global yarn # Install yarn for package management git clone --branch community-dev https://github.com/Agoric/agoric-sdk # Clone the "community-dev" branch cd agoric-sdk yarn install # Asks yarn to install all the dependant node packages yarn build # Builds the agoric-sdk packages (cd packages/cosmic-swingset && make) # Builds the cosmic-swingset package yarn link-cli ~/bin/agoric # Creates an executable script agoric --version # Prints the version number of the SDK
Now you are ready proceed to starting a project.
agoric is not found, then you may need to add the parent directory of where your
yarn link-cli command created a folder. For example, if you created a folder called
Agoric in your
~/bin directory, you may need to add
~/bin to your PATH.
Watch: Prepare Your Agoric Environment (November 2020)
This presentation is a good overview of the Agoric SDK setup process, though a few details are out of date:
- node version: 12.x is too old; use the LTS version 18.16.0 or a later LTS version
git checkout hackathon-2020-11; use the
Note: Video omits adding the Agoric SDK to your PATH.
# Platform: Linux Shell or Equivalent
- To open a terminal on MacOS, see Applications>Utilities>terminal in the Finder.
- To launch a terminal on Linux, use the Terminal application.
- To access WSL from Windows, visit the WSL documentation (opens new window).
# Install Go
Download Go from go.dev/doc/install (opens new window) and follow the instructions for your platform.
go version # Version 1.20.3 or higher
# Install Node.js
Download Node.js from Node.js (opens new window) and follow the instructions for your platform. We recommend installing the LTS version of node 18.
node --version # LTS version such as 18.16.0
Note: Agoric will support all long-term support (LTS) versions of Node.js.
# Install the Yarn Package Manager
Follow Yarn Installation (opens new window) instructions. For example:
npm install --global yarn yarn --version # 1.22.10 or higher
# Install Git
Follow Git installation instructions (opens new window) or use your platform's package manager.
npm install --global git git --version # 2.25.0 or higher
# Clone the Agoric SDK
git clone --branch community-dev https://github.com/Agoric/agoric-sdk cd agoric-sdk
Cloning and installing the Agoric SDK can take a while. Please be patient.
# Install NPM Dependencies
Note: If you run into errors during install or build, make sure you have the relevant developer tools installed. For example, on Debian or Ubuntu Linux, you can run
sudo apt get install build-essential to install these tools.
# Build Packages
Note: MacOS, Linux, and WSL are currently supported. There is currently no support for native Windows 10 or native Windows 11.
# Build the Cosmic Swingset Package
(cd packages/cosmic-swingset && make)
# Install Agoric CLI
Install the Agoric CLI (Command Line Interface) in a convenient place in your
$PATH such as:
yarn link-cli ~/bin/agoric
sudo yarn link-cli /usr/local/bin/agoric
echo $PATH to see your current
$PATH. Here you'll see which directory you should use for
# Check the Agoric Version
To check that it's installed correctly:
agoric --version # v0.18.2 "community-dev" branch
If the install was successful, you are ready to proceed to starting a project.
agoric not be found, then you may need to add the parent directory of where your
yarn link-cli command created the "agoric-sdk" directory.
Please see the youtube video Linux add to $PATH: Fix "command not found" error (Linux & Mac) (opens new window) for more information.