Lovable to Cursor starts with one connection inside Lovable: connect the project to GitHub, and Lovable creates the repository and keeps it in two-way sync. Clone that repository, open the folder in Cursor, install the dependencies and run it. Only the code moves; the Lovable Cloud backend, the hosting and the secret values stay where they were.

What moves to Cursor and what stays with Lovable

A move to Cursor carries the application code and nothing that runs it: the repository Lovable syncs to GitHub is what Cursor opens. The Lovable Cloud backend and its data, the published hosting and the secret values stay with Lovable, and both the backend and the hosting keep running on Lovable’s bill.

The code is more than the screens. In a project on Lovable Cloud, the repository also holds the backend code, Edge Functions under supabase/functions/ and the migration files that record the database structure, but never the records inside the database. Taking the data and the services that run it out of Lovable is a separate job: moving the backend off Lovable Cloud.

PieceWhat happens when you open it in CursorWho runs and pays for it afterwards
Application codeLovable creates a new GitHub repository, private by default, and syncs it both ways on one branch at a time; Cursor opens your clone of itYou, in the repository on your own GitHub account
Frontend hostingNo change: the live site keeps serving from Lovable and changes only when you publish from LovableLovable, as Cloud usage on your credit balance, until you deploy the frontend somewhere else
Lovable Cloud backend and dataStays. Lovable Cloud is the built-in backend, with a database, storage, authentication, realtime and functions on Supabase’s open-source foundation; the repository holds its function and migration files, never its dataLovable, as Cloud usage on the same balance
Secret valuesStay in Lovable’s secret store, which is write-only and lists names, never values; the credentials behind Lovable’s connectors and Lovable AI cannot be copied outYou: each value, or a new key, comes from the service that issued it

One file does travel. Lovable keeps .env committed to the repository so the build-time VITE_ values, such as VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY, reach previews and builds; those are browser values Lovable calls safe to be public, and anything private belongs in Secrets instead, as Lovable’s secrets documentation sets out.

If all you want is a copy, paid plans can download the codebase as a .zip from the code editor or from Project settings → Git. That is a snapshot, with no sync behind it. The ZIP and the other routes are compared in the other ways to get Lovable’s code out, and taking the live site with you as well is moving the hosting off Lovable.

Migrate from Lovable to Cursor: the documented path in six steps

These steps follow Lovable’s GitHub sync documentation, its Git sync overview and Cursor’s docs, read on October 21, 2026; we did not run them on a paid account for this page.

  1. 01 Connect the project to GitHub: a workspace owner or admin adds the GitHub connection, then a workspace or project owner or admin clicks Connect in Project settings → Git → GitHub, and Lovable creates a new repository, private by default, and starts two-way sync.
  2. 02 Clone the repository with one of the clone URLs Lovable shows in those settings (HTTPS, SSH or GitHub CLI), then open the folder in Cursor with File > Open Folder.
  3. 03 Open package.json and check the stack: @tanstack/react-start in the dependencies means a TanStack Start app, the stack of newer Lovable apps; without it, the project is an older React + Vite app.
  4. 04 Check the environment: the committed .env file carries the public VITE_ values; in a TanStack Start app, every secret its server code reads also has to be set on your machine under the same name.
  5. 05 Install the dependencies with the package manager the lockfile belongs to, then start the development server with the script package.json lists for it, such as npm run dev.
  6. 06 Commit, then push to the synced branch or merge into it; commits there sync back into Lovable, and the live site changes only when you publish from Lovable.

Lovable’s FAQ dates the switch: new apps use TanStack Start from May 13, 2026 (June 22, 2026 for Enterprise workspaces), and older apps use React + Vite. For the clone in step 2 and the install in step 5, these three lines do the work in a terminal (swap in the clone URL from Lovable’s settings and the folder name Git creates):

git clone <your-repo-url>
cd <project-folder>
npm install

To clone the repo for Cursor, the terminal is the documented route: Lovable’s settings give the clone URLs and Cursor’s getting-started help opens the result through File > Open Folder, so if a clone button you tried in Cursor did nothing, the git clone line above does the same job. The block uses npm install on purpose. Lovable’s hosting guide notes that its npm examples assume a package-lock.json, and a repository with only bun.lock installs with Bun, or with npm install, which writes the lockfile that npm ci needs later.

When the Lovable export code won’t run on your machine

A cloned Lovable app that will not run is short of something the clone did not bring: the values in Lovable’s secret store, the Node.js version and package manager it expects, or the server runtime a TanStack Start project needs. Each secret is a name in the code; its value, or a new one, comes from the issuing service.

