> ## Documentation Index
> Fetch the complete documentation index at: https://monid.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up with CLI

> Install the Monid CLI and start querying data from the command line.

Install the Monid CLI and start querying data from the command line.

## 1. Install the CLI

```bash theme={null}
npm install -g @monid-ai/cli
```

Verify the installation:

```bash theme={null}
monid --version
```

## 2. Get an API Key

Go to [Monid Dashboard](https://app.monid.ai) to create an account if you don't have one. Then go to [API key management page](https://app.monid.ai/access/api-keys) to create an API key.

**Copy the key -- it is only shown once.**

## 3. Add the Key to the CLI

```bash theme={null}
monid keys add --label main --key <your-api-key>
```

Then activate the newly added API key:

```shellscript theme={null}
monid keys active ---lable main
```

## 4. Example Usage

```bash theme={null}
# Search for data endpoints
monid discover -q "twitter posts"

# Inspect an endpoint to see its input schema and pricing
monid inspect -p apify -e /apidojo/tweet-scraper

# Run the endpoint
monid run -p apify -e /apidojo/tweet-scraper \
  -i '{"searchTerms":["AI"],"maxItems":10}'

# Get the results (use the run ID from the previous command)
monid runs get -r <run-id> -w
```

## Next Steps

See the [CLI Reference](/cli/overview) for the full command documentation.

<Note>
  Prefer paying per run with a crypto wallet (USDC) instead of a prepaid balance? See [Pay with x402](/guide/pay-with-x402).
</Note>
