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

# edgefinder ask — AI-powered sports analysis command

> Ask EdgeFinder an AI-powered sports question for NFL, NBA, or MLB. Get betting picks, player breakdowns, and matchup predictions from your terminal.

The `ask` command sends a natural-language question to EdgeFinder's AI and returns a sports analysis response. By default it analyzes NFL, but you can switch to NBA or MLB with a single flag. Run `edgefinder` with no subcommand to enter an interactive REPL where you can ask follow-up questions without retyping the command.

## Syntax

```bash theme={null}
edgefinder ask <question> [--nfl] [--nba] [--mlb] [--json]
```

## Options

<ParamField path="query.question" type="string" required>
  Your sports analysis question in natural language. Wrap multi-word questions in quotes.
</ParamField>

<ParamField path="query.--nfl" type="boolean" default="true">
  Analyze using NFL context. This is the default league; you do not need to pass this flag explicitly.
</ParamField>

<ParamField path="query.--nba" type="boolean">
  Switch to NBA context. Overrides the default NFL league.
</ParamField>

<ParamField path="query.--mlb" type="boolean">
  Switch to MLB context. Overrides the default NFL league.
</ParamField>

<ParamField path="query.--json" type="boolean">
  Output the full JSON response instead of plain text. The JSON payload includes the AI's response, full conversation history, token usage statistics, and rate limit information.
</ParamField>

## Examples

<CodeGroup>
  ```bash NFL (default) theme={null}
  edgefinder ask "Who should I bet on tonight?"
  ```

  ```bash NBA theme={null}
  edgefinder ask --nba "Lakers vs Celtics prediction"
  ```

  ```bash MLB theme={null}
  edgefinder ask --mlb "Yankees vs Red Sox prediction"
  ```

  ```bash JSON output theme={null}
  edgefinder ask --json "Best NFL picks this week"
  ```
</CodeGroup>

### Sample output

```text theme={null}
Analyzing (NFL)...
Based on current injury reports and recent form, I'd look at the Chiefs -3.5 against
the Raiders this week. Mahomes has a 74% cover rate at home over the last two seasons,
and the Raiders' secondary ranks 28th against the pass...
```

With `--json`:

```json theme={null}
{
  "response": "Based on current injury reports and recent form...",
  "conversationHistory": [
    { "role": "user", "content": "Best NFL picks this week" },
    { "role": "assistant", "content": "Based on current injury reports..." }
  ],
  "userId": "usr_abc123",
  "threadId": "thd_xyz789",
  "usage": {
    "tokensUsed": 412,
    "promptTokens": 88,
    "completionTokens": 324,
    "rateLimitRemaining": {
      "hour": 48,
      "minute": 9
    }
  }
}
```

## League examples

<Tabs>
  <Tab title="NFL">
    ```bash theme={null}
    edgefinder ask "Is Lamar Jackson a good bet for passing yards this week?"
    edgefinder ask "Give me three player props for Sunday's games"
    edgefinder ask "What's the injury situation for the 49ers?"
    ```
  </Tab>

  <Tab title="NBA">
    ```bash theme={null}
    edgefinder ask --nba "Best player prop bets for tonight?"
    edgefinder ask --nba "Is the over/under on Nuggets vs Thunder good value?"
    edgefinder ask --nba "Which teams are on a back-to-back tonight?"
    ```
  </Tab>

  <Tab title="MLB">
    ```bash theme={null}
    edgefinder ask --mlb "Best starting pitcher matchups this week"
    edgefinder ask --mlb "Yankees vs Red Sox prediction"
    edgefinder ask --mlb "Which teams have the best run line value today?"
    ```
  </Tab>
</Tabs>

## Interactive mode

Run `edgefinder` with no subcommand to start an interactive REPL session. This lets you ask follow-up questions and refine your analysis without re-entering the full command each time.

```bash theme={null}
edgefinder
```

Inside the REPL, use slash commands to switch the active league:

| Command | Effect                 |
| ------- | ---------------------- |
| `/nfl`  | Switch to NFL analysis |
| `/nba`  | Switch to NBA analysis |
| `/mlb`  | Switch to MLB analysis |

<Tip>
  The interactive mode maintains conversation history across turns, so you can ask follow-up questions like "What about the over/under on that game?" and EdgeFinder will remember the context from your previous message.
</Tip>

<Note>
  If you pass both `--nba` and `--mlb`, `--mlb` takes precedence. If neither is passed, NFL is used.
</Note>
