Skip to main content

Git Tools

Category: version-control · 9 tools

Version control operations for Git repositories.

Tools

ToolParametersDescription
git.statuspath?Get modified, staged, untracked files
git.diffpath?, staged?Show changes (staged or unstaged)
git.logmaxCount?, path?Get recent commit history
git.addpathStage files for commit
git.commitmessageCommit staged changes
git.blamepathShow who changed what
git.branch_listremote?List all branches
git.branch_createnameCreate a new branch
git.checkoutbranchSwitch branches

Examples

Checking Status

const stream = toolpack.stream({
messages: [{ role: 'user', content: 'What files have I changed?' }],
model: 'gpt-4o',
});
// AI uses git.status

Viewing Changes

const stream = toolpack.stream({
messages: [{ role: 'user', content: 'Show me the diff for utils.ts' }],
model: 'gpt-4o',
});
// AI uses git.diff

Committing

const stream = toolpack.stream({
messages: [{ role: 'user', content: 'Stage and commit these changes with message "Fix bug"' }],
model: 'gpt-4o',
});
// AI uses git.add then git.commit

Branch Management

const stream = toolpack.stream({
messages: [{ role: 'user', content: 'Create a new branch called feature/auth' }],
model: 'gpt-4o',
});
// AI uses git.branch_create