# Install Avalanche-CLI

## Build Your First Subnet

The first step of learning Subnet development is learning to use [Avalanche-CLI](https://github.com/ava-labs/avalanche-cli).

The best way to get started is by jumping in and deploying your first Subnet.

This tutorial walks you through the process of using Avalanche-CLI for the first time by creating a Subnet, deploying it to the local network, and connecting to it with MetaMask.

### Installation

The fastest way to install the latest Avalanche-CLI binary is by running the install script:

```shell
curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh | sh -s
```

The binary installs inside the `~/bin` directory. If the directory doesn't exist, it will be created.

You can run all of the commands in this tutorial by calling `~/bin/avalanche`.

You can also add the command to your system path by running

```shell
export PATH=~/bin:$PATH
```

If you add it to your path, you should be able to call the program anywhere with just `avalanche`. To add it to your path permanently, add an export command to your shell initialization script (ex: .bashrc or .zshrc).

For more detailed installation instructions, see Avalanche-CLI Installation

To add it to your path permanently, add an export command to your shell initialization script. If you run `bash`, use `.bashrc`. If you run `zsh`, use `.zshrc`.

For example:

```
export PATH=~/bin:$PATH >> .bashrc
```

### Checking Your Installation[​](https://docs.avax.network/subnets/install-avalanche-cli#checking-your-installation) <a href="#checking-your-installation" id="checking-your-installation"></a>

You can test your installation by running `avalanche --version`. The tool should print the running version.

### Updating[​](https://docs.avax.network/subnets/install-avalanche-cli#updating) <a href="#updating" id="updating"></a>

To update your installation, you need to delete your current binary and download the latest version using the preceding steps.

### Building from Source[​](https://docs.avax.network/subnets/install-avalanche-cli#building-from-source) <a href="#building-from-source" id="building-from-source"></a>

The source code is available in this [GitHub repository](https://github.com/ava-labs/avalanche-cli).

After you've cloned the repository, checkout the tag you'd like to run. You can compile the code by running `./scripts/build.sh` from the top level directory.

The build script names the binary `./bin/avalanche`.

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://movement.gitbook.io/movement/install-avalanche-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
