# Installation

Grace Protocol provides a CLI and a REST API. Install the CLI to manage wallets, policies, and transactions from the command line.

***

## CLI

The CLI is the primary tool for managing wallets, policies, and transactions. It is open source and distributed as an npm package and a standalone binary.

### npm (recommended)

```bash
npm install -g @graceprotocol/cli
```

### Standalone binary

Download the latest release for your platform from [github.com/graceprotocol/cli/releases](https://github.com/graceprotocol/cli/releases).

**macOS (Apple Silicon)**

```bash
curl -fsSL https://graceprotocol.org/install.sh | sh
```

**macOS (Intel)**

```bash
curl -fsSL https://graceprotocol.org/install.sh | sh -s -- --arch amd64
```

**Linux**

```bash
curl -fsSL https://graceprotocol.org/install.sh | sh
```

**Windows**

Download the `.exe` from the releases page and add it to your `PATH`.

### Verify

```bash
grace --version
# graceprotocol/cli v1.0.0 darwin-arm64
```

***

## CI/CD environments

For non-interactive environments, set the API key as an environment variable:

```bash
export GRACE_API_KEY=rp_live_...
grace wallet balance --agent my-agent
```

The CLI reads `GRACE_API_KEY` automatically. No `grace auth login` step required.

***

## Updating

```bash
npm update -g @graceprotocol/cli
```

Or re-run the install script to get the latest binary.


---

# 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.graceprotocol.org/getting-started/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.
