Skip to content

Commit

Permalink
chore: add cli installation instructions (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejVukosav authored Dec 19, 2024
1 parent 2599ed9 commit 67dfa26
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 81 deletions.
86 changes: 5 additions & 81 deletions docs/02-getting-started/01-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ id: setup
title: Setup
---

import MerodInstallation from '../shared/install-merod.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Setup

This guide will help you set up Calimero in your device.
Expand All @@ -29,87 +33,7 @@ If your platform is not supported, please

### Installation

You can choose to install `merod` using either the installation script or
Homebrew.

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs
defaultValue="homebrew"
values={[
{label: 'Homebrew', value: 'homebrew'},
{label: 'Installation Script', value: 'script'},
]}>

<TabItem value="homebrew">
If you use Homebrew, you can install `meroctl` directly with the following
steps:

#### Steps

1. Add the Calimero Homebrew tap:

```bash
brew tap calimero-network/homebrew-tap
```

2. Install `merod`:

```bash
brew install merod
```

3. Verify the installation:
```bash
merod --version
```

If the version number appears, the installation was successful.

</TabItem>
<TabItem value="script">
The installation script supports multiple terminal environments and will
automatically configure your PATH based on your shell.

#### Steps

1. Open your terminal and run:

```bash
curl -sSf https://raw.githubusercontent.com/calimero-network/core/master/scripts/install-merod.sh | bash
```

2. Source the updated PATH:

```bash
source <your-shell-config-file>
```

Replace `<your-shell-config-file>` with `.bashrc`, `.zshrc`, or the relevant
configuration file for your shell.

3. Verify the installation:
```bash
merod --version
```

If the version number appears, the installation was successful.

#### Notes for Shell Environments

The script automatically updates your PATH based on your shell configuration:

- **Bash**: Updates `.bashrc`.
- **Zsh**: Updates `.zshrc`.
- **Fish**: Modifies `~/.config/fish/config.fish`.
- **Csh/Tcsh**: Updates `.cshrc`.

To apply the changes immediately, use the `source` command as described in step
2 above.

</TabItem>
</Tabs>
<MerodInstallation />

### Next Steps

Expand Down
11 changes: 11 additions & 0 deletions docs/05-developer-tools/01-CLI/01-merod.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ id: merod
title: Merod
---

import MerodInstallation from '../../shared/install-merod.mdx';

Merod is a command-line tool that allows you to manage Calimero nodes.

<details>
<summary>Installation</summary>
<p>
<MerodInstallation />
</p>
</details>

## Usage

```bash title="Terminal"
merod [OPTIONS] --node-name <NAME> <COMMAND>
```
Expand Down
11 changes: 11 additions & 0 deletions docs/05-developer-tools/01-CLI/02-meroctl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ id: meroctl
title: Meroctl
---

import MeroctlInstallation from '../../shared/install-meroctl.mdx';

Meroctl is a command-line tool that enables you to use node functionalities.

<details>
<summary>Installation</summary>
<p>
<MeroctlInstallation />
</p>
</details>

## Usage

```bash title="Terminal"
meroctl [OPTIONS] --node-name <NAME> <COMMAND>
```
Expand Down
81 changes: 81 additions & 0 deletions docs/shared/install-meroctl.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
You can choose to install `meroctl` using either the installation script or
Homebrew.

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs
defaultValue="homebrew"
values={[
{label: 'Homebrew', value: 'homebrew'},
{label: 'Installation Script', value: 'script'},
]}>

<TabItem value="homebrew">
If you use Homebrew, you can install `meroctl` directly with the following
steps:

#### Steps

1. Add the Calimero Homebrew tap:

```bash
brew tap calimero-network/homebrew-tap
```

2. Install `merod`:

```bash
brew install meroctl
```

3. Verify the installation:
```bash
meroctl --version
```

If the version number appears, the installation was successful.

</TabItem>
<TabItem value="script">
The installation script supports multiple terminal environments and will
automatically configure your PATH based on your shell.

#### Steps

1. Open your terminal and run:

```bash
curl -sSf https://raw.githubusercontent.com/calimero-network/core/master/scripts/install-meroctl.sh | bash
```

2. Source the updated PATH:

```bash
source <your-shell-config-file>
```

Replace `<your-shell-config-file>` with `.bashrc`, `.zshrc`, or the relevant
configuration file for your shell.

3. Verify the installation:
```bash
meroctl --version
```

If the version number appears, the installation was successful.

#### Notes for Shell Environments

The script automatically updates your PATH based on your shell configuration:

- **Bash**: Updates `.bashrc`.
- **Zsh**: Updates `.zshrc`.
- **Fish**: Modifies `~/.config/fish/config.fish`.
- **Csh/Tcsh**: Updates `.cshrc`.

To apply the changes immediately, use the `source` command as described in step
2 above.

</TabItem>
</Tabs>
81 changes: 81 additions & 0 deletions docs/shared/install-merod.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
You can choose to install `merod` using either the installation script or
Homebrew.

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs
defaultValue="homebrew"
values={[
{label: 'Homebrew', value: 'homebrew'},
{label: 'Installation Script', value: 'script'},
]}>

<TabItem value="homebrew">
If you use Homebrew, you can install `merod` directly with the following
steps:

#### Steps

1. Add the Calimero Homebrew tap:

```bash
brew tap calimero-network/homebrew-tap
```

2. Install `merod`:

```bash
brew install merod
```

3. Verify the installation:
```bash
merod --version
```

If the version number appears, the installation was successful.

</TabItem>
<TabItem value="script">
The installation script supports multiple terminal environments and will
automatically configure your PATH based on your shell.

#### Steps

1. Open your terminal and run:

```bash
curl -sSf https://raw.githubusercontent.com/calimero-network/core/master/scripts/install-merod.sh | bash
```

2. Source the updated PATH:

```bash
source <your-shell-config-file>
```

Replace `<your-shell-config-file>` with `.bashrc`, `.zshrc`, or the relevant
configuration file for your shell.

3. Verify the installation:
```bash
merod --version
```

If the version number appears, the installation was successful.

#### Notes for Shell Environments

The script automatically updates your PATH based on your shell configuration:

- **Bash**: Updates `.bashrc`.
- **Zsh**: Updates `.zshrc`.
- **Fish**: Modifies `~/.config/fish/config.fish`.
- **Csh/Tcsh**: Updates `.cshrc`.

To apply the changes immediately, use the `source` command as described in step
2 above.

</TabItem>
</Tabs>
4 changes: 4 additions & 0 deletions i18n/en/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,9 @@
"sidebar.tutorialSidebar.category.Login with Wallets": {
"message": "Login with Wallets",
"description": "The label for category Login with Wallets in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.shared": {
"message": "shared",
"description": "The label for category shared in sidebar tutorialSidebar"
}
}

0 comments on commit 67dfa26

Please sign in to comment.