Tools · Files and code

git_ops

Changes things

Structured git operations: status, diff, log, show, blame, branch, add, commit, checkout, stash (push/reset are disabled by default).

When to use: Prefer this over bash for git: status before and after changes, diff to review your edits, log/show/blame to understand history, add+commit to save work (commit requires a message).

Example

Run for real by scripts/tool-examples.py in a small demo project, with Haiku 5.5 where the tool calls a model. The output is exactly what the tool returned.

The call

tool call
{
  "tool": "git_ops",
  "arguments": {
    "action": "log",
    "limit": 3
  }
}

Real output

git log (ok):
bf496c0 (HEAD -> main) Initial pricing service

Parameters

NameTypeDescription
action*string—addblamebranchcheckoutcommitdifflogpushresetshowstashstash_list
pathsarrayFile paths (diff/add/blame/checkout)
messagestringCommit/stash message
refstringBranch/commit/ref (checkout/show/log)
stagedbooleandiff --staged
limitintegerlog entry count (default 15)

* required

Read, search and edit the project; run commands, code and git.