# How OpenCut Uses Moon and Proto for Bun Version Management

> Discover how OpenCut manages Bun versions with Proto and Moon. Learn how this combination streamlines your monorepo's build, test, and development workflows for efficient development.

- Repository: [OpenCut.app/OpenCut](https://github.com/OpenCut-app/OpenCut)
- Tags: how-to-guide
- Published: 2026-06-23

---

**The OpenCut monorepo uses Proto to pin Bun and Moon versions in a `.prototools` file, then leverages Moon's task runner to execute all build, test, and development commands using that specific Bun binary across the entire workspace.**

OpenCut is an open-source video editing application structured as a Moon monorepo where deterministic tooling is critical. According to the `OpenCut-app/OpenCut` source code, the project centralizes Bun version management through Proto to guarantee that every contributor and CI pipeline operates with identical runtime versions. This eliminates environment drift by routing all task execution through a pinned, reproducible toolchain.

## Pinning Bun Versions with Proto and .prototools

At the root of the repository, the `.prototools` file acts as the central authority for all development tools. This configuration declares:

```text
moon = "2.3.3"
bun  = "1.3.11"

```

When developers run `proto use`, Proto reads this file and automatically downloads the exact specified versions of both Moon and Bun to the local environment. This mechanism ensures that every developer and CI runner uses Bun 1.3.11, eliminating "works on my machine" inconsistencies across the `OpenCut-app/OpenCut` workspace.

## Moon Task Runner Integration

Each application within the monorepo contains a [`moon.yml`](https://github.com/OpenCut-app/OpenCut/blob/main/moon.yml) configuration file that defines executable tasks. In [`apps/web/moon.yml`](https://github.com/OpenCut-app/OpenCut/blob/main/apps/web/moon.yml) and [`apps/api/moon.yml`](https://github.com/OpenCut-app/OpenCut/blob/main/apps/api/moon.yml), all task commands explicitly use Bun syntax:

```yaml
tasks:
  dev:
    command: 'bun run dev'
  build:
    command: 'bun run build'
  test:
    command: 'bun run test'

```

Because Moon itself is launched via Proto using the pinned Bun version, every task automatically executes under Bun 1.3.11. This creates a deterministic execution environment where the task runner and the JavaScript runtime remain version-locked for all operations.

## The Development Workflow

The typical workflow for OpenCut developers follows a strict sequence to maintain version consistency:

1. `proto use` – Installs Bun 1.3.11 and Moon 2.3.3 as declared in `.prototools`
2. `bun install` – Resolves npm dependencies using the pinned Bun binary
3. `moon run <app>:<task>` – Executes tasks using the version-managed runtime

Common commands include:

```bash

# Install the exact toolchain

proto use

# Install project dependencies

bun install

# Start the web dev server (reads apps/web/moon.yml)

moon run web:dev

# Start the API dev server (reads apps/api/moon.yml)

moon run api:dev

# Build the web application

moon run web:build

# Run web application tests

moon run web:test

```

This workflow ensures that whether building the web frontend or running the API worker, both applications share the exact same Node-compatible Bun runtime.

## Configuration File Reference

The following files implement the Bun version management strategy:

- `.prototools` – Central version lock specifying Moon 2.3.3 and Bun 1.3.11
- [`apps/web/moon.yml`](https://github.com/OpenCut-app/OpenCut/blob/main/apps/web/moon.yml) – Moon configuration for the web application defining `dev`, `build`, and `test` tasks
- [`apps/api/moon.yml`](https://github.com/OpenCut-app/OpenCut/blob/main/apps/api/moon.yml) – Moon configuration for the API worker with corresponding Bun-based tasks
- [`README.md`](https://github.com/OpenCut-app/OpenCut/blob/main/README.md) – Developer onboarding instructions demonstrating the `proto use` workflow

## Summary

- **Proto manages versions**: The `.prototools` file locks Moon to 2.3.3 and Bun to 1.3.11, ensuring reproducible environments across all machines.
- **Moon orchestrates tasks**: Project-specific [`moon.yml`](https://github.com/OpenCut-app/OpenCut/blob/main/moon.yml) files in `apps/web/` and `apps/api/` define tasks that execute using the pinned Bun binary.
- **Unified workflow**: Running `proto use` followed by `moon run` commands guarantees that all developers and CI systems use identical runtime versions.
- **Deterministic execution**: All build, test, and development tasks consume the exact same Bun version, eliminating toolchain drift across the OpenCut monorepo.

## Frequently Asked Questions

### What is the purpose of the `.prototools` file in OpenCut?

The `.prototools` file serves as the centralized version lock for the entire workspace. Located at the repository root, it specifies the exact versions of Moon (2.3.3) and Bun (1.3.11) required for the project, ensuring deterministic tooling across all development environments and CI pipelines according to the `OpenCut-app/OpenCut` repository structure.

### How does Moon know which Bun version to execute?

Moon relies on Proto's environment management rather than explicit configuration. When `proto use` installs the toolchain, it places the Bun 1.3.11 binary in the environment path that Moon uses when executing tasks defined in [`moon.yml`](https://github.com/OpenCut-app/OpenCut/blob/main/moon.yml) files, such as `bun run dev` in [`apps/web/moon.yml`](https://github.com/OpenCut-app/OpenCut/blob/main/apps/web/moon.yml).

### Can individual applications use different Bun versions?

No, OpenCut maintains a single Bun version across the entire monorepo. The `.prototools` file at the repository root defines one version for the whole workspace, ensuring consistency between the web application (`apps/web`) and API worker (`apps/api`) as implemented in the source code.

### How do CI pipelines maintain tool version parity with local development?

CI pipelines run the same `proto use` command to install the exact versions specified in `.prototools`. Because Proto handles the installation and Moon orchestrates the task execution, CI environments automatically use Bun 1.3.11 and Moon 2.3.3, matching every local development machine exactly.