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

# Get Started with photo-cli: Archive Photos in Minutes

> Run your first photo-cli archive command to lay your photos out by year/month/day, hash-stamp every file, deduplicate, index everything in a local SQLite database, and expose the archive to AI assistants over MCP.

This guide walks you through installing photo-cli, running your first `archive` command, and connecting the resulting archive to an AI assistant over MCP. By the end, you will have a `[year]/[month]/[day]/` folder of hash-stamped photos, a SQLite index, one album per country/city — and an MCP server for your AI assistant to query & open photos conversationally.

<Steps>
  <Step title="Install photo-cli">
    Follow the [Installation](/installation) guide, then verify:

    ```bash theme={null}
    photo-cli --version
    ```
  </Step>

  <Step title="Run your first archive command">
    ```bash theme={null}
    photo-cli archive \
      --input /path/to/source \
      --output /path/to/archive \
      --reverse-geocode OpenStreetMapFoundation \
      --openstreetmap-properties country city \
      --auto-reverse-geocode-album \
    ```

    <Frame caption="Executing photo-cli archive in the macOS terminal">
      <img src="https://mintcdn.com/photo-cli/hpyUHVj_ILLpXiPB/images/screenshots/macos/execute.png?fit=max&auto=format&n=hpyUHVj_ILLpXiPB&q=85&s=60bcb5d7d1fb9199830291e39a044d56" alt="photo-cli archive executing on macOS" width="2588" height="2736" data-path="images/screenshots/macos/execute.png" />
    </Frame>
  </Step>

  <Step title="What happens behind the scenes">
    The command discovers photos and their companion files, reads EXIF metadata (date + GPS), and reverse-geocodes coordinates via OpenStreetMap with in-memory deduplication. It then organizes files into a year/month/day/ layout with SHA1-stamped names, deduplicating identical content and routing dateless photos to a fallback folder.

    After copying, it verifies each file by re-hashing, indexes everything (paths, dates, coordinates, addresses, SHA1) into completely local file based database, and builds per-location albums from the geocoded address levels.
  </Step>

  <Step title="Check the output">
    Open the archive folder. You will find photos laid out as `[year]/[month]/[day]/yyyy.MM.dd_HH.mm.ss-{sha1}.ext`, byte-for-byte duplicates skipped automatically, photos with no taken date in a `no-photo-taken-date/` subfolder, and a `photo-cli.sqlite3` database at the root indexing every photo, address, and album.

    <Frame caption="The resulting archive in Finder">
      <img src="https://mintcdn.com/photo-cli/hpyUHVj_ILLpXiPB/images/screenshots/macos/finder.png?fit=max&auto=format&n=hpyUHVj_ILLpXiPB&q=85&s=53ee946b8067456cf18aa2a257cfc154" alt="Archive folder open in macOS Finder" width="1944" height="1126" data-path="images/screenshots/macos/finder.png" />
    </Frame>
  </Step>

  <Step title="List or open archived photos">
    Query the SQLite index to open photos by date or list every album that was created:

    ```bash theme={null}
    photo-cli list --input /path/to/archive --type PhotosByDate --year 2008 --month 10
    ```

    On macOS matches open in Preview; on Linux/Windows paths are printed to stdout so you can pipe them to your viewer of choice (e.g., `xargs xdg-open` on Linux).

    <Frame caption="photo-cli list opening the October 2008 photos in macOS Preview">
      <img src="https://mintcdn.com/photo-cli/hpyUHVj_ILLpXiPB/images/screenshots/macos/viewing-in-preview-app.png?fit=max&auto=format&n=hpyUHVj_ILLpXiPB&q=85&s=e5454d71166fbb22af4965256162921a" alt="Photos from October 2008 opened in macOS Preview by photo-cli list" width="2436" height="1524" data-path="images/screenshots/macos/viewing-in-preview-app.png" />
    </Frame>
  </Step>

  <Step title="Query your photo archive by AI assistant over MCP">
    `photo-cli mcp` starts a [Model Context Protocol](https://modelcontextprotocol.io/) stdio server that exposes the archive's SQLite database to AI assistants. Tools like Claude Code, Claude Desktop, and VS Code can then search by date, location, album, or proximity to a GPS coordinate — and even open matching photos in your default viewer. See the [mcp command reference](/commands/mcp) for the full tool list.

    Once connected, ask the assistant things like *'What cities and when did I went to Italy?'*, *'show me everything taken within 5 km of 43.78, 11.23'*, or *'open all photos in the Italia-Firenze album'*.

    <Frame caption="MCP integration with Claude Desktop showing a query for photos">
      <img src="https://mintcdn.com/photo-cli/BsB-nqGql2blfgiC/images/screenshots/mcp/query.png?fit=max&auto=format&n=BsB-nqGql2blfgiC&q=85&s=3bb73ac2946baf822a8f39e57718d0aa" alt="MCP integration" width="1212" height="1300" data-path="images/screenshots/mcp/query.png" />
    </Frame>
  </Step>

  <Step title="Open the matching photos from the assistant">
    When you ask the assistant to *open* photos (rather than just list them), the MCP server hands the matching files off to your OS image viewer. Today this is wired up for macOS only — matches open directly in Preview. On Linux and Windows the `open_photos_*` tools are not active yet; use the `list_photos_*` tools and pipe the returned paths to your viewer of choice.

    <Frame caption="Photos opened in macOS Preview after an MCP open_photos_by_album_name call">
      <img src="https://mintcdn.com/photo-cli/BsB-nqGql2blfgiC/images/screenshots/mcp/view.png?fit=max&auto=format&n=BsB-nqGql2blfgiC&q=85&s=8435d70b9ddde7ff2398b620ca3351bd" alt="Album photos opened in macOS Preview via the MCP open_photos tool" width="1588" height="1488" data-path="images/screenshots/mcp/view.png" />
    </Frame>
  </Step>
</Steps>

## What's next

<CardGroup cols={2}>
  <Card title="Features Explained" icon="list-check" href="/features-explained">
    Explore all commands: copy, archive, list, info, address, settings, and mcp.
  </Card>

  <Card title="Installation" icon="download" href="/installation">
    Install photo-cli on macOS, Windows, or Linux in under a minute.
  </Card>

  <Card title="Reverse Geocoding" icon="location-dot" href="/reverse-geocoding/overview">
    See real before-and-after examples for common organization strategies.
  </Card>

  <Card title="Archive command reference" icon="box-archive" href="/commands/archive">
    Every argument the `archive` command accepts.
  </Card>
</CardGroup>