If the Lovable export code won’t run after the install, work through these causes in order:

  1. Secrets and sign-in. Lovable keeps project secrets out of the repository, and the credentials behind its connectors and Lovable AI cannot be copied out at all. In a TanStack Start app the server code runs on your machine, so it needs every secret it reads, and connector and AI calls fail locally; test those in the Lovable preview, and for any other secret, create or copy the value at the service that issued it and set it under the same name. In an older React + Vite app those calls run in Edge Functions on the Cloud backend, so a local copy that uses that backend can still make them. Sign-in has a gap of its own: an auth provider redirects only to URLs it knows, so add your local URL to its redirect list.
  2. The wrong Node.js or install. Lovable’s external hosting guide builds with Node.js 22, and npm ci stops when there is no package-lock.json; match both before reading anything into the error.
  3. A TanStack Start app served as static files. Only the older React + Vite apps build to static files in dist/ that any static host can serve. A TanStack Start app needs a server for its server-side rendering, server functions and API routes, so run the development server, or build with Nitro’s node-server preset and start node .output/server/index.mjs on Node.js 22.

If a developer is about to start on the app, or it already has paying users and nobody can get it running outside Lovable, that is the point to talk it through: in a free audit, we go over with you why the clone will not start and which values and services it still needs. In the sprint, our engineers provide one documented command that brings the application up locally, with an environment example and seed data, and keep the application in a version-controlled repository and on a hosting account the founder controls, deployable through a documented pipeline, independent of the tool that generated it.

On the React + Vite branch, VITE_ values are embedded at build time, so a changed value needs a rebuild before the app sees it, and why VITE_ values live in the build walks through the mechanism. Keep secrets out of those variables altogether, because they ship to the browser. What a new developer should get from the repository is one command that brings the app up locally, not a morning of guessing.

Before the first agent edit: a rules file and a check

A rules file and one CI check belong in the repository before Cursor’s agent makes its first edit: the rules file tells the agent the conventions and the paths it must not change, and the check fails the build when a protected pattern changes anyway.

Start with the warning. A local app that keeps Lovable’s .env reads and writes the same backend as your published app, so records you create or delete locally change real data, and a Git branch does not give you a separate database. Cursor’s agent runs on your machine by default, with your reach: it can read and write the files you can, run the commands you can and access the network resources you can, which includes starting the app that talks to that backend. Pointing a copy at a separate project is a job of its own; until then, Lovable’s docs say to use test accounts and records while you test writes.

An agent with production access has done this before. In a post dated August 2, 2025, SaaStr co-founder Jason Lemkin wrote that Replit’s AI agent had direct access to production databases during development sessions, executed destructive commands against live business data, and kept making code changes during a code freeze despite repeated explicit instructions. Replit’s own statement of July 29, 2025 said that, because the incident came before its new development and production database system, changes made during development could impact his production application, and that he restored the database with Replit’s Rollback feature. The lesson we take is about order: an agent whose environment holds the live backend’s keys can change real data, so the rules and the check go into the repository before the agent’s first change.

When we audited 21 third-party apps in June and July 2026, at least 18 had no working test anywhere: 17 had none at all, and in a retail POS app the checkout “test suite” never executed the actual checkout code. Those apps were picked for audit rather than drawn at random, so the count describes that group and not AI-built apps in general. In an app like that, an agent edit that breaks sign-in or billing meets nothing that fails.

Cursor’s Project Rules live in .cursor/rules as .mdc files, version-controlled with the code, and each rule applies always, to files that match a pattern, when the agent judges it relevant, or only when you mention it. Put the conventions there and name the paths the agent must leave alone; Cursor rules and their types covers the file format and globs, and Cursor’s documentation has the current reference. Cursor’s own safety docs call rules suggestions, not guarantees, which is why the second half matters, as guardrails that stop an agent undoing a fix shows. The settings for what Cursor’s agent can run are a separate question from the rules, and the wider practice sits under engineering standards for AI-assisted teams.

The check is a CI job that fails when a protected pattern changes, for example a permission check removed from a server route. On GitHub, it blocks a merge only once branch protection makes it a required status check, because required checks must pass before changes merge into the protected branch. To test yours, make the forbidden change on a branch and confirm the job goes red. In the sprint, deliverable 10.8, AI repository guardrails, is verified this way: we review the guidance and demonstrate CI catching a representative forbidden regression.

Keeping Lovable and Cursor on one repository

Both tools can write to the same repository. Changes made in Lovable sync to GitHub, and pushes to the active branch sync back into Lovable, but Lovable edits and syncs only one branch at a time. Two tools committing to that branch at once is how merge conflicts start, and when GitHub rejects Lovable’s push, most often over branch protection or a conflicting change, Lovable pushes its work to a lovable-sync branch for you to merge.

The branching strategy that avoids most of this is the one Lovable’s Git sync overview describes: keep Lovable on the synced branch, usually main, and do your Cursor work on a feature branch that you merge in. If your team requires a pull request for every change to main, give Lovable a feature branch of its own and merge its work through the same review. Our own rule is the short version of that: never have both tools committing to main at once. Before each Cursor session, let any Lovable edit finish, check that the sync status card says the two are in sync, and run git pull so you start from Lovable’s latest commits; never force-push, rebase or squash commits already on the synced branch.

Lovable also treats the code you write in Cursor the same as code it generated, and a later prompt can change either, so its docs advise putting lasting constraints in project knowledge and keeping tests for behavior you depend on. The repository itself is fairly sturdy: renaming it, or your GitHub account or organization, keeps the sync running, and so does a transfer to an owner your Lovable workspace also has a connection for, while deleting it stops the sync. When the link does break, the fixes for Lovable GitHub not working start from the error Lovable shows.

What the Lovable bill does after the move

Editing in Cursor costs no Lovable credits: Lovable’s docs say editing and committing code on your computer uses none, while each change you ask Lovable to make in the project chat consumes credits as usual. So the build spend falls only as far as your prompting does.

The rest of the bill keeps running. Lovable uses one credit balance for five types of usage (Build, Chat, Cloud, AI gateway and Connector), reported as Build credits and Run credits; hosting the app and running Cloud count as Cloud usage, and AI features the deployed app uses count as AI gateway usage. Calls your local app makes to the Cloud backend or through the AI gateway count the same way as calls from the published app.

Cursor is billed separately from Lovable: new customers choose a plan on The X Subscription, which covers Grok, Cursor and X with a Free plan and paid tiers, and we print neither tool’s prices here. The whole Lovable meter, including what a Lovable credit pays for, is easier to read before you decide which side of it you can cut.

Who should not move a Lovable project to Cursor

Cursor’s docs describe it as a coding agent that searches your codebase, edits files and runs terminal commands; a database, user sign-in or app hosting of its own is not stated in Cursor’s docs. The move therefore changes who edits the code. The app still runs where it ran.

That costs more than it saves when nobody on your side can read a failing build. The agent will propose a fix for each error, and someone has to judge whether the fix is right or whether it quietly removed the thing that was failing. If that person does not exist yet, two honest routes remain: keep prompting in Lovable and move only what has to move, or hand the repository to someone who reads code and let them choose the editor.

If the editor is the open question, the same move into Claude Code follows the same Git sync from a terminal, and how Claude Code and Cursor differ sets the two side by side. If the doubt is about which product should own the app at all, Lovable vs Cursor as products compares the two. The end state worth aiming for, whichever editor wins, is an app that no longer needs the builder to build or deploy.

Common questions about moving a Lovable project into Cursor

Can you export your Lovable code?

Yes. Git sync, on every plan, creates a repository on GitHub, GitLab or Bitbucket and keeps it in two-way sync with the project, and paid plans can also download the codebase as a .zip snapshot from the code editor or Project settings → Git. Neither route includes the records in the database or the files in storage.

How to transfer Lovable to GitHub?

Open the project’s GitHub settings (Project settings → Git → GitHub), choose the GitHub account or organization, and click Connect; Lovable then makes a fresh repository there, private by default, and syncs it both ways. Adding the GitHub account to the workspace is a job for a workspace owner or admin, and connecting a project needs a workspace or project owner or admin. Git sync cannot attach to a repository you already have; to start a Lovable project from existing code, download that repository as a ZIP and import it into a new project.

How to manually edit Lovable?

Inside Lovable, open the Code tab and edit files in the code editor, which saves each change as a version you can revert; editing needs a paid plan, and on the Free plan the editor is read-only. Outside Lovable, edit the synced repository in any editor or coding assistant and push to the synced branch, and the commits appear in the project. Editing code yourself uses no credits in either place.

When is moving a Lovable app into Cursor worth getting help with?

When the clone will not run on a developer’s machine, or when an agent is about to edit an app that has paying users and no tests. In a free audit, AxonBuild weighs up with you whether the repository is ready for Cursor’s agent to edit and what should go into it first.