Caffeine builds and runs your app so you never have to think about code. But the code is real — a complete, working Motoko backend and React frontend — and you own it. GitHub Export is how you take possession of it. Beyond ownership, it gives you a living record of your app's development: every time you export after a change, another commit is added, and over time your repository becomes a readable history of what you built and why. For developers who want to inspect, extend, or fork the code, it is the bridge between Caffeine and their existing workflow.
GitHub Export lets you push your Caffeine app's source code to a GitHub repository. Once connected, you can save your code at any time — and every new export adds a commit, giving you a full history of how your app has evolved.
What you need:
- A GitHub account
- A Caffeine project with at least one draft (a version of your app that the AI has built and deployed)
Connecting your GitHub account
GitHub Export uses a GitHub App to access your account securely. The app requests only the permissions needed to create and update a repository on your behalf.
To connect:
- Open your project and click the Settings icon (the gear icon at the top of the chat panel).
- Select Push to GitHub from the menu.
- In the dialog that opens, click Sync to GitHub.
- A GitHub authorization window opens. Follow the prompts to install the Caffeine GitHub App on your personal GitHub account.
- Once authorized, the window closes automatically and your first export begins immediately.
You only need to go through this setup once. After that, your GitHub account stays connected across all your projects.
What gets exported
When you export a project, Caffeine sends the following to GitHub:
- All source files for your app — the backend (Motoko) and frontend (React/TypeScript)
- Your project's specification file (
spec.md), which describes what the app does - All image and asset files used by the app
The export reflects the current state of your draft — the latest version the AI has generated.
Commit messages
Each export creates one commit in your repository. For your first export, the commit message is Initial commit — Exported from Caffeine. For subsequent exports, Caffeine uses AI to write a short, descriptive commit message based on your recent conversation and the changes in the specification — so the commit history reads like a meaningful log of what you asked for and what changed.
The commit author is set to your Caffeine username.
Repository visibility
When setting up your export, you can choose whether the GitHub repository is public or private.
- Public repositories can be created on any plan.
- Private repositories require an active paid subscription.
The visibility setting applies to the repository as a whole and can be changed later directly in GitHub.
Frequently asked questions
Does GitHub Export happen automatically whenever a new build completes?
No. Each export is triggered manually. After a new build, open the project settings and click Save Changes to GitHub to push the updated code. Caffeine does not automatically sync to your GitHub repository.
Can I connect the same GitHub account to multiple Caffeine projects?
Yes. Once you authorize the Caffeine GitHub App on your GitHub account, it applies to all your projects. Each project gets its own repository.
Can I export to a repository that belongs to a GitHub organization?
The Caffeine GitHub App must be installed on the specific account or organization you want to export to. During authorization, GitHub gives you the option to choose which account to install the app on. If you want to export to an organization, select that organization during the installation step.
Does exporting to GitHub affect my live app?
No. GitHub Export is a copy of your source code — it has no effect on your deployed app. Your live app continues running regardless of whether you export or not.
What happens if I delete the GitHub repository?
Your Caffeine app is unaffected — it runs on Caffeine's infrastructure, not GitHub. The next time you export, Caffeine will create a new repository with the same name (or prompt you to choose a new name).
Can I import code back from GitHub into Caffeine?
Not yet. GitHub Import — which would let you push code from a GitHub repository into your Caffeine project — is a separate feature that is currently in development and not yet enabled.
Can I host the exported code myself, outside of Caffeine?
There is nothing in the licensing that prevents you from doing so — you own the code. That said, there are a few practical hurdles to be aware of.
First, Caffeine apps run on the Internet Computer (ICP), so self-hosting means deploying to ICP — not to a conventional cloud provider like AWS or Vercel. The exported code does not include a dfx.json configuration file (the ICP deployment manifest), so you would need to add that and configure it manually before deployment.
Second, some Caffeine runtime services are not available outside of Caffeine's environment. File storage, for example, runs through Caffeine's managed infrastructure — an app deployed independently would need to replace that with its own storage solution.
Caffeine is building dedicated tools to make it easier to get your project files onto your local machine. The first piece of this is a download API that the Caffeine CLI will use to clone your project directly — fetching all your source files and assets in one step. This tooling is not yet publicly available, but it is actively in development. When it ships, it will be announced here.
In short: self-hosting is possible and permitted, but requires manual adaptation work by someone comfortable with ICP development tooling. Dedicated local tooling is on the way.