After running `yarn global add @nestjs/cli` command, if you are getting the error "nest command not found", there could be a few reasons for this issue. Here are some possible solutions:
1. Make sure that the global bin directory is in your system's PATH environment variable. You can check if the directory is included in the PATH by running `echo $PATH` command in your terminal. If it's not included, you can add it by running the following command:
```bash
export PATH="$(yarn global bin):$PATH"
```
This command adds the global bin directory to the PATH environment variable.
2. If you are using a shell other than bash, such as zsh, you may need to add the global bin directory to your shell's configuration file. For example, if you are using zsh, you can add the following line to your `~/.zshrc` file:
```bash
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
```
3. If you are still having issues, you can try uninstalling and reinstalling the `@nestjs/cli` package:
```bash
yarn global remove @nestjs/cli
yarn global add @nestjs/cli
```
This will remove the package and install it again.
4. If none of the above solutions work, you can try installing the package locally instead of globally:
```bash
yarn add @nestjs/cli --dev
```
This will install the package in your project's `node_modules` directory.
These solutions should help you resolve the ""nest command not found"" error after running `yarn global add @nestjs/cli` command.