# Getting your code in

BitHut does not write code. It takes the code you have and puts it online. This section explains each way the code can arrive and when to use it.

## The ways

| Way | Where you start | Good for |
|---|---|---|
| [From your AI](/docs/code/from-ai) | The chat or folder where your AI works | Most projects. The AI uploads, reads what BitHut found and fixes problems |
| [From GitHub](/docs/code/github) | Cabinet, or ask your AI | Code already on GitHub, including from Lovable or Bolt |
| [From GitLab](/docs/code/gitlab) | Cabinet | Code on GitLab |
| [From your computer](/docs/code/folder) | Cabinet | A folder you have, without an AI in the loop |
| [Moving from another service](/docs/code/moving) | Ask your AI | Projects on Railway, Heroku, Replit, WordPress and others |

Whatever way you choose, the same thing happens next: BitHut reads the code, builds it, starts it once as a trial and gives the address. See [How BitHut works](/docs).

## Rules for every way

- **The `.env` file is never uploaded.** Keys go into the cabinet. Your AI gives you a link, or runs a command that sends the file's keys straight to BitHut, not through the chat.
- **Installed dependencies are left out.** Folders like `node_modules`, `.venv` and `.git` are not sent; BitHut installs dependencies itself.
- **Size.** An upload can be up to 100 MB packed and 300 MB or 30,000 files unpacked.
- **Every deploy is a new version.** You can return to an earlier one.

## Getting the code back

BitHut keeps the code of the last 20 versions. Your AI can download the code that runs now, for example before someone else changes it. See [Download the running code](/docs/code/download).

## In the cabinet, only for a new project

The cabinet's ways (GitHub, GitLab, a folder) are on a project's page under **Bring the code** until the project first runs. After that, new versions come through your AI.
