# Download the running code

BitHut keeps the code of every version it builds, so you can get back exactly what runs online. This helps when the copy on your computer is lost or old, or when someone else deployed the last version.

## How to get it

Ask your AI: “Download the code of my project from BitHut.” There is no download button in the cabinet yet; your AI does it.

1. BitHut gives your AI a one-time command. It works once and for 30 minutes.
2. The AI runs it where the folder should be. A folder named after the project appears, with the code running on the project's main address now.
3. Inside it there is `.bithut/base`, a small file with the version's id. Keep it.

This works for AIs that can run commands: Claude Code, Codex, Cursor.

## Why `.bithut/base` matters

When your AI makes changes in that folder and deploys from it, BitHut sees which version the change started from. Keep the `.bithut` folder in the project.

## What is kept

- The code of the last 20 versions of each project.
- Only versions that built well, and only deploys made after 26 November 2026. If the project has no saved code yet, deploy it once from the folder you have; that starts its history.
- `.env` files are not in the saved code: they never reach BitHut. Keys stay in the cabinet.

## Before you change a project

If the project may have been deployed from somewhere else, for example by another person or another computer, ask your AI to download the running code first and make changes there. Otherwise a deploy from an old folder can put back old code.
