lovable-import
v1.0.0
Published
Import any existing GitHub project into Lovable with one command.
Readme
lovable-import
Import any existing GitHub project into Lovable with one command.
Lovable only connects to new GitHub repositories it creates. If you already have an existing project on GitHub, there's no direct way to import it.
lovable-import automates the manual workaround — clone both repos, copy your files over, commit, push — so Lovable picks it up automatically.
Usage
npx lovable-importYou'll be prompted for two things:
? Existing GitHub repository URL:
> https://github.com/you/your-existing-project
? Lovable-connected GitHub repository URL:
> https://github.com/you/your-lovable-repoThen it handles everything:
✔ GitHub CLI found
✔ GitHub authenticated
✔ Both repositories are accessible
✔ Existing repository cloned
✔ Lovable repository cloned
✔ Project files copied
✔ Changes committed
✔ Pushed to branch "main"
✔ Temporary files removed
🎉 Import complete!
Your existing project is now available in Lovable.Requirements
- Node.js >= 18
- GitHub CLI (
gh) — installed and authenticated
If gh isn't installed, the tool will tell you exactly how to get it.
If you're not authenticated, it'll walk you through gh auth login.
What it does
- Checks GitHub CLI is installed and you're logged in
- Asks for your existing repo URL and your Lovable-connected repo URL
- Verifies you have access to both
- Asks for confirmation before overwriting anything
- Clones both repos to a temporary directory
- Copies all files from your existing project into the Lovable repo (preserving its
.git) - Commits and pushes the changes
- Deletes the temporary directory
After the push, Lovable syncs automatically — just open your Lovable project and start building.
What it doesn't touch
- Your original repository is never modified
- The Lovable repo's
.githistory is preserved - No credentials or tokens are stored or exposed
License
MIT
