How do you export Lovable code to GitHub?
Open the project in Lovable, click the GitHub control in the top-right, authorise your GitHub account and pick an organisation; Lovable creates a repository and syncs every edit to it from then on. The export is a normal React, TypeScript, Tailwind and shadcn/ui project (newer projects use TanStack Start), and it contains only the code: no database, no users, no files, no secrets. Once the repository exists you can clone it, download a ZIP, or deploy it straight from GitHub on a flat-price pack and keep editing in Lovable.
Step by step
- 1
Connect GitHub from the editor
In the Lovable workspace, use the GitHub control in the top-right, authorise Lovable on your GitHub account, and choose the account or organisation that should own the repository. Lovable creates the repository and pushes the code.
After that the sync is two-way: edits in Lovable land in the repository, and commits you push to the repository show up in Lovable.
- 2
Check what came across
Open the repository on GitHub. You should see the Vite or TanStack Start project with package.json, src/ and a supabase/ folder holding migrations if the app has a database. The .env values are not there, because they were never in the code.
- 3
Clone or download if you want a local copy
git clone the repository, or use Download ZIP on GitHub. Run npm install and npm run dev locally with a .env that points at your Supabase project.
Local copy
git clone https://github.com/<you>/<repo>.git cd <repo> && npm install && npm run dev - 4
Deploy the repository
Dashboard → Deployments → New: pick the repository and a pack. The build is detected and the commands are filled in. Add the VITE_ variables on the Environment tab and attach your domain on the Domains tab. From Claude Code or Cursor, the deploy tool does the same and returns an approval link; the build starts once the invoice is paid.
Terminal
hw ask "deploy <repo> as my-app and set VITE_SUPABASE_URL" - 5
Move the data separately
The export carries no data. If the app has tables, users or files, run the Hostwares migration tool to back them up from Lovable and restore into a dedicated Supabase project, then update the Auth redirect URLs for the new address.
What breaks, and the fix
- The repository has no .env
- Values live outside the code. Set VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY and any other VITE_ variable on the host's Environment tab.
- The database is not in the export
- Only migrations are. Use the migration tool to move structure, rows, users and files into a dedicated Supabase project.
What it costs
- Exporting is a Lovable feature; GitHub repositories are free on GitHub's side.
- Running the export: a Frontend pack from $1/mo; a dedicated Supabase pack from $5/mo if there is data.
App
$1/mo
Starter Frontend pack, 1 vCPU / 1 GB RAM / 10 GB
Database, users and files
$5/mo
Smallest dedicated Supabase pack; several projects fit on one
For comparison
- Lovable Pro (plan most people export from; check your plan's export rules): $25/mo (checked 2026-11-06, lovable.dev)
Questions
Is exporting from Lovable free?+
GitHub sync is a Lovable feature; check your plan on Lovable's pricing page, because the rules have changed during 2026. Once the repository exists, cloning and downloading it are free on GitHub's side.
Does the export include my database and users?+
No. The repository holds the code and the SQL migrations. Rows, sign-in users and uploaded files stay in Lovable's Supabase until you move them, which the Hostwares migration tool does from your own computer.
Can I keep editing in Lovable after exporting?+
Yes. The sync is continuous, so Lovable edits keep landing in the repository and any host that deploys from GitHub picks them up.
Can I edit the code outside Lovable too?+
Yes. Commits pushed to the repository show up in Lovable. Keep to one editor per change to avoid merge conflicts.
Which framework is the exported app?+
React with TypeScript, Tailwind and shadcn/ui, built with Vite for older projects and TanStack Start for newer ones. Both deploy from GitHub on Hostwares with the build detected.
Where do the Supabase keys go after export?+
On the host's Environment tab. Your Hostwares Supabase project's Overview has a "Connect to your frontend site" block with the exact names and values.
Related
Next guides
Sources: Lovable FAQ: Code export (2026-11-06) · Lovable docs: Deployment, hosting and ownership (2026-11-06) · Lovable pricing (2026-11-06)