What Version Control System Does OpenWork Use?

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, 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, 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:

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:


# 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:

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.
  • Development workflows rely on standard Git commands and assume a Git worktree structure for build processes.
  • Key configuration files include .gitignore, 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, 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 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 at the project root. The OpenCode SDK configuration in [opencode.json](https://github.com/different-ai/openwork/blob/dev/opencode.json) references Git-specific settings for VCS integration.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →