Skip to content

Commit 930d036

Browse files
docs: add setup documentation for Oasis CLI for mac
docs: move macos installation section to setup.md docs: link to macos installation instructions feat: add different platfrom Instructions tabs fix: match config info order with tabs above fix: doc review updates
1 parent 65feade commit 930d036

3 files changed

Lines changed: 152 additions & 85 deletions

File tree

docs/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ description: Powerful CLI for managing Oasis networks, nodes, tokens and dApps
66
# Oasis Command Line Interface
77

88
Oasis command-line interface (CLI) is a powerful all-in-one tool for
9-
interacting with the Oasis Network. You can download the latest release
10-
binaries from the [GitHub repository].
9+
interacting with the Oasis Network.
10+
Head to the **[installation instructions]** to download and install it!
11+
12+
[installation instructions]: setup.mdx
1113

1214
It boasts a number of handy features:
1315

@@ -19,8 +21,8 @@ It boasts a number of handy features:
1921
- connecting to remote (via TCP/IP) or local (Unix socket) Oasis node
2022
instance
2123
- Powerful wallet features:
22-
- standard token operations (transfers, allowances, deposits, withdrawals and
23-
balance queries)
24+
- standard token operations (transfers, allowances, deposits, withdrawals
25+
and balance queries)
2426
- file-based wallet with password protection
2527
- full Ledger hardware wallet support
2628
- address book
@@ -32,7 +34,7 @@ It boasts a number of handy features:
3234
schemes
3335
- raw, BIP-44, ADR-8 and Ledger's legacy derivation paths
3436
- Node operator features:
35-
- Oasis node inspection and healthchecks
37+
- Oasis node inspection and health-checks
3638
- network governance transactions
3739
- staking reward schedule transactions
3840
- Developer features:
@@ -43,5 +45,4 @@ It boasts a number of handy features:
4345
calls
4446
- debugging tools for deployed Wasm contracts
4547
- inspection of blocks, transactions, results and events
46-
47-
[GitHub repository]: https://github.com/oasisprotocol/cli/releases
48+

docs/setup.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs/setup.mdx

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

0 commit comments

Comments
 (0)