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

# CLI

> Use the agntdata command-line interface for quick data lookups.

## Overview

The agntdata CLI (`agnt_`) provides quick access to social media data from your terminal. Useful for testing, scripting, and quick lookups without writing code.

<Note>
  The CLI package is currently in development and may not yet be published to npm.
</Note>

## Installation

Install the CLI globally via npm:

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

Or using pnpm:

```bash theme={null}
pnpm add -g @agntdata/cli
```

## Authentication

### Interactive Login

The easiest way to authenticate:

```bash theme={null}
agnt_ login
```

This opens your browser for authentication and stores your credentials in `~/.agntdata/config.json`.

### Check Authentication

Verify your authentication status:

```bash theme={null}
agnt_ whoami
```

### Logout

Clear your saved credentials:

```bash theme={null}
agnt_ logout
```

## Commands

### List Available APIs

```bash theme={null}
agnt_ apis
```

Shows all available platforms with their descriptions.

```bash theme={null}
agnt_ apis --json
```

Output as JSON for scripting.

### Make API Calls

Use the `call` command to make API requests:

```bash theme={null}
agnt_ call <platform> <endpoint> [options]
```

**Options:**

| Option                  | Description                                   |
| ----------------------- | --------------------------------------------- |
| `-q, --query <params>`  | Query parameters (e.g., `username=microsoft`) |
| `-d, --data <json>`     | JSON body for POST requests                   |
| `-m, --method <method>` | HTTP method (GET, POST, etc.)                 |
| `--raw`                 | Output raw response without formatting        |

### Examples

```bash theme={null}
# Get LinkedIn company details
agnt_ call linkedin /get-company-details -q username=microsoft

# Get YouTube channel info
agnt_ call youtube /get-channel-details -q username=@mkbhd

# Get X user profile
agnt_ call x /get-user-details -q username=elonmusk
```

## Available Platforms

| Platform    | Slug        |
| ----------- | ----------- |
| LinkedIn    | `linkedin`  |
| YouTube     | `youtube`   |
| TikTok      | `tiktok`    |
| X (Twitter) | `x`         |
| Instagram   | `instagram` |
| Reddit      | `reddit`    |
| Facebook    | `facebook`  |

## Configuration

Credentials are stored in `~/.agntdata/config.json` after running `agnt_ login`.

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Learn the basics of agntdata.
  </Card>

  <Card title="API Reference" icon="code" href="/apis/overview">
    Browse all available endpoints.
  </Card>
</CardGroup>
