---
title: "Get VCS diff"
method: GET
path: "/vcs/diff"
---

# Get VCS diff

`GET /vcs/diff`

Retrieve the current git diff for the working tree or against the default branch.

## Query parameters

- `directory` string
- `workspace` string
- `mode` 'git' | 'branch', required

## Response `200`

VCS diff

- VcsFileDiff[]
  - `file` string, required
  - `patch` string, required
  - `additions` number, required
  - `deletions` number, required
  - `status` 'added' | 'deleted' | 'modified'

---

[API](https://skmtc.net/kaaass/apis/opencode.md) · [All operations](https://skmtc.net/kaaass/apis/opencode/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kaaass/opencode/revisions/8bb9a15bd144/schema)
