Git Manage Tool
git_manageManage external git repositories with atomic file, branch, commit, and pull request operations. Supports GitHub, GitLab, Bitbucket, and generic SSH.
Instructions
Connect, browse, and modify external git repositories (GitHub, GitLab, Bitbucket, generic SSH). Repo connections store encrypted credentials and use phpseclib for SSH. File and commit ops happen through the platform's AtomicCommittingGitClient so concurrent agent edits don't corrupt working trees.
Repo actions:
repo_list / repo_get (read).
repo_create (write) — name, url, credentials (object).
repo_update (write) — repo_id + any creatable field.
repo_delete (DESTRUCTIVE) — repo_id. Drops connection; does not delete the remote repo.
repo_test (read) — repo_id. Verifies connectivity + auth.
File / branch / commit actions:
file_read (read) — repo_id, path, optional branch.
file_write (write — pushes to remote) — repo_id, path, content, branch, message.
file_list (read) — repo_id, optional path, branch.
branch_create (write) — repo_id, name, source branch.
commit (write — pushes to remote) — repo_id, message, files[].
pr_create (write) — repo_id, title, body, source branch, target branch. Returns PR URL.
pr_list (read) — repo_id; optional state filter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform: repo_list, repo_get, repo_create, repo_update, repo_delete, repo_test, file_read, file_write, file_list, branch_create, commit, pr_create, pr_list | |
| deadline_ms | No | Optional: max wall-clock time (ms) the tool may spend. If exceeded during the call, returns a DEADLINE_EXCEEDED error. Minimum 100 ms. Leave unset for no deadline. | |
| provider | No | Filter by provider: github, gitlab, bitbucket, gitea, generic | |
| mode | No | Filter by mode: api_only, sandbox, bridge | |
| status | No | Filter by status: active, disabled, error | |
| limit | No | Max results (default 15, max 100) | |
| id | Yes | Repository UUID | |
| name | Yes | Friendly name for the repository | |
| url | Yes | Repository URL (HTTPS or SSH) | |
| default_branch | No | Default branch name (default: main) | main |
| credential_id | No | UUID of a Credential containing the PAT/SSH key for authentication | |
| config | No | Mode-specific config. sandbox: {provider, instance_type, run_tests, test_command}. bridge: {repo_name, working_directory}. pr: {require_approval} | |
| repository_id | Yes | Repository UUID | |
| path | Yes | File path relative to repo root (e.g. "src/app.php") | |
| ref | No | Git ref: branch name, tag, or commit SHA (default: HEAD) | HEAD |
| content | Yes | Full file content to write | |
| message | Yes | Commit message | |
| branch | No | Branch to commit to (defaults to repository default_branch) | |
| from | No | Source branch or commit SHA to branch from (defaults to repository default_branch) | |
| changes | Yes | Array of file changes: [{path, content}] or [{path, deleted: true}] | |
| title | Yes | Pull request title | |
| body | No | Pull request description/body | |
| head | Yes | Source branch (the branch with changes) | |
| base | No | Target branch (defaults to repository default_branch) | |
| state | No | PR state filter: open, closed, all (default: open) | open |