Run a Replit Agent app on your computer

An app from Replit Agent is a pnpm workspace with an Express API, a Vite web app and shared code. On Replit a router and a few Replit services start the parts and connect them. On your computer you do that yourself.

Your Replit app on localhost

What Replit Agent builds

In November 2026 we had Replit Agent build a small project board: Replit Auth for logins, PostgreSQL for projects and tasks and an avatar upload to App Storage. The repository had this layout:

FolderWhat is in it
artifacts/api-serverThe Express 5 API
artifacts/ and the name of your appThe React web app, built with Vite
lib/dbThe tables, written with Drizzle ORM
lib/api-specThe OpenAPI file the API client code is generated from
lib/replit-auth-webThe login code the web app uses

The .replit file in the root tells Replit how to run all of it. Your computer does not read that file.

1. Push it to GitHub and clone it

In Replit, open Tools, then Git. Click Create Remote, keep Private and click Create Repository on GitHub. Replit asks if it may use your GitHub login for this session. Confirm, then click Push branch as origin/main. Then copy the repository to your computer:

gh repo clone your-name/your-repo

2. Install with pnpm

npm install stops with "Use pnpm instead". If pnpm is not installed, use corepack. It comes with Node.js and runs the pnpm version the project asks for. The project was set up for Node.js 24.

corepack pnpm install

3. Add the variables

On Replit the workspace gives the app its variables. On your computer they go in a .env file in the root. The API reads these:

VariableWhat it is forWhere it comes from
DATABASE_URLThe database. The API stops at startup without itReplit, Tools, Database, Settings
REPL_IDThe client ID of the Replit loginReplit sets it in the workspace
PRIVATE_OBJECT_DIR and PUBLIC_OBJECT_SEARCH_PATHSWhere App Storage keeps uploadsReplit sets them in the workspace
PORTThe port each part listens onYou pick it
BASE_PATHThe path the web app runs under/ on your computer

The .gitignore that Replit Agent wrote does not list .env. Add it before you put a real password in the file:

echo .env >> .gitignore

4. Start the API and the web app

Run each part in its own terminal, from the root of the project. Put the name of your web app folder in place of boardly. If pnpm is not on your PATH, put corepack in front of it.

PORT=5000 pnpm --filter @workspace/api-server run dev
PORT=5173 BASE_PATH=/ pnpm --filter @workspace/boardly run dev

On Replit a router sends every /api request to the API. On your computer nothing does, so the web app loads and gets no data. Ask your AI tool to add a Vite proxy that sends /api to http://localhost:5000.

What only works on Replit

Replit Auth logs people in through replit.com/oidc with the REPL_ID of the workspace. App Storage gets its access from a Replit service at 127.0.0.1:1106. Neither exists on your computer, so logins and uploads fail there. Test them in the Replit preview, or replace them when the app leaves Replit.

Or let an AI tool do it

Paste this into Claude Code or Codex in the project folder:

Install the dependencies of this project and start the dev server. On Replit the app gets its environment variables from Replit. Here they are in .env, so load that file when you start it. Do not change how the app runs on Replit. Give me the local address.

In our test, without a .env file, Claude Code installed the packages, listed the variables the API needs and stopped. It did not guess the values.

Sources

  1. Replit docs: Version control
  2. Replit docs: Add a database
  3. Node.js docs: Corepack
  4. Vite docs: server.proxy

Read next

Pick your route.

Choose where you are and where you want to go. The guide takes it from there.