How to Export a Lovable App to GitHub and Run It Locally
Sync your Lovable project to a GitHub repo, clone it, and run the dev server on your own machine for full control.
No-code tools are not a cage. Lovable can sync your whole project to a GitHub repository, which means you own the code and can run, edit, or deploy it anywhere. This guide connects GitHub, clones the repo, and gets the app running locally.
What you need
- A Lovable project you want to export
- A GitHub account
- Git and Node 18+ installed on your computer
- About 15 minutes
Step 1: Connect GitHub in Lovable
Open your project, click the GitHub button in the top bar, and authorize Lovable. It creates a new repository under your account (or an organization you choose) and pushes the current code.
Step 2: Clone the repo locally
Copy the repo URL from GitHub and clone it to your machine. This gives you the exact files Lovable generated, including package.json and the Vite or Next config.
Step 3: Add environment variables
If the app uses Supabase or any API, it needs the keys at runtime. Lovable does not commit secrets to the repo, so create a local .env file with the values from your Supabase project settings.
VITE_SUPABASE_URL=https://abcxyz.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6...Step 4: Run the dev server
Start the app locally. It should behave exactly as it did in the Lovable preview, but now you can edit any file with your own editor and tools.
Result
You now have the full source on GitHub and a working local copy. You are free to add your own libraries, run tests, or deploy to any host, while still using Lovable for fast AI-driven changes.
Watch related tutorials
12:47
18:33
15:21
15:22
1:02:14
18:05