Import from Replit
Replit has no public API for reading a Repl, so the import works from the Repl’s files on your computer. It reads .replit for how the Repl runs, and takes its Secrets from a file you save. Import from another host covers what every import does.
Get the files
Section titled “Get the files”Either:
- From GitHub. In the Repl, open the Git pane and push it to a GitHub repository. Then import the repository by its address:
jiayang import https://github.com/you/bot acme/bot. Its.replitis read the same way. - As a download. Download the Repl as a zip, unzip it, and import the folder.
Save the Secrets
Section titled “Save the Secrets”In the Repl, open Secrets, then the menu at its top, then Edit as .env. Copy what it shows into a file outside the project, like ~/bot-secrets.env. Don’t add it to the repository.
The file is read on your computer. Each value goes straight to the app’s environment variables or secrets, the same way jiayang env set and jiayang secret set send them.
Import
Section titled “Import”jiayang import replit acme/bot ./bot --env-file ~/bot-secrets.envThe third argument is the Repl’s folder, and defaults to the current directory. It needs a .replit file.
What’s read from .replit
Section titled “What’s read from .replit”The keys Replit documents at docs.replit.com/replit-workspace/configuring-repl (read 7 October 2026):
| .replit | Here |
|---|---|
[deployment] deploymentTarget = "static" |
A static site, built with [deployment] build and served from publicDir. |
[deployment] run, or run |
A container, started with that command: container.start in jiayang.json. |
[[ports]] |
The local port Replit served as port 80 becomes container.port. |
[env] |
Environment variables. |
deploymentTarget = "scheduled" |
An app with a path that does the job, called by a schedule. |
replit.nix packages |
Not installed here. Write the Dockerfile with jiayang dockerfile --write and install them in it. |
Replit’s own variables, REPL_ and REPLIT_ ones, are left out. REPLIT_DB_URL points at Replit Database, which doesn’t come along: use the app’s own database. Replit Auth isn’t needed either, since everyone signs in through us.
A container app needs the Team plan or above.
From the dashboard
Section titled “From the dashboard”In Apps, select Import, then Replit. It gives the command to run, since the import needs the Repl’s files.