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

# Commands

> Every onlyfans CLI command — connect accounts, manage them, send messages, stream events, and run health checks.

Run `onlyfans <command> --help` for per-command flags.

## Connect & identity

| Command                   | What it does                                                                       |
| ------------------------- | ---------------------------------------------------------------------------------- |
| `onlyfans connect`        | Hosted connect flow (email/password, mobile, OTP). Requires `ONLYFANSKIT_API_KEY`. |
| `onlyfans login`          | Log in with credentials and store the session.                                     |
| `onlyfans whoami`         | Show the authenticated creator's identity.                                         |
| `onlyfans session`        | Inspect the current session.                                                       |
| `onlyfans session:export` | Export the stored session.                                                         |
| `onlyfans session:clear`  | Clear the stored session.                                                          |

## Accounts

| Command                       | What it does                       |
| ----------------------------- | ---------------------------------- |
| `onlyfans accounts:list`      | List registered accounts.          |
| `onlyfans accounts:add`       | Register a named account.          |
| `onlyfans accounts:remove`    | Remove a registered account.       |
| `onlyfans accounts:health`    | Validate each account's session.   |
| `onlyfans accounts:aggregate` | Aggregate metrics across accounts. |

## Operations

| Command                | What it does                                       |
| ---------------------- | -------------------------------------------------- |
| `onlyfans health`      | Validate the session against the API.              |
| `onlyfans doctor`      | Diagnose configuration and connectivity.           |
| `onlyfans metrics`     | Show request metrics.                              |
| `onlyfans rules:check` | Verify the client is up to date and ready to call. |
| `onlyfans export`      | Export account data.                               |

## Messaging & realtime

| Command                 | What it does                             |
| ----------------------- | ---------------------------------------- |
| `onlyfans chats:list`   | List recent chats.                       |
| `onlyfans message:send` | Send a direct message.                   |
| `onlyfans listen`       | Stream realtime events to the terminal.  |
| `onlyfans webhook:test` | Send a synthetic event to a webhook URL. |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Validate a session
onlyfans health --json

# Send a DM
onlyfans message:send --to 123456 --text "Hi!"

# Stream events
onlyfans listen --account main

# Verify the client is ready
onlyfans rules:check
```
