Skip to main content
machine.git is a first-class operation surface. Clone, status, log, branch, checkout, add, commit, pull, and push run as a structured RPC that returns parsed results (current branch, ahead/behind counts, a typed changed-file list, commit shas) instead of raw command output. The same methods are available in the Python and TypeScript SDKs and over the HTTP API at /v1/machines/{id}/git/*.

Clone

Authenticated clone

Pass credentials from your orchestrator through environment variables or secret storage. Avoid committing tokens into the machine filesystem.

Branch, edit, and diff

Inspect status and history

status and log return structured results, not strings:

Commit and push

SSH keys and remotes

TypeScript

The TypeScript SDK exposes the same surface, camelCased:

Auth and credentials

Credentials passed via auth= are scoped to a single operation: the guest agent materialises them into a temporary path that is removed when the operation completes, so nothing is written to durable machine state. SSH keys can be supplied per-operation too (GitSshAuth in TypeScript). dangerously_authenticate is the explicit, named-unsafe path that writes a persistent credential store — use it only when you intend the credentials to outlive a single command.

Other helpers

machine.git also supports pull, checkout, delete_branch, branches, log, remote_add, set_config, get_config, configure_user, diff, dangerously_authenticate, and add_ssh_key.