Skip to content

BenjaminPrice/lovable-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lovable-downloader

A CLI tool to download the source files of a Lovable project to your local machine.

Install

cargo install lovable-downloader

Or from source:

cargo install --path .

Usage

lovable-downloader [OPTIONS] <URL>

Arguments:
  <URL>    Lovable project URL (e.g. https://lovable.dev/projects/<uuid>)

Options:
      --force    Write into the output directory even if it already exists
  -h, --help     Print help
  -V, --version  Print version

Example

lovable-downloader https://lovable.dev/projects/550e8400-e29b-41d4-a716-446655440000

Files are written to ./projects/<uuid>/ relative to the current directory.

Authentication

The tool requires a Lovable bearer token.

Option 1 — Environment variable (recommended for scripts):

export BEARER_TOKEN="your-token-here"
lovable-downloader <url>

Option 2 — .env file:

# .env
BEARER_TOKEN=your-token-here

Option 3 — Interactive prompt:

If BEARER_TOKEN is not set, the tool will prompt for it at startup.

Getting your token

  1. Open lovable.dev in your browser and log in.
  2. Open DevTools → Network tab.
  3. Open or reload a project.
  4. Find any API request to api.lovable.dev and copy the authorization header value.
  5. You can supply the full Bearer <token> string or just the token — the tool normalizes it.

Configuration

Environment variable Default Description
BEARER_TOKEN (required) Lovable API bearer token
LOVABLE_VALID_DOMAIN lovable.dev Override the expected project domain

Output

projects/
  <project-uuid>/
    src/
      main.rs
      ...
    README.md
    ...

Files that exceed the API size limit are skipped with a message. A summary count is printed at the end.

Overwrite behavior

By default the tool refuses to write into an existing project directory. Use --force to allow it:

lovable-downloader --force https://lovable.dev/projects/<uuid>

--force writes new and changed files but does not delete stale files from a previous download.

Known limitations

  • No watch/sync mode.
  • No parallel downloads.
  • Files exceeding the API size limit are skipped; there is no workaround at this time.
  • Token must be obtained manually from browser DevTools.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages