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

# CLI

> Authenticate, configure MCP, and search from the terminal

[`keenable-cli`](https://github.com/keenableai/keenable-cli) is a single-binary CLI for Keenable — configure MCP for your AI clients, search the web, and manage API keys from the terminal.
No API key is needed to get started with the CLI. To raise rate limits on the CLI, please log in. To learn more, see [authentication](/authentication).

## Installation

<CodeGroup>
  ```bash Homebrew theme={null}
  brew install keenableai/tap/keenable-cli
  ```

  ```bash macOS / Linux theme={null}
  curl --proto '=https' --tlsv1.2 -LsSf \
    https://github.com/keenableai/keenable-cli/releases/latest/download/keenable-cli-installer.sh \
    | sh
  ```

  ```powershell PowerShell theme={null}
  irm https://github.com/keenableai/keenable-cli/releases/latest/download/keenable-cli-installer.ps1 | iex
  ```

  ```bash Source theme={null}
  cargo install --git https://github.com/keenableai/keenable-cli
  ```
</CodeGroup>

## Quick start

```bash theme={null}
# Login with your Keenable account
keenable login

# Configure MCP for your AI clients (Claude Code, Cursor, etc.)
keenable configure-mcp --all

# Search the web
keenable search "rust async patterns" -p
```

## Authentication

```bash theme={null}
# Device-code login (opens browser)
keenable login

# Save API key directly (CI, servers)
keenable login --api-key <KEY>

# Clear stored credentials
keenable logout
```

## MCP setup

```bash theme={null}
# Show client status
keenable configure-mcp

# Configure all detected clients
keenable configure-mcp --all

# Configure a specific client
keenable configure-mcp --cursor

# Remove Keenable from all clients
keenable reset --all
```

Supported clients: Claude Code, Cursor, Windsurf, Codex, OpenCode.

## Search

```bash theme={null}
# YAML output (for agents)
keenable search "AI news"

# Pretty output (for humans)
keenable search "AI news" -p

# Restrict to site
keenable search "AI news" --site techcrunch.com

# Date filter
keenable search "AI news" --published-after 2026-01-01

# Date filter
keenable search "AI news" --acquired-before 2026-05-01

# Use a specific API key
keenable search "AI news" --api-key KEY
```

### Date and time filters

`--acquired-after`, `--acquired-before`, `--published-after`, and `--published-before` each accept **one** of the following formats:

* **Date** in RFC 3339 `full-date` form (`YYYY-MM-DD`) — covers that whole day in UTC. On an `--*-after` flag it resolves to `00:00:00` on that date; on a `--*-before` flag it resolves to `23:59:59.999` on that date, so pages from the named day are kept at either end. Pass a timestamp instead to cut at an exact instant.
* **Timestamp** in ISO 8601 form (`YYYY-MM-DDTHH:MM:SS[.sss][±HH:MM]`). When a timezone offset is not provided, the timezone is interpreted as UTC.
* **Relative delta** (`<number><unit>`, e.g. `7d`, `30min`) — resolves to the request time minus the delta, truncated to minute precision. Supported units: `min` (minutes), `h` (hours), `d` (days), `mo` (months), `y` (years).

```bash theme={null}
# Resolves to 2026-01-15T00:00:00Z
keenable search "AI news" --published-after 2026-01-15

# Resolves to 2026-01-15T23:59:59.999Z — the 15th is kept
keenable search "AI news" --published-before 2026-01-15

# No offset → UTC
keenable search "AI news" --published-after 2026-01-15T10:30:00
keenable search "AI news" --published-after 2026-01-15T10:30:00.500-05:00

# 7 days before request time
keenable search "AI news" --acquired-after 7d

# 30 minutes before request time
keenable search "AI news" --acquired-after 30min
```

Relative deltas may be combined with absolute values across the two bounds of a window:

```bash theme={null}
keenable search "AI news" --published-after 1y --published-before 6mo
keenable search "AI news" --acquired-after 2024-01-01 --acquired-before 30d
```

For example, at request time `2026-05-18T14:23:45Z`, `--acquired-after 2h` resolves to `2026-05-18T12:23:00Z` — a document acquired at `12:22:59Z` is dropped, one acquired at `12:23:00Z` is kept.

Mind the difference between a date and a timestamp on a `--*-before` flag: `--acquired-before 2026-05-01` keeps a page acquired at `2026-05-01T14:31:13Z`, while `--acquired-before 2026-05-01T00:00:00Z` drops it. Use the date form to mean "up to and including that day", and the timestamp form to cut at midnight.

## Fetch

```bash theme={null}
# Fetch page content (YAML)
keenable fetch https://example.com

# Pretty output
keenable fetch https://example.com -p

# LLM extraction: return only the instruction's output instead of the full page
keenable fetch https://example.com --prompt "List all pricing tiers with their monthly prices"
```

## Updating

The CLI checks for updates automatically once per hour. To update manually:

```bash theme={null}
# Homebrew
brew update && brew upgrade keenable-cli
```

Or re-run the installer script.
