Metadata-Version: 2.4
Name: lovable-pull
Version: 1.0.0
Summary: Pull a Lovable project to disk with one command
License: MIT
Project-URL: Homepage, https://lovable.dev
Requires-Python: >=3.10
Description-Content-Type: text/markdown

<p align="center">
  <a href="https://lovable.dev">
    <img src="https://lovable.dev/favicon.ico" width="48" alt="Lovable">
  </a>
  &nbsp;&nbsp;
  <img src="./beaver-glasses.png" width="120" alt="Beaver with glasses">
</p>

<h1 align="center">Lovable Pull</h1>

<p align="center">
  One command. Your logged-in Chrome session. The whole project tree on disk.
</p>

<p align="center">
  <a href="https://lovable.dev">lovable.dev</a>
  ·
  paste a project link
  ·
  keep folder structure
</p>

---

## The command anyone can use

Stay signed in to [Lovable](https://lovable.dev) in Chrome, then:

```bash
pip install lovable-pull ; lovable-pull https://lovable.dev/projects/YOUR-PROJECT-ID
```

Save into a folder:

```bash
lovable-pull https://lovable.dev/projects/YOUR-PROJECT-ID C:\Users\you\Desktop
```

Help:

```bash
lovable-pull --help
```

Needs Python 3 and a Chrome login on this machine.

---

## What it can do

| | |
|---|---|
| **Pull every file** | Source, configs, assets, hidden paths like `.lovable/project.json` |
| **Keep the tree** | `src/pages/FeedPage.tsx` lands in `src/pages/` |
| **Stay fast** | Up to 16 parallel API downloads — ~10s for ~80–100 files |
| **Skip the UI** | No file-tree clicking, no Save As dialogs |
| **Reuse login** | Reads the Lovable token already stored in Chrome |
| **Recover if needed** | Opens the editor only for files the API missed |

---

## How a pull works

1. Read the Lovable session from Chrome storage.
2. List files from `api.lovable.dev` for that project id.
3. Download them in parallel with your token.
4. Write each file to the matching relative path.
5. Fall back to the browser only if something is still missing.

---

## GUI

```bash
python lovable_crawler.py
```
