# What Version Control System Does OpenWork Use?

> OpenWork utilizes Git for version control, with .gitignore files managing repositories and VCS integrated via the OpenCode SDK. Learn more about their setup.

- Repository: [Different AI/openwork](https://github.com/different-ai/openwork)
- Tags: faq
- Published: 2026-08-14

---

**OpenWork uses Git as its version control system, with repository configuration managed through standard `.gitignore` files and VCS integration exposed via the OpenCode SDK.**

OpenWork is an open-source project hosted at `different-ai/openwork` that relies on Git for source code management. According to the different-ai/openwork source code, the repository structure includes standard Git configuration files and SDK implementations that programmatically interact with Git metadata, confirming Git as the underlying VCS.

## Git Repository Evidence

The presence of a `.gitignore` file at the repository root confirms that OpenWork is managed as a Git repository. This file defines patterns for files and directories that Git should ignore, such as build artifacts and dependencies.

In [`.gitignore`](https://github.com/different-ai/openwork/blob/dev/.gitignore), patterns exclude common development artifacts like `node_modules/` and `dist/` directories, which is standard practice for Git-based Node.js projects.

## VCS Integration via the OpenCode SDK

OpenWork's tooling assumes a Git-based workflow. The OpenCode SDK implements a `vcs` client that retrieves Git-specific information, such as the current branch name. As implemented in [`different-ai/openwork`](https://github.com/different-ai/openwork), the file `.opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js` at line 1913 exposes methods to query Git metadata from the local repository.

This integration allows OpenWork applications to programmatically access VCS state without executing shell commands directly.

## Querying Git Information Programmatically

You can retrieve version control data from OpenWork using either the SDK or standard Git commands.

### Using the OpenCode SDK

The TypeScript SDK provides a typed interface to fetch Git metadata:

```typescript
import { OpenWorkSDK } from "@opencode-ai/sdk";

async function getGitBranch() {
  const sdk = new OpenWorkSDK({ /* SDK config */ });
  // vcs.get returns VCS info such as the current branch name
  const info = await sdk.client.vcs.get({ directory: "." });
  console.log(`Current Git branch: ${info?.branch}`);
}

getGitBranch();

```

### Using Direct Git Commands

For development tasks, standard Git commands work within the OpenWork repository:

```bash

# Check repository status

git status

# Display current branch

git branch

# View recent commit history

git log --oneline -5

```

## Key Files for Version Control

Several files in the OpenWork repository define how the project interacts with Git:

- **[`.gitignore`](https://raw.githubusercontent.com/different-ai/openwork/dev/.gitignore)** – Specifies files for Git to ignore, confirming the repository uses Git version control.
- **[[`opencode.json`](https://github.com/different-ai/openwork/blob/main/opencode.json)](https://github.com/different-ai/openwork/blob/dev/opencode.json)** – Configures the OpenCode environment that expects a Git-based VCS when interacting with the SDK.
- **[[`sdk.gen.js`](https://github.com/different-ai/openwork/blob/main/sdk.gen.js)](https://github.com/different-ai/openwork/blob/dev/.opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js#L1913)** – Implements the `vcs` client at line 1913, which retrieves Git branch information from the project.
- **[`package.json`](https://github.com/different-ai/openwork/blob/main/package.json)** – Defines scripts (e.g., `pnpm dev`, `pnpm dev:worktree`) that assume a Git worktree structure for development and CI pipelines.

## Summary

- OpenWork is managed with **Git**, evidenced by the `.gitignore` configuration and SDK architecture.
- The **OpenCode SDK** provides programmatic access to Git metadata via the `vcs.get` method implemented in [`sdk.gen.js`](https://github.com/different-ai/openwork/blob/main/sdk.gen.js).
- Development workflows rely on standard Git commands and assume a Git worktree structure for build processes.
- Key configuration files include `.gitignore`, [`opencode.json`](https://github.com/different-ai/openwork/blob/main/opencode.json), and the SDK's VCS implementation.

## Frequently Asked Questions

### Does OpenWork support version control systems other than Git?

No. According to the source code in `.opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js`, the SDK specifically implements Git-based VCS queries. The `vcs.get` method expects a Git repository structure and returns Git-specific metadata such as branch names and commit hashes.

### How does OpenWork programmatically detect the current Git branch?

OpenWork uses the OpenCode SDK's `client.vcs.get()` method, which internally queries Git metadata from the `.git` directory. This is implemented in the SDK generator file at [line 1913](https://github.com/different-ai/openwork/blob/dev/.opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js#L1913), allowing TypeScript applications to retrieve branch information without executing shell commands manually.

### Can I contribute to OpenWork without using Git?

No. The repository requires Git for contribution workflows. The [`package.json`](https://github.com/different-ai/openwork/blob/main/package.json) scripts and CI configurations assume Git is installed locally, and the OpenCode SDK's VCS integration depends on a valid Git repository structure with a `.git` directory.

### Where is the Git configuration stored in the OpenWork repository?

The primary Git configuration lives in the `.git` directory (not tracked in the repository), while repository-level ignore patterns are defined in [`.gitignore`](https://github.com/different-ai/openwork/blob/dev/.gitignore) at the project root. The OpenCode SDK configuration in [[`opencode.json`](https://github.com/different-ai/openwork/blob/main/opencode.json)](https://github.com/different-ai/openwork/blob/dev/opencode.json) references Git-specific settings for VCS integration.