What Version Control System Does Open Work Use?

Open Work uses Git as its version control system, with repository structure and SDK integrations designed specifically for Git workflows.

The different-ai/openwork repository is built entirely around Git for source control. Evidence of this includes a .gitignore configuration defining Git exclusion patterns, and the OpenCode SDK's built-in VCS client that queries Git-specific metadata such as branch names and commit history.

Git Repository Structure in Open Work

Open Work's codebase contains multiple files that confirm Git as the underlying VCS and enable Git-native developer workflows.

.gitignore Configuration

The presence of .gitignore at the repository root confirms Git is the active version control system. This file defines patterns for files and directories that Git should exclude from tracking.

Key patterns in Open Work's .gitignore:

  • node_modules/ — Dependency directories
  • dist/ and build/ — Compiled output directories
  • .env and .env.local — Environment configuration files
  • OS-specific files (.DS_Store, Thumbs.db)

View the complete file: https://raw.githubusercontent.com/different-ai/openwork/dev/.gitignore

SDK VCS Integration

The OpenCode SDK includes a dedicated VCS client that interfaces directly with Git repositories. The implementation in sdk.gen.js provides methods to retrieve Git metadata programmatically.

Key SDK location: .opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js#L1913

This VCS client enables applications built on Open Work to:

  • Detect the current Git branch
  • Retrieve commit history
  • Access repository metadata without shelling out to git commands

Working with Git in Open Work

Querying VCS Information via SDK

The following TypeScript example demonstrates retrieving Git branch information using the OpenCode SDK:

// Retrieve current Git branch using OpenWork's VCS client
import { OpenWorkSDK } from "@opencode-ai/sdk";

async function getGitBranch() {
  const sdk = new OpenWorkSDK({ 
    apiKey: process.env.OPENWORK_API_KEY 
  });
  
  // vcs.get returns Git-specific metadata including branch name
  const vcsInfo = await sdk.client.vcs.get({ directory: "." });
  
  console.log(`Current branch: ${vcsInfo.branch}`);
  console.log(`Latest commit: ${vcsInfo.commitHash}`);
}

getGitBranch().catch(console.error);

Direct Git Commands for Development

Developers working directly with the Open Work repository can use standard Git commands:


# Check repository status

git status

# List branches with current branch highlighted

git branch -vv

# View recent commit history

git log --oneline -10

# Create and switch to a new feature branch

git checkout -b feature/new-capability

# Stage and commit changes

git add -p
git commit -m "feat: add VCS integration tests"

Configuration Files Supporting Git Workflows

File Purpose Git Relevance
.gitignore Defines Git exclusion patterns Core VCS configuration
opencode.json OpenCode environment settings Specifies Git as expected VCS
package.json NPM/package scripts Contains Git-aware development commands
.gitattributes (if present) Line ending and diff behavior Git repository settings

The package.json includes scripts like pnpm dev:worktree that assume Git worktree functionality for managing multiple working directories from a single repository.

Summary

  • Git is the sole version control system used by different-ai/openwork
  • Repository confirmed by .gitignore presence and Git-specific ignore patterns
  • OpenCode SDK provides programmatic VCS access via the vcs client in sdk.gen.js
  • Development workflows rely on Git features including branches, worktrees, and commit history
  • Configuration files (opencode.json, package.json) encode Git assumptions for tooling

Frequently Asked Questions

How can I verify that Open Work uses Git?

Check for the .gitignore file in the repository root, which is a Git-specific configuration file. The raw file at https://raw.githubusercontent.com/different-ai/openwork/dev/.gitignore contains standard Git ignore patterns like node_modules/ and .env.

Does Open Work support other version control systems besides Git?

No. The OpenCode SDK's VCS implementation in sdk.gen.js is built specifically for Git operations. The vcs.get() method returns Git-specific metadata including branch names and commit hashes that have no equivalent in other VCS tools.

Can I use Open Work's VCS features in my own application?

Yes. The @opencode-ai/sdk package exports a vcs client that provides get() and related methods for querying Git repository state. Initialize the SDK with your API credentials and call sdk.client.vcs.get({ directory: path }) to retrieve branch and commit information.

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 →