Your Caffeine project's code belongs to you. You can download it at any time as a ZIP file — useful for backups, external review, or working with the code outside Caffeine. You can also upload a ZIP file to replace your project's draft code directly.
Who can use this
Downloading code and starting an empty project are available on every plan, including Free.
To upload a ZIP or import from GitHub, your account, or the account that owns the project, needs one of these:
- An active Host, Studio, or Business subscription
- A plan bought through AWS Marketplace, or a Government plan
- At least one completed payment, such as a top-up, a subscription invoice, or a domain purchase. A payment that was fully refunded or disputed doesn't count.
Saving a card isn't enough on its own. The small verification hold Caffeine places when you save a card isn't a payment. If you're on the Free plan, one top-up gives you access, and you keep the balance you bought.
Without one of these, the upload or import fails with "Uploading code requires a paid plan or at least one payment, such as a top-up."
What an import costs
Each ZIP upload and each GitHub import costs $0.25. Caffeine charges it when it accepts the import, before it builds your code, and it shows as Code Import on your Balance page. If your balance can't cover it, Caffeine refuses the import, tells you that you don't have enough to import code, and posts a message in your chat saying you've used all your balance.
Imports are free on a Government plan and for accounts that pay for Caffeine domains from their balance. To see which accounts pay from their balance, see Buying and Managing Custom Domains.
Starting from an empty project
If you want to build a project from existing code rather than an AI prompt, you can create an empty project and import your code straight away — before the AI has built anything.
To create an empty project:
- Go to your projects overview.
- Below the prompt box, next to Already have code?, click Start with an empty project.
- Caffeine creates a new project and opens its chat. The project has no draft yet.
From there, you can import code using either method:
- Upload a ZIP — click the project name button in the chat header, choose Import code, and select your ZIP.
-
Import from a GitHub repository — click the project name button in the chat header, choose Import from GitHub, and enter the repository as
owner/repoor a GitHub URL. The repository does not need to have been exported from Caffeine; you can import any repository that the Caffeine GitHub App can access.
Either way, the code must follow Caffeine's project structure (listed under Requirements in the following section). No AI build is involved: Caffeine compiles your code and deploys it as a new draft automatically.
Downloading your project code
You can download a ZIP of your project's current source files at any time, regardless of plan.
- Open your project and click the project name button in the chat header to open the actions menu.
- Select Export files.
Caffeine packages the current draft code — backend and frontend source files — into a ZIP and downloads it to your device.
Uploading a ZIP file to replace your project code
You can upload a ZIP file to replace your project's draft code, if your account can upload ZIPs (see Who can use this). This is useful if you have made changes to the code outside of Caffeine and want to bring them back in.
Requirements
- A
.zipfile of 500 MB or smaller - The ZIP must follow Caffeine's project structure — backend code in
src/backend/and frontend code insrc/frontend/
To upload
- Open your project and click the project name button in the chat header to open the actions menu.
- Select Import code.
- In the Import code screen, click Choose file and select your ZIP file.
- Caffeine uploads the file and applies it to your draft.
Caffeine uploads the file and shows a progress screen while it processes. When the upload succeeds, the dialog closes automatically and your chat shows that a new draft is ready.
If the upload fails, the dialog shows an error message explaining what went wrong, along with a Back button so you can correct the issue and try again.
What happens next
The uploaded code becomes a new draft version. You can review it at your project's draft URL before pushing it live. Going live is a separate action — use the Go live button when you are ready.
The upload does not trigger an AI build. Caffeine compiles the code in your ZIP and deploys it as-is; any build output in the ZIP is regenerated.
Frequently asked questions
What is the maximum ZIP file size?
500 MB. If your ZIP exceeds this limit, the upload will be rejected with an error message before anything is sent.
Can I upload any ZIP file, or does it need to be a Caffeine project?
The ZIP must contain a valid Caffeine project structure. Specifically, it must include caffeine.toml, mops.toml, src/backend/caffeine.toml, src/frontend/caffeine.toml, and src/frontend/package.json. If any of these are missing, the upload is rejected before building begins. The easiest way to start is by downloading your existing project's source code, modifying it, zipping it back up, and uploading it.
Can I start a project from existing code without using the AI?
Yes. On your projects overview, click Start with an empty project, then import your code — either by uploading a ZIP or by importing from a GitHub repository. No AI build is involved: Caffeine compiles your code and creates a new draft automatically.
Can I upload code to a brand-new project that has never been built?
Yes. You can upload a ZIP file to any project — including one that has never had a build. Click the project name button in the chat header to open the actions menu, choose Import code, and select your ZIP. A new draft is created automatically from the uploaded code.
Is upload available on the free plan?
Yes, if your account has made at least one payment, such as a top-up, a subscription invoice, or a domain purchase. A saved card alone doesn't count. Without a paid plan or a payment, the upload fails with "Uploading code requires a paid plan or at least one payment, such as a top-up." The same rule applies to importing from GitHub. If someone else owns the project, their account's plan or payments also count. Downloading your code is available on every plan.
What happens to my existing project when I upload a ZIP?
If the build succeeds, a new draft is created containing the uploaded code. Once deployment completes, the draft preview reflects the uploaded version. Your previous drafts and live app are untouched — the upload only adds a new draft version. You can review the result in the draft preview before deciding whether to go live with it.
Does uploading a ZIP affect my live app?
No. The upload replaces your draft code only. Your live app continues running unchanged until you explicitly publish the draft by clicking Go Live.
Does uploading code cost anything?
Yes. Each ZIP upload costs $0.25, the same as a GitHub import, charged when Caffeine accepts the upload. It isn't an AI build charge, and the upload doesn't start an AI build. Imports are free on a Government plan and for accounts that pay for Caffeine domains from their balance. See What an import costs.
Can I upload while an AI build is running?
No. The upload button is disabled while an AI operation is in progress. Wait for the current build to finish, then upload.
What happens if my ZIP upload fails?
If processing fails after the file has been accepted, Caffeine posts an error message in your chat conversation. If the uploaded code fails to compile, Caffeine shows the last lines of the build output in chat so you can see the actual compiler errors. To reproduce the full output locally, run CI=1 caffeine build in your project folder. You can then review the message and try uploading again.
My project says it's busy and won't accept a new upload. What should I do?
This can happen if a previous import or upload was interrupted before it fully completed, leaving the project in a temporary import state. Caffeine now detects this automatically and recovers the project when you next interact with it — try sending a chat message, retrying the upload, or waiting a moment and trying again. The project will resume accepting uploads without any data loss.
Can I undo an upload?
There is no one-click undo. If you uploaded the wrong file, you can upload a corrected ZIP to overwrite the draft again, or restore a previous version using the draft restore option in project settings.