# Installation

## Ocean CLI Installation

The Ocean CLI allows you to interact with the Ocean Network directly from your terminal.

### Prerequisites

* **Node.js**: [Download here](https://nodejs.org/).
* **Unix-based OS**: macOS or Linux (Windows users should use WSL).

### Installation

1. **Clone the Repository**:

   ```bash
   git clone https://github.com/oceanprotocol/ocean-cli.git
   cd ocean-cli
   ```
2. **Select Node Version**:

   ```bash
   nvm use
   ```
3. **Install Dependencies**:

   ```bash
   npm install
   ```
4. **Build the Tool**:

   ```bash
   npm run build
   ```

### Configuration

Set up your environment variables to connect to the network.

```bash
# Your Wallet Private Key
export PRIVATE_KEY="0x_YOUR_PRIVATE_KEY"

# RPC URL for the blockchain (e.g., Ethereum, Polygon, Sepolia)
export RPC="https://rpc.ankr.com/eth"

# Ocean Node URL
# You can find a reliable node on the Ocean Nodes Dashboard (https://nodes.oceanprotocol.com)
export NODE_URL="https://compute1.oceanprotocol.com/"

# Prevent the CLI from running in a loop (useful for scripting)
export AVOID_LOOP_RUN='true'
```

### Verify Installation

Run the help command to see if everything is working:

```bash
npm run cli -- --help
```

{% hint style="info" %}
If you have multiple files, GitBook makes it easy to import full repositories too — allowing you to keep your GitBook content in sync.
{% endhint %}


---

# 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://docs.oncompute.ai/ocean-cli/markdown.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.
