# list-samples

List indexed Apple sample code projects.

## Synopsis

```bash
cupertino list-samples [--framework <name>] [--limit <n>] [--format <format>] [--sample-db <path>]
```

## Description

Lists all sample code projects that have been indexed. Shows project titles, IDs, frameworks, and file counts.

## Options

### --framework, -f

Filter by framework (e.g., swiftui, uikit, appkit).

### --limit

Maximum number of results to return. Defaults to 50.

### --format

Output format: `text` (default), `json`, or `markdown`.

### --sample-db

Path to sample index database. Defaults to `~/.cupertino/samples.db`.

## Examples

```bash
# List all projects
cupertino list-samples

# Filter by framework
cupertino list-samples --framework swiftui

# Limit results
cupertino list-samples --limit 10

# Output as JSON
cupertino list-samples --format json
```

## Sample Output

```
Sample Code Projects
Total: 619 projects, 18928 files

[1] Building a great Mac app with SwiftUI
    ID: swiftui-building-a-great-mac-app-with-swiftui
    Frameworks: swiftui
    Files: 111

[2] Fruta: Building a Feature-Rich App with SwiftUI
    ID: fruta-building-a-feature-rich-app-with-swiftui
    Frameworks: swiftui, widgetkit
    Files: 45
```

## See Also

- [search](../search/) — search sample code with `cupertino search "<query>" --source samples`
- [read-sample](../read-sample/) — read project README
- [save](../save/) — build the sample code FTS index (`cupertino save --samples`)
