---
title: Projects
description: The TypeScript source of a Workspace's definitions, and how applying it commits them.
---

{/* vale off */}

A **Project** is the local TypeScript source of a Workspace's Resource definitions, which its root module registers with `project()`. The same Project can apply to any Branch, and on each Branch it owns the Resources it registers. A Resource belongs to at most one Project on a Branch.

## Apply

**Apply** commits the definitions that changed in a Project to a Branch, as one Commit. Definitions that did not change stay as they are. Apply removes each Resource the Project owned and no longer registers, and refuses a Resource that another Project owns.

## Adopting Resources from another Project

Apply adopts each Resource the Project registers that no Project owns. A Resource that another Project owns is refused, with the owner's name, unless you apply with `--adopt`:

```bash
tractorbeam apply --adopt
```

With `--adopt`, Apply adopts each Resource the Project registers that another Project owns. The Resource keeps its ID, its definition, and its data, and the plan lists it as adopted from its old Project. `tractorbeam plan --adopt` previews the adoption, and `tractorbeam dev --adopt` adopts into your personal Branch. When Apply adopts the last Resource of a Project, it removes that Project, which loses nothing. To split, merge, or rename Projects, register each Resource in the Project that should own it and apply each Project once with `--adopt` on each Branch.

## Bindings

A **binding** is a typed value through which running code uses one Resource. A Project's generated TypeScript files hold its bindings, so a Function names the Resources it uses through types the Project checks.
