{"_id":"@amuedespacher/agent-git","_rev":"3-057d9cbe665138d770c10b513bc68fcb","name":"@amuedespacher/agent-git","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@amuedespacher/agent-git","version":"0.1.0","_id":"@amuedespacher/agent-git@0.1.0","maintainers":[{"name":"amuedespacher","email":"alexander@muedespacher.ch"}],"bin":{"agent-git":"dist/index.js"},"dist":{"shasum":"fcef19af1c8a9d4abf0bf5dd50478f55a1ce6826","tarball":"https://registry.npmjs.org/@amuedespacher/agent-git/-/agent-git-0.1.0.tgz","fileCount":13,"integrity":"sha512-Is9LbXm0HrhCipIW8cVrmE385LhrwbArz1OpR72l39BE6N/oOn0dxtoOfq/m3KleZgZYu3d2FWZD8XdpxSHeyg==","signatures":[{"sig":"MEQCIAFg9hhsKg9Oj58HFpl6nbgz2JrkjxV0efB15xrv2My2AiBcXicK3fRhlKmX2XMjQipcN9vEGhpND9Hmt9CXbhjesw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88880},"type":"module","gitHead":"ada817210e32d6b5836f047922482caafd93539c","scripts":{"dev":"tsx src/index.tsx","test":"vitest run","build":"tsc -p tsconfig.json","start":"node dist/index.js","unlink:cli":"npm unlink -g agent-git","install:cli":"npm run build && npm link","prepublishOnly":"npm run build"},"_npmUser":{"name":"amuedespacher","email":"alexander@muedespacher.ch"},"_npmVersion":"11.9.0","description":"> **Experimental** — This is an early-stage hobby project. Expect rough edges and breaking changes. Use with care on repositories that matter to you.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"ink":"^5.2.1","zod":"^3.25.67","execa":"^9.6.0","react":"^18.3.1","openai":"^4.104.0","parse-diff":"^0.11.1","cosmiconfig":"^9.0.0","ink-text-input":"^6.0.0","ink-select-input":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.3","vitest":"^3.2.4","typescript":"^5.8.3","@types/node":"^24.0.1","@types/react":"^18.3.12"},"_npmOperationalInternal":{"tmp":"tmp/agent-git_0.1.0_1776352164815_0.8773258914815254","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@amuedespacher/agent-git","version":"0.1.1","_id":"@amuedespacher/agent-git@0.1.1","maintainers":[{"name":"amuedespacher","email":"alexander@muedespacher.ch"}],"bin":{"agent-git":"dist/index.js"},"dist":{"shasum":"b58861664d3adda9bd74940886687a5308a9ea88","tarball":"https://registry.npmjs.org/@amuedespacher/agent-git/-/agent-git-0.1.1.tgz","fileCount":13,"integrity":"sha512-VdrkKex3FbDizJyBhjNxHsPNdQuXtJZhbkoJZSWGn7+GQK68p3J4HIS3YKRJi4gQtO7XaTmSO3BVPwdPRjz3nw==","signatures":[{"sig":"MEYCIQCpMx9gYIlRp+nbRux4yC/OwSqp0hFhvoOXTw5JuSvY3wIhAOtdPdFFLhCQ+mhtz1phd5z0xnmSqPwoTm0ybsOZJRb5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88925},"type":"module","gitHead":"e936a9638803eb0471a2133fb4d45768ebb10f7d","scripts":{"dev":"tsx src/index.tsx","test":"vitest run","build":"tsc -p tsconfig.json","start":"node dist/index.js","unlink:cli":"npm unlink -g agent-git","install:cli":"npm run build && npm link","prepublishOnly":"npm run build"},"_npmUser":{"name":"amuedespacher","email":"alexander@muedespacher.ch"},"_npmVersion":"11.9.0","description":"> **Experimental** — This is an early-stage hobby project. Expect rough edges and breaking changes. Use with care on repositories that matter to you.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"ink":"^5.2.1","zod":"^3.25.67","execa":"^9.6.0","react":"^18.3.1","openai":"^4.104.0","parse-diff":"^0.11.1","cosmiconfig":"^9.0.0","ink-text-input":"^6.0.0","ink-select-input":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.3","vitest":"^3.2.4","typescript":"^5.8.3","@types/node":"^24.0.1","@types/react":"^18.3.12"},"_npmOperationalInternal":{"tmp":"tmp/agent-git_0.1.1_1776352694818_0.7234533276397774","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@amuedespacher/agent-git","version":"0.1.2","type":"module","bin":{"agent-git":"dist/index.js"},"scripts":{"build":"tsc -p tsconfig.json","dev":"tsx src/index.tsx","install:cli":"npm run build && npm link","prepublishOnly":"npm run build","start":"node dist/index.js","test":"vitest run","unlink:cli":"npm unlink -g agent-git"},"dependencies":{"cosmiconfig":"^9.0.0","execa":"^9.6.0","ink":"^5.2.1","ink-select-input":"^6.0.0","ink-text-input":"^6.0.0","openai":"^4.104.0","parse-diff":"^0.11.1","react":"^18.3.1","zod":"^3.25.67"},"devDependencies":{"@types/node":"^24.0.1","@types/react":"^18.3.12","tsx":"^4.20.3","typescript":"^5.8.3","vitest":"^3.2.4"},"gitHead":"f865b51982ae8dbaa77686dd13d70d165057f53a","_id":"@amuedespacher/agent-git@0.1.2","description":"> **Experimental** — This is an early-stage hobby project. Expect rough edges and breaking changes. Use with care on repositories that matter to you.","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-B2XxFWsonWqWoU74jcARgntjJcaFLl6h9bi37Vsy1rj7bMZWICkK/GkFSnTPwWpJol3+TZhrSBy6IoYqLAJu9Q==","shasum":"af7aeb45204e208fcd8820e237b962a3907208b8","tarball":"https://registry.npmjs.org/@amuedespacher/agent-git/-/agent-git-0.1.2.tgz","fileCount":13,"unpackedSize":88996,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDXEvSpmTOqHnmWIND4bs7AXMIlxkFEGf/ssWXbhqz6GAiBW2iz9OEPZ7dUNfBxO4Zprc1CJkO8qWzFhbHEp7o90HA=="}]},"_npmUser":{"name":"amuedespacher","email":"alexander@muedespacher.ch"},"directories":{},"maintainers":[{"name":"amuedespacher","email":"alexander@muedespacher.ch"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-git_0.1.2_1776406707969_0.9684917665070938"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-16T15:09:24.708Z","modified":"2026-04-17T06:18:28.243Z","0.1.0":"2026-04-16T15:09:24.952Z","0.1.1":"2026-04-16T15:18:14.945Z","0.1.2":"2026-04-17T06:18:28.129Z"},"description":"> **Experimental** — This is an early-stage hobby project. Expect rough edges and breaking changes. Use with care on repositories that matter to you.","maintainers":[{"name":"amuedespacher","email":"alexander@muedespacher.ch"}],"readme":"# Agent Git\n\n> **Experimental** — This is an early-stage hobby project. Expect rough edges and breaking changes. Use with care on repositories that matter to you.\n\n`agent-git` is a terminal-native, chat-first Git assistant powered by an LLM agent loop. Instead of memorising subcommands, you describe what you want in plain language and Agent Git reasons about your repository, calls structured Git tools, and asks for your approval before making any changes.\n\n```\nnpx @amuedespacher/agent-git\n```\n\nRun that inside any Git repository to open the interactive UI.\n\n---\n\n## How it works\n\nAgent Git connects to an OpenAI model and drives an internal agent loop:\n\n1. You send a natural-language message.\n2. The LLM decides which Git tools to call.\n3. Tools are executed **locally** against your repository.\n4. Results feed back into the model until the task is complete.\n\nWrite operations (commit, push, branch changes, etc.) are **guarded** — the agent presents the action and waits for your explicit `y` or `n` before executing anything.\n\n---\n\n## Requirements\n\n- Node.js ≥ 18\n- An [OpenAI API key](https://platform.openai.com/api-keys)\n- A Git repository to work in\n\n---\n\n## Setup\n\n### Via npx (no install)\n\n```bash\nnpx @amuedespacher/agent-git\n```\n\nOn first launch without a saved key, the app will walk you through connecting to OpenAI.\n\n### Global install\n\n```bash\nnpm install -g @amuedespacher/agent-git\nagent-git\n```\n\n---\n\n## What you can ask\n\n**Repository inspection**\n\n- `what's going on in this repo?`\n- `show me the staged diff`\n- `show recent commit history`\n- `list all branches`\n- `what remotes are configured?`\n\n**Committing**\n\n- `help me commit my staged changes`\n- `stage everything and write a commit message`\n- `suggest a conventional commit message for my diff`\n\n**Branching**\n\n- `create a branch called feature/my-thing`\n- `switch to main`\n- `delete the branch fix/old-thing`\n- `validate my current branch name`\n\n**Syncing with remotes**\n\n- `push my branch`\n- `pull the latest from origin`\n- `fetch and prune stale remote branches`\n\n**Remote management**\n\n- `add a remote called upstream`\n- `change the origin URL`\n\n---\n\n## Slash commands\n\n| Command               | Description                                     |\n| --------------------- | ----------------------------------------------- |\n| `/help`               | Show available chat patterns and slash commands |\n| `/settings`           | Open the settings panel                         |\n| `/connect-openai`     | Enter and save your OpenAI API key              |\n| `/chat`               | Return to the chat panel                        |\n| `/refresh`            | Re-scan repository state                        |\n| `agent-git --help`    | CLI flag reference                              |\n| `agent-git --version` | Print the installed version                     |\n\n---\n\n## Configuration\n\nConfiguration is resolved via [`cosmiconfig`](https://github.com/cosmiconfig/cosmiconfig): place a `agent-git.config.json` file in your project root, or add a `\"agent-git\"` key to `package.json`. Your OpenAI credentials are stored separately in `~/.agent-git/config.json`.\n\n```json\n{\n  \"provider\": {\n    \"kind\": \"openai\",\n    \"model\": \"gpt-5.4-nano\"\n  },\n  \"commitStyle\": \"conventional\",\n  \"branchPattern\": \"^(feature|fix|chore|docs|refactor|test)/[a-z0-9._-]+$\",\n  \"safetyLevel\": \"balanced\",\n  \"verbosity\": \"normal\"\n}\n```\n\nYou can also supply the API key via environment variable instead of the interactive setup:\n\n```bash\nexport OPENAI_API_KEY=sk-...\n```\n\n---\n\n## Limitations\n\nAgent Git is experimental. The following are known gaps in the current implementation:\n\n- **OpenAI only.** No support for other providers (Anthropic, Ollama, local models). An API key is required — there is no offline or heuristic-only mode.\n- **No rebase tool.** Interactive or standalone rebase is not implemented. Pull with `--rebase` is supported, but the agent cannot drive a rebase workflow step-by-step.\n- **No reset tool.** `git reset` (soft, mixed, or hard) is not available as an agent action. Recovery from bad commits must be done manually.\n- **No stash tool.** The agent cannot stash or pop changes. It may suggest stashing, but cannot execute it.\n- **No conflict resolution.** The agent cannot walk you through resolving merge conflicts. It can detect conflicted files in the status but cannot act on them.\n- **Diff and log size limits.** Diffs are capped at 400 lines and logs at 200 entries. Very large changesets may be truncated before the model sees them.\n- **Single repository.** The agent operates only in the directory it was launched from. Monorepo or multi-root scenarios are not supported.\n- **macOS/Linux only.** Untested on Windows. The terminal UI may not render correctly in all Windows terminals.\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/amuedespacher/agent-git.git\ncd agent-git\nnpm install\nnpm run dev        # run from source with tsx\nnpm test           # run the test suite\nnpm run build      # compile TypeScript to dist/\n```\n","readmeFilename":"README.md"}