Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modify installation.md file #2616

Merged
merged 10 commits into from
Nov 4, 2024
57 changes: 57 additions & 0 deletions docs/src/getting-started/installation.md
kkawula marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,63 @@ Install the latest version:
asdf install starknet-foundry latest
```

### Set the installed version:
kkawula marked this conversation as resolved.
Show resolved Hide resolved

- Globally (applies to all directories):

```shell
asdf global starknet-foundry 0.32.0
```

- Locally (applies only to the current directory):

```shell
asdf local starknet-foundry 0.32.0
```

Alternatively, You can create the `.tool-versions` file in your project directory with the version of the foundry by running the code below:

```shell
echo "starknet-foundry 0.32.0" > .tool-versions
```

kkawula marked this conversation as resolved.
Show resolved Hide resolved
### Version Management
kkawula marked this conversation as resolved.
Show resolved Hide resolved

- Common Error
kkawula marked this conversation as resolved.
Show resolved Hide resolved

Users may encounter this error when trying to use `snforge` or `sncast` without setting a version:

```shell
No version is set for command snforge
Consider adding one of the following versions in your config file at starknet-foundry 0.32.0
```

The error code above shows that the version of `Starknet Foundry` is not set. You must set the version using the steps outlined to resolve the issue.

kkawula marked this conversation as resolved.
Show resolved Hide resolved
### Checking Current Version

- To verify your installation and version

```shell
snforge --version
sncast --version
```
kkawula marked this conversation as resolved.
Show resolved Hide resolved

### Switching Versions

To switch between different versions:

```shell
# Install a different version
asdf install starknet-foundry 0.32.0

# Switch global version
asdf global starknet-foundry 0.32.0
od-hunter marked this conversation as resolved.
Show resolved Hide resolved

# Or switch local version
asdf local starknet-foundry 0.32.0
```

See [asdf guide](https://asdf-vm.com/guide/getting-started.html) for more details.

### Installation on Windows
Expand Down
Loading