Your code

Your workspace keeps your app's code — deploy without GitHub, go back to an earlier version, and download or clone it anytime.

Your workspace can keep your app's code for you. You don't need a GitHub account, a repository, or any git setup: every time you deploy, the code in your app's folder is sent to your workspace, and your workspace keeps it along with the versions before it.

Apps whose code lives in GitHub keep working exactly as before. This page is about apps whose code is kept on your workspace.

Create an app without GitHub

On a personal workspace you can create an app straight away: in the console, click New app, answer a few questions, and you're done. You don't need to connect GitHub first. Your new app's code is kept on your workspace from the start.

Already connected GitHub? Then new apps you create live in your GitHub account, as before. See GitHub is optional.

Deploy from your computer

ghosty deploy

ghosty deploy packs your app's folder, sends it to your workspace, and builds and publishes it. It needs no git remote and no GitHub credentials. When it finishes, the new version is live.

What gets sent:

  • Everything in the app's folder, including images and other binary files, up to 20 MB per file.
  • Your .gitignore is respected. Build output (dist/), dependencies (node_modules/) and git's own folder are never sent.
  • .env files are never sent. If one would be included, for example because your .gitignore lets .env.example through, the deploy stops and names the file. Keep secrets in your app's secrets (ghosty secret <name>) instead.

If the folder is a git repository, ghosty deploy also saves your changes as a local commit. Nothing is ever pushed anywhere.

Every deploy is a new version. Your workspace keeps your recent versions, so you can go back to one.

When someone else deployed first

When two people work on the same app, each deploy starts from the version the folder was last in step with. If someone deployed a newer version since then, ghosty deploy stops rather than silently replacing their work:

✘ A newer version of expense-tracker was deployed since this folder's code: by ana@yourcompany.com, 2026-09-25 14:02 UTC (version 3f9c2a1).
  To keep their changes: `ghosty clone expense-tracker --dir <new folder>`, bring your changes over, and deploy from there.
  To replace their version with this folder's code: `ghosty deploy --force`.

You have two choices:

  • Keep their changes. Get the latest code into a new folder with ghosty clone, copy your changes over, and deploy from there.
  • Replace their version. Run ghosty deploy --force. Their version stays among the versions your workspace keeps.

Get the code onto a computer: ghosty clone

ghosty clone expense-tracker
cd expense-tracker && ghosty dev

ghosty clone <app> downloads the version your workspace deploys into a new folder named after the app. To use a different folder, pass --dir <folder>; it must be new or empty. If git is installed, the folder starts with its own local history.

The folder remembers which version it came from, so your next ghosty deploy from it knows whether someone else deployed in the meantime. That record lives in the folder's .ghosty/ directory, which is kept out of git.

Previews

ghosty preview "new checkout"

ghosty preview sends your folder to your workspace as a private preview link without touching the live app. Run it again without a name to update the same preview. A preview never changes what ghosty deploy compares against.

Your previews are listed by name on the app's Previews tab in the console, where you can rebuild one or tear it down.

Setting up an app

ghosty provision sets up everything the app needs. For an app whose code is kept on your workspace, it also sends the folder's code, binary files included. If someone deployed a newer version since your folder's code, provisioning still sets everything up but leaves the code alone; run ghosty deploy to choose what happens.

For a brand-new app, the first setup carries only its text files. Your first ghosty deploy sends the rest.

The Code section in the console

Open your app in the console. On its Overview tab, the Code section shows where the code is and who deployed last:

Your code is kept on your workspace · last deployed by ana@yourcompany.com from ana-laptop, 9/25/2026, 2:02:00 PM

The line describes the version your app is built from: who sent it, from which computer, and when. "From" is the name of the computer. Versions created by the console itself, like your app's starter code, don't have one. After you deploy an earlier version, the line names whoever originally sent that version, and when.

Versions

Every deploy saves a new version, and your workspace keeps your recent ones. The Code section lists them: the version marked Deploys now comes first (it's the one your app is built from), then the others, newest first. Each version shows who sent it, from which computer, and when.

Previews are saved as versions too, so a version you only previewed can show up in the list. Deploying it works the same as deploying any other version.

Deploy an earlier version

To go back to an earlier version, click Deploy this version next to it and confirm. Your app is rebuilt from that version, and it replaces what's running now. The build appears on the Deploys tab.

The version you deployed also becomes the version your next deploys start from. So if someone then runs ghosty deploy from a folder that holds a newer version, it stops and tells them. See When someone else deployed first.

To go back to a previous release without rebuilding it, open that deploy on the Deploys tab and use Roll back to this version instead.

Download the code

Download the code saves the version that deploys as a .zip file, with everything inside an <app-name>/ folder. It's the same code ghosty clone fetches, without the local record of which version it came from.

The download in the console handles code up to 32 MB unpacked. For bigger code, use ghosty clone.

GitHub is optional

Your code is kept on your workspace whether or not you connect GitHub. Connect it (from Settings → GitHub, or the card on your home page) only if you also want your code in your own GitHub account.

After you connect GitHub:

  • New apps you create live in a repository in your GitHub account. You deploy them by pushing to GitHub, as before.
  • Apps already kept on your workspace stay there. Nothing about them changes.

Publish to GitHub (not available yet)

The Code section shows a Publish to GitHub button. It isn't available yet. When it is, it will move an app whose code is kept on your workspace into a repository in your own GitHub account. From then on you'll deploy that app by pushing to GitHub.

Until then, you can put a copy in a repository yourself: Download the code, or run ghosty clone, then push that folder to a repository of your own. That copy is yours to keep. Your app keeps deploying from your workspace.

Deleting an app

Deleting an app whose code is kept on your workspace also deletes its code and all its versions. That's different from an app whose code lives in GitHub, where the repository is never touched.

If you want to keep the code, download it or run ghosty clone before you delete the app.

For coding assistants

Everything above works from a coding assistant through ghosty mcp. The tool names are deploy_app, create_preview, provision_app and clone_app. When deploy_app stops because someone else deployed first, the assistant tells you who and when, and only replaces their version (force) if you say so.

ghosty deploy --json prints {"event":"uploaded","hash":"…","bytes":…} once your code has reached your workspace, then the usual building line and result. When someone else deployed first, it prints a {"event":"stale-base","head":{…}} line and fails with the code STALE_BASE.

Troubleshooting

  • "… looks like an environment file": a .env file would have been sent. Remove it, or stop un-ignoring it in .gitignore (for example, delete a !.env.example line).
  • "… files over 20 MB can't be kept with your app's code": add the file to .gitignore. Large media belongs in your app's file storage.
  • "Your app's code packs to … MB": your workspace keeps up to 50 MB compressed per version. Add build output, caches and media to .gitignore.
  • "A newer version … was deployed since this folder's code": see When someone else deployed first.
  • "Your workspace is busy right now": the CLI already retried a few times. Wait a moment and run the command again.
  • "Your app's code is too large to download as a zip here" (console): the zip download handles up to 32 MB of unpacked code. Use ghosty clone <app> instead.
  • "Downloads are busy right now" (console): several downloads are being prepared at once. Wait a moment and try again.
  • "That version of your app's code is no longer kept on your workspace" (console): your workspace keeps your recent versions, and that one was retired while the list was open. Refresh the page and pick a version that's still listed.