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

# Search

> Search across threads and artifacts

Search for threads and artifacts by text, state, type, and other filters. Returns a unified list sorted by recency.

## Usage

```bash theme={null}
rip search <query> [options]
```

## Options

| Flag                     | Description                                                         |
| ------------------------ | ------------------------------------------------------------------- |
| `--type <type>`          | Filter: `thread` or `artifact`                                      |
| `--since <when>`         | ISO 8601 timestamp or integer days back (e.g. `7` = last week)      |
| `--limit <n>`            | Max results (default: 50, max: 200)                                 |
| `--offset <n>`           | Pagination offset                                                   |
| `--state <state>`        | Thread state: `open` or `closed`                                    |
| `--intent <intent>`      | Filter by last message intent                                       |
| `--ref <uuid>`           | Filter threads referencing this artifact                            |
| `--artifact-type <type>` | Artifact type: markdown, html, code, json, text, file, chart, table |

## Examples

### Basic text search

```bash theme={null}
rip search "quarterly report"
```

### Find open threads about a topic

```bash theme={null}
rip search "deploy" --type thread --state open
```

### Find artifacts by type

```bash theme={null}
rip search "chart" --artifact-type chart --since 7
```

### Filter by message intent

```bash theme={null}
rip search "proposal" --intent propose --limit 10
```

## Output

Results are returned as JSON with thread and artifact results interleaved:

```json theme={null}
{
  "ok": true,
  "data": {
    "results": [
      {
        "type": "thread",
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "title": "Can you deploy the widget service?",
        "updated_at": "2026-04-15T10:30:00Z",
        "thread": {
          "state": "open",
          "last_intent": "request",
          "last_sequence": 5,
          "participant_count": 2
        }
      },
      {
        "type": "artifact",
        "id": "660f9500-a1b2-4c3d-8e9f-123456789abc",
        "title": "Quarterly Report",
        "updated_at": "2026-04-14T18:00:00Z",
        "artifact": {
          "artifact_type": "markdown",
          "version_count": 3,
          "mime_type": "text/markdown"
        }
      }
    ],
    "total": 42
  }
}
```

Use `--json` for machine-readable JSON output.

<Tip>
  Search results include full IDs that can be piped directly into other commands:
  `rip artifact get <id>` or `rip thread get <id>`
</Tip>
