Skip to content

Import from a repository

Any project in a git repository, or in a folder on your computer, can be imported. That includes what AI app builders make: push the project to GitHub from Lovable, Bolt or v0, or download it, and import that. Import from another host covers what every import does.

Terminal window
jiayang import https://github.com/acme/handbook acme/handbook

The repository is cloned with your own git, so a private one works if you can clone it. It goes into a new directory named after the repository, or the one you give as the third argument, which has to be empty. The address can be https://, ssh:// or git@github.com:acme/handbook.git. Plain http:// and git:// aren’t taken, since the code could be changed on its way.

Terminal window
jiayang import ./handbook acme/handbook

A zip has to be unzipped first.

With no host to ask, everything comes from the code: detection, and any vercel.json, netlify.toml or .replit in it, read as their import guides say. Variables come from those files and from --env-file:

Terminal window
jiayang import https://github.com/acme/handbook acme/handbook --env-file handbook.env

The import never reads a .env file in the project, and a deploy stops at one, so keep the file you pass outside the project.

These builders make a front end, usually Vite or Next.js, often talking to Supabase.

  • Supabase’s browser key (VITE_SUPABASE_ANON_KEY or a publishable key) is meant to be public, and becomes an environment variable.
  • Supabase’s service key is not set. It bypasses the database’s row rules, so store it as a secret for your project’s host with jiayang secret set <workspace>/<app> SUPABASE_SERVICE_ROLE_KEY --host <ref>.supabase.co --header apikey, and call Supabase from the server side.
  • A Firebase web config key (AIza...) is public by design, but we refuse values shaped like one as variables. Put it in the app’s code.
  • The builder’s own sign-in isn’t needed: everyone signs in through us, and an SDK’s requireUser() says who.

In Apps, select Import, then A git repository. It gives the command to run, since the import needs the code.