# Installing the Agoric SDK

To write JavaScript smart contracts using the Agoric Zoe framework, first install the Agoric Software Development Kit (SDK).

# 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 https://github.com/Agoric/agoric-sdk
cd agoric-sdk
yarn install
yarn build
yarn link-cli ~/bin/agoric
agoric --version

Then proceed to starting a project.

A more detailed explanation follows.

Watch: Prepare Your Agoric Environment (Nov 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

# Platform: Linux shell or equivalent

The Agoric SDK is supported on Linux, MacOS, or Windows Subsystem for Linux (wsl).

  • To open a terminal on Macs, see Applications>Utilities>terminal in the Finder.
  • To launch a bash shell at a specific folder on Windows 10:
    1. Navigate to that folder in File Explorer.
    2. Click the address bar while in that folder.
    3. Type bash in the address bar and press Enter

# Install Node.js 14.15.0 or higher

Download from nodejs.org (opens new window) and follow the instructions for your platform.

# Install Yarn package manager

Follow Yarn Installation (opens new window) instructions; for example:

npm install --global yarn

# Clone the Agoric SDK

git clone https://github.com/Agoric/agoric-sdk
cd agoric-sdk

To update an existing clone:

git pull

# 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

# Install agoric CLI

Install the agoric command-line interface in a convenient place in your $PATH such as:

yarn link-cli ~/bin/agoric

or:

sudo yarn link-cli /usr/local/bin/agoric

To check that it's installed correctly:

agoric --version