Add avm docs (#4)
This commit is contained in:
parent
353fd6f638
commit
16fbce6328
|
@ -17,9 +17,10 @@
|
||||||
- [Intermediate]()
|
- [Intermediate]()
|
||||||
- [Anchor Periphery](./chapter_4/anchor_periphery.md)
|
- [Anchor Periphery](./chapter_4/anchor_periphery.md)
|
||||||
- [CLI](./chapter_4/cli.md)
|
- [CLI](./chapter_4/cli.md)
|
||||||
|
- [AVM](./chapter_4/avm.md)
|
||||||
- [IDL]()
|
- [IDL]()
|
||||||
- [Anchor BTS]()
|
- [Anchor BTS]()
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- [Reference Links](./reference_links.md)
|
- [Reference Links](./reference_links.md)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
## Rust
|
## Rust
|
||||||
|
|
||||||
Go [here](https://www.rust-lang.org/tools/install) to install Rust.
|
Go [here](https://www.rust-lang.org/tools/install) to install Rust.
|
||||||
|
@ -35,4 +36,26 @@ Now verify the CLI is installed properly.
|
||||||
|
|
||||||
```
|
```
|
||||||
anchor --version
|
anchor --version
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Installing using Anchor version manager (avm)
|
||||||
|
|
||||||
|
Anchor version manager is a tool for using multiple versions of the anchor-cli. It will require the same dependencies as building from source. It is recommended you uninstall the NPM package if you have it installed.
|
||||||
|
|
||||||
|
Install `avm` using Cargo. Note this will replace your `anchor` binary if you had one installed.
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo install --git https://github.com/project-serum/anchor avm --locked --force
|
||||||
|
```
|
||||||
|
|
||||||
|
Install the latest version of the CLI using `avm`. You can also use the command to upgrade to the latest release in the future.
|
||||||
|
|
||||||
|
```
|
||||||
|
avm use latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify the installation.
|
||||||
|
|
||||||
|
```
|
||||||
|
anchor --version
|
||||||
|
```
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
# Anchor Version Manager
|
||||||
|
|
||||||
|
Anchor Version Manager (avm) is provided to manage multiple installations of the anchor-cli binary. This may be required to produce verifiable builds, or if you'd prefer to work with an alternate version.
|
||||||
|
|
||||||
|
```
|
||||||
|
Anchor version manager
|
||||||
|
|
||||||
|
USAGE:
|
||||||
|
avm <SUBCOMMAND>
|
||||||
|
|
||||||
|
OPTIONS:
|
||||||
|
-h, --help Print help information
|
||||||
|
-V, --version Print version information
|
||||||
|
|
||||||
|
SUBCOMMANDS:
|
||||||
|
help Print this message or the help of the given subcommand(s)
|
||||||
|
install Install a version of Anchor
|
||||||
|
list List available versions of Anchor
|
||||||
|
uninstall Uninstall a version of Anchor
|
||||||
|
use Use a specific version of Anchor
|
||||||
|
```
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```
|
||||||
|
avm install <version>
|
||||||
|
```
|
||||||
|
|
||||||
|
Install the specified version of anchor-cli. The version argument should follow semver versioning. It is also possible to use `latest` as the version argument to install the latest version.
|
||||||
|
|
||||||
|
## List
|
||||||
|
|
||||||
|
```
|
||||||
|
avm list
|
||||||
|
```
|
||||||
|
|
||||||
|
Lists available versions of anchor-cli.
|
||||||
|
|
||||||
|
```
|
||||||
|
0.3.0
|
||||||
|
0.4.0
|
||||||
|
0.4.1
|
||||||
|
0.4.2
|
||||||
|
0.4.3
|
||||||
|
0.4.4
|
||||||
|
0.4.5
|
||||||
|
0.5.0
|
||||||
|
0.6.0
|
||||||
|
0.7.0
|
||||||
|
0.8.0
|
||||||
|
0.9.0
|
||||||
|
0.10.0
|
||||||
|
0.11.0
|
||||||
|
0.11.1
|
||||||
|
0.12.0
|
||||||
|
0.13.0
|
||||||
|
0.13.1
|
||||||
|
0.13.2
|
||||||
|
0.14.0
|
||||||
|
0.15.0
|
||||||
|
0.16.0
|
||||||
|
0.16.1
|
||||||
|
0.16.2
|
||||||
|
0.17.0
|
||||||
|
0.18.0
|
||||||
|
0.18.2
|
||||||
|
0.19.0
|
||||||
|
0.20.0 (installed)
|
||||||
|
0.20.1 (latest, installed, current)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Uninstall
|
||||||
|
|
||||||
|
```
|
||||||
|
avm uninstall <version>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Use
|
||||||
|
|
||||||
|
```
|
||||||
|
avm use <version>
|
||||||
|
```
|
||||||
|
|
||||||
|
Use a specific version. This version will remain in use until you change it by calling the same command again. Similarly to `avm install`, you can also use `latest` for the version.
|
Loading…
Reference in New Issue