|
| 1 | +import Tabs from '@theme/Tabs'; |
| 2 | +import TabItem from '@theme/TabItem'; |
| 3 | + |
| 4 | +# Setup |
| 5 | + |
| 6 | +## Download and Run |
| 7 | + |
| 8 | +The Oasis team provides CLI binaries for Linux, |
| 9 | +macOS and Windows operating systems. |
| 10 | +If you want to run it on another platform, |
| 11 | +you can [build the CLI from source][cli-source]. |
| 12 | + |
| 13 | +Download the latest release from our [GitHub repository][cli-releases] and |
| 14 | +follow the instructions for **your platform** below: |
| 15 | + |
| 16 | +<Tabs> |
| 17 | + <TabItem value="Linux" label="Linux"> |
| 18 | + #### Prerequisites |
| 19 | + |
| 20 | + - amd64 or arm64 Linux. |
| 21 | + - Ensure `~/.local/bin` is on your `PATH`: |
| 22 | + ```shell |
| 23 | + echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc |
| 24 | + source ~/.bashrc |
| 25 | + mkdir -p ~/.local/bin |
| 26 | + ``` |
| 27 | + |
| 28 | + #### Installation |
| 29 | + |
| 30 | + 1. Download the latest **Linux** archive (e.g. `oasis_cli_X.Y.Z_linux_amd64.tar.gz`). |
| 31 | + 2. Extract it: |
| 32 | + ```shell |
| 33 | + cd ~/Downloads |
| 34 | + tar -xzf oasis_cli_X.Y.Z_linux_amd64.tar.gz # adjust version and architecture |
| 35 | + ``` |
| 36 | + 3. Move the binary to your path: |
| 37 | + ```shell |
| 38 | + mv oasis ~/.local/bin/ |
| 39 | + ``` |
| 40 | + 4. Verify: |
| 41 | + ```shell |
| 42 | + oasis --version |
| 43 | + ``` |
| 44 | + </TabItem> |
| 45 | + |
| 46 | + <TabItem value="macOS" label="macOS"> |
| 47 | + #### Prerequisites |
| 48 | + |
| 49 | + - macOS (Apple Silicon & Intel). |
| 50 | + - Ensure `~/.local/bin` is on your `PATH` (add it in `~/.zshrc` or `~/.bashrc`): |
| 51 | + ```shell |
| 52 | + echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc |
| 53 | + source ~/.zshrc |
| 54 | + mkdir -p ~/.local/bin |
| 55 | + ``` |
| 56 | + |
| 57 | + #### Installation |
| 58 | + |
| 59 | + 1. Download the latest **macOS** archive (e.g. `oasis_cli_X.Y.Z_darwin_all.tar.gz`) from the releases page. |
| 60 | + 2. Extract it: |
| 61 | + ```shell |
| 62 | + cd ~/Downloads |
| 63 | + tar -xzf oasis_cli_X.Y.Z_darwin_all.tar.gz # adjust version |
| 64 | + ``` |
| 65 | + 3. Move the binary to your path: |
| 66 | + ```shell |
| 67 | + mv oasis ~/.local/bin/ |
| 68 | + ``` |
| 69 | + 4. Bypass Gatekeeper (first run only): |
| 70 | + ```shell |
| 71 | + xattr -d com.apple.quarantine ~/.local/bin/oasis |
| 72 | + ``` |
| 73 | + If a dialog appears, open **System Settings → Privacy & Security** and click **Open Anyway**. |
| 74 | + 5. Verify: |
| 75 | + ```shell |
| 76 | + oasis --version |
| 77 | + ``` |
| 78 | + </TabItem> |
| 79 | + |
| 80 | + <TabItem value="Windows" label="Windows"> |
| 81 | + #### Prerequisites |
| 82 | + |
| 83 | + - Windows 10/11 (x86-64). |
| 84 | + - Decide on a folder already in your `PATH` (e.g. `%USERPROFILE%\bin`) or add one. |
| 85 | + |
| 86 | + #### Installation |
| 87 | + |
| 88 | + 1. Download the latest **Windows** ZIP file (e.g. `oasis_cli_X.Y.Z_windows_amd64.zip`). |
| 89 | + 2. Extract it (double-click or `tar -xf` in PowerShell). |
| 90 | + 3. Copy `oasis.exe` to a directory on your `PATH`, for example: |
| 91 | + ```powershell |
| 92 | + New-Item -ItemType Directory -Force "$env:USERPROFILE\bin" |
| 93 | + Copy-Item .\oasis.exe "$env:USERPROFILE\bin\" |
| 94 | + ``` |
| 95 | + If that folder isn’t on the `PATH`, add it via **System Properties → Environment Variables**. |
| 96 | + 4. Verify: |
| 97 | + ```powershell |
| 98 | + oasis --version |
| 99 | + ``` |
| 100 | + </TabItem> |
| 101 | +</Tabs> |
| 102 | + |
| 103 | +When running the Oasis CLI for the first time, it will generate a configuration |
| 104 | +file and populate it with the current Mainnet and Testnet networks. It will also |
| 105 | +configure all [ParaTimes supported by the Oasis Foundation][paratimes]. |
| 106 | + |
| 107 | +## Configuration |
| 108 | + |
| 109 | +The configuration folder of Oasis CLI is located: |
| 110 | + |
| 111 | +- on Linux: |
| 112 | + - `$HOME/.config/oasis/` |
| 113 | +- on macOS: |
| 114 | + - `/Users/$USER/Library/Application Support/oasis/` |
| 115 | +- on Windows: |
| 116 | + - `%USERPROFILE%\AppData\Local\oasis\` |
| 117 | + |
| 118 | +There, you will find `cli.toml` which contains the configuration of the |
| 119 | +networks, ParaTimes and your wallet. Additionally, each file-based account in |
| 120 | +your wallet will have a separate, password-encrypted JSON file in the same |
| 121 | +folder named after the name of the account with the `.wallet` extension. |
| 122 | + |
| 123 | +## Multiple Profiles |
| 124 | + |
| 125 | +You can utilize multiple profiles of your Oasis CLI by |
| 126 | +passing the `--config` parameter |
| 127 | +with a location of a desired `cli.toml`: |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | +## Back Up Your Wallet |
| 134 | + |
| 135 | +To back up your complete Oasis CLI configuration including your wallet, archive |
| 136 | +the configuration folder containing `cli.toml` and `.wallet` files. |
| 137 | + |
| 138 | +[cli-releases]: https://github.com/oasisprotocol/cli/releases |
| 139 | +[cli-source]: https://github.com/oasisprotocol/cli |
| 140 | +[paratimes]: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/other-paratimes/README.mdx |
0 commit comments