# Installation

{% hint style="info" %}
Note some basic knowledge is assumed as prerequisites, including:

1. Command line interface operation
2. Github commands
3. Yarn & typescript
   {% endhint %}

## Prerequisites

#### Install Aptos CLI

Follow the [Aptos official guide](https://aptos.dev/cli-tools/aptos-cli-tool/install-aptos-cli/) to install the Aptos CLI under the system `$PATH` directory.

After installation, check with the command line shall give you the following message:

```
$ which aptos
YOUR_PATH_TO_/aptos

$ aptos --version
aptos 0.3.4
```

#### Install node.js

Install [node.js](https://nodejs.org/en/download/) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) on your machine.

## Installation

#### Clone repository

Open a terminal, go to the directory you want to install CLI-MSafe, and clone the [Github repository for CLI-MSafe](https://github.com/Momentum-Safe/CLI-MSafe).

```
$ git clone https://github.com/Momentum-Safe/CLI-MSafe.git
```

#### Install dependancies

```
$ cd CLI_MSafe
$ yarn install
```

Wait for package download and installation.

## Setup a wallet

Use `aptos` to initialize a wallet on Devnet.&#x20;

```
$ aptos init
```

Follow the instructions to create a new wallet and the full-node url configurations. For a first time user, we suggest you to follow all default configurations to create a new account on Aptos Devnet.

The command will create a yaml file with the message about full-node api endpoints and account private key and address.

```
$ ls .aptos/config.yaml
```

#### Get some initial fund from faucet

```
aptos account fund-with-faucet --account ${WALLET_ADDRESS_CREATED} --amount 100000000
```

## Getting started

User yarn to start the CLI tool.

```
yarn start
```

Contracts! You have already started to interact with the MSafe through interactive CLI! Feel free to follow the prompts in the CLI tool and play around.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.m-safe.io/aptos/developers/interactive-cli/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
