v0.3.0 — Local Repo Mode
Local Repo Mode with Session Branches
Adds --repo <url> --pat <token> to auto-clone a GitHub repo locally, create a session branch, run the agent, auto-commit changes, and push the session branch.
Features
- CLI:
gitclaw --repo <url> --pat <token> "prompt"— clones, branches, runs, commits, pushes - Session resume:
--session gitclaw/session-<id>checks out existing branch with full context - SDK:
query({ repo: { url, token } })— same flow programmatically - Token safety: PAT embedded in remote URL for clone/push, stripped on finalize
- Auto-scaffold: repos without
agent.yamlget it scaffolded on the session branch - Smart defaults: clones to
/tmp/gitclaw/<repo-name>when no--dirgiven
Token fallback chain
--pat → GITHUB_TOKEN → GIT_TOKEN
New files
src/session.ts— session lifecycle moduleexamples/local-repo.ts— SDK usage example