# Installing the Agoric SDK

To write JavaScript smart contracts using the Agoric Zoe framework, first install the Agoric Software Development Kit (SDK). The Agoric SDK is currently supported on MacOS, Linux, and Windows Subsystem for Linux (WSL). There is currently no support for Windows 10 or Windows 11.

After installing the Agoric SDK, you can proceed to starting a project with the Agoric CLI to create and deploy smart contracts.

# Quick Start

If you're familar with JavaScript development tools such as node, yarn, and git:

node --version # 14.15.0 or higher
npm install --global yarn
git clone -b community-dev https://github.com/Agoric/agoric-sdk # "community-dev" branch
cd agoric-sdk
yarn install
yarn build
yarn link-cli ~/bin/agoric # creates an Agoric directory to reference
agoric --version # should print the version number of the SDK

Now you are ready proceed to starting a project.

If 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 14.15.0 or higher
  • skip git checkout hackathon-2020-11; use the default master branch

Note: Video omits adding the Agoric SDK to your PATH.

# Platform: Linux shell or equivalent

The Agoric SDK is supported on Linux, MacOS, Windows Subsystem for Linux (WSL), and

  • 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 Node.js 14.15.0 or higher

Download from Node.js (opens new window) and follow the instructions for your platform.

node --version # 14.15.0 or higher

# Install 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 -b 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

yarn install

Note: If you run into errors during install or build, make sure you have build-essential installed. gcc --version.

# Build packages

yarn build

Note: MacOS, Linux, and WSL are currently supported. There is currently no support for Windows 10 or Windows 11.

# Install agoric CLI

Install the agoric 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

Note: Run echo $PATH to see your current $PATH. Here you'll see which directory you should use for yarn link-cli.

# Check the version

To check that it's installed correctly:

agoric --version # v0.16.0 "community-dev" branch

If the install was successful, you are ready to proceed to starting a project.

Should agoric not be found, then you may need to add the parent directory of where your yarn link-cli command created a "agoric" directory.

Please see the Linux add to $PATH: Fix "command not found" error (Linux & Mac) - YouTube (opens new window) for more information.