{"_id":"@booi-gg/augit","_rev":"2-fdf05bbb2292efa917d47cce5785cae6","name":"@booi-gg/augit","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@booi-gg/augit","version":"0.1.1","keywords":["commit","conventional-commits","git","openai","claude","deepseek"],"author":{"name":"Booi","email":"booimangang@gmail.com"},"license":"MIT","_id":"@booi-gg/augit@0.1.1","maintainers":[{"name":"booi-gg","email":"booimangang@gmail.com"}],"homepage":"https://github.com/booi-gg/augit#readme","bugs":{"url":"https://github.com/booi-gg/augit/issues"},"bin":{"augit":"bin/cli.mjs"},"dist":{"shasum":"c26b0e26b0cb00dc65f492fedbbb426b86f5eddd","tarball":"https://registry.npmjs.org/@booi-gg/augit/-/augit-0.1.1.tgz","fileCount":25,"integrity":"sha512-V84y6L+FLCZm0NLPRAC+DZZInmPpwcyHPXzsZAAlaYmQ46rNaohnGJJYSD9Yy2kn8yyfUYWMT+zTfx/IAXCPqQ==","signatures":[{"sig":"MEUCIF8QycOADYqNtQn9Gd4CKo+EojS2ziqK7PiyiaAzdo6PAiEA8CzAfNmnA72HWtsRkuurtwTt7Dyfj0l5k5VYNGH4AME=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":173886},"type":"module","_from":"file:booi-gg-augit-0.1.1.tgz","engines":{"node":">=22.13"},"exports":{".":"./src/index.mjs"},"scripts":{"test":"node --test","check":"pnpm format:check && node --check bin/cli.mjs && node --check src/index.mjs && node --test","format":"prettier --write .","benchmark":"node benchmark/run.mjs","format:check":"prettier --check .","release:major":"pnpm version major && git push --follow-tags && pnpm publish","release:minor":"pnpm version minor && git push --follow-tags && pnpm publish","release:patch":"pnpm version patch && git push --follow-tags && pnpm publish","smoke:runtime":"node scripts/smoke-runtime.mjs","test:coverage":"node --test --experimental-test-coverage --test-coverage-lines=80 --test-coverage-branches=65 --test-coverage-functions=75"},"_npmUser":{"name":"booi-gg","email":"booimangang@gmail.com"},"_resolved":"/private/var/folders/30/64__tmk91b78k78q2jqfnbzm0000gn/T/615b4ddcbd5ae8c39e8d06171a8bf0cf/booi-gg-augit-0.1.1.tgz","_integrity":"sha512-V84y6L+FLCZm0NLPRAC+DZZInmPpwcyHPXzsZAAlaYmQ46rNaohnGJJYSD9Yy2kn8yyfUYWMT+zTfx/IAXCPqQ==","repository":{"url":"git+https://github.com/booi-gg/augit.git","type":"git"},"_npmVersion":"11.11.0","description":"Generate concise Git commit messages with your preferred agent API.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.9.6"},"_npmOperationalInternal":{"tmp":"tmp/augit_0.1.1_1785841512891_0.9911951132467531","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@booi-gg/augit","version":"0.1.2","description":"Generate concise Git commit messages with your preferred agent API.","keywords":["commit","conventional-commits","git","openai","claude","deepseek"],"license":"MIT","author":{"name":"Booi","email":"booimangang@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/booi-gg/augit.git"},"bugs":{"url":"https://github.com/booi-gg/augit/issues"},"homepage":"https://github.com/booi-gg/augit#readme","type":"module","sideEffects":false,"publishConfig":{"access":"public"},"bin":{"augit":"bin/cli.mjs"},"exports":{".":"./src/index.mjs"},"engines":{"node":">=22.13"},"devDependencies":{"prettier":"3.9.6"},"scripts":{"benchmark":"node benchmark/run.mjs","check":"pnpm format:check && node --check bin/cli.mjs && node --check src/index.mjs && node --test","format":"prettier --write .","format:check":"prettier --check .","release:patch":"pnpm version patch && git push --follow-tags && pnpm publish","release:minor":"pnpm version minor && git push --follow-tags && pnpm publish","release:major":"pnpm version major && git push --follow-tags && pnpm publish","smoke:runtime":"node scripts/smoke-runtime.mjs","test":"node --test","test:coverage":"node --test --experimental-test-coverage --test-coverage-lines=80 --test-coverage-branches=65 --test-coverage-functions=75"},"_id":"@booi-gg/augit@0.1.2","_integrity":"sha512-FVspRxNijfM1dF+QwSurRZdcXTWz1Ox1BMU1BvK4VKpTmW/v3Bf5Yc2mTiUV+/VRD/e5kJ8LiewRZRzcnX82aQ==","_resolved":"/private/var/folders/30/64__tmk91b78k78q2jqfnbzm0000gn/T/6ebb9fe6ffad54fced57a856b7b2ccd4/booi-gg-augit-0.1.2.tgz","_from":"file:booi-gg-augit-0.1.2.tgz","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-FVspRxNijfM1dF+QwSurRZdcXTWz1Ox1BMU1BvK4VKpTmW/v3Bf5Yc2mTiUV+/VRD/e5kJ8LiewRZRzcnX82aQ==","shasum":"6445c23641dd6b2ae40db07060ae14cfab2c4b97","tarball":"https://registry.npmjs.org/@booi-gg/augit/-/augit-0.1.2.tgz","fileCount":25,"unpackedSize":177190,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCnHWCpd6lXjvwrPtbkl0GJ5G+1LqSHlUAnvw7WQ5XbIwIgAZ9n7ztUWEf6NsNMXuwY6OfoG5ClEtWNsrd/EXpzMWc="}]},"_npmUser":{"name":"booi-gg","email":"booimangang@gmail.com"},"directories":{},"maintainers":[{"name":"booi-gg","email":"booimangang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/augit_0.1.2_1786428079332_0.5962734614860343"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-04T11:05:12.757Z","modified":"2026-08-11T06:01:19.791Z","0.1.1":"2026-08-04T11:05:13.092Z","0.1.2":"2026-08-11T06:01:19.499Z"},"bugs":{"url":"https://github.com/booi-gg/augit/issues"},"author":{"name":"Booi","email":"booimangang@gmail.com"},"license":"MIT","homepage":"https://github.com/booi-gg/augit#readme","keywords":["commit","conventional-commits","git","openai","claude","deepseek"],"repository":{"type":"git","url":"git+https://github.com/booi-gg/augit.git"},"description":"Generate concise Git commit messages with your preferred agent API.","maintainers":[{"name":"booi-gg","email":"booimangang@gmail.com"}],"readme":"# augit\n\nGenerate a Conventional Commit message from staged changes using an agent API.\n\nAugit reads only the Git index, redacts common credentials, bounds the prompt,\nasks the configured provider for structured JSON, validates the result, and\nlets you commit, generate another message, or cancel.\n\nSupported providers:\n\n- OpenAI\n- Codex models through the OpenAI API\n- Claude through the Anthropic API\n- DeepSeek\n\n## Requirements\n\n- Node.js 22.13 or newer\n- Git\n- An API key with access to the selected provider\n\n## Install\n\n```sh\nnpm install --global @booi-dev/augit\n```\n\nOr run the repository checkout directly:\n\n```sh\npnpm install\nnode bin/cli.mjs --help\n```\n\n## Configure an agent\n\nSet the provider explicitly, then save the key. Referencing an existing shell\nvariable keeps the secret itself out of the command saved in shell history.\n\n```sh\n# OpenAI\naugit config set AGENT_PROVIDER openai\naugit config set AGENT_API_KEY \"$OPENAI_API_KEY\"\n\n# Codex (uses an OpenAI API key)\naugit config set AGENT_PROVIDER codex\naugit config set AGENT_API_KEY \"$OPENAI_API_KEY\"\n\n# Claude\naugit config set AGENT_PROVIDER claude\naugit config set AGENT_API_KEY \"$ANTHROPIC_API_KEY\"\n\n# DeepSeek\naugit config set AGENT_PROVIDER deepseek\naugit config set AGENT_API_KEY \"$DEEPSEEK_API_KEY\"\n```\n\n`AGENT_PROVIDER=auto` detects `sk-ant-...` Claude keys and modern OpenAI\nproject/service keys. A plain `sk-...` key can belong to either OpenAI or\nDeepSeek, so Augit refuses to guess and asks for an explicit provider. This\nprevents sending a credential to the wrong company.\n\nEnvironment variables override the saved config, which is useful in CI:\n\n```sh\nAGENT_PROVIDER=deepseek AGENT_API_KEY=\"$DEEPSEEK_API_KEY\" augit commit --yes\n```\n\nAugit currently selects these cost-conscious defaults:\n\n| Provider   | Default model       |\n| ---------- | ------------------- |\n| `openai`   | `gpt-5-mini`        |\n| `codex`    | `gpt-5.3-codex`     |\n| `claude`   | `claude-haiku-4-5`  |\n| `deepseek` | `deepseek-v4-flash` |\n\nPersist a different model for the selected provider with:\n\n```sh\naugit config set AGENT_MODEL gpt-5.3-codex\n```\n\nSet `AGENT_MODEL` to an empty string to return to the provider default. The\n`AGENT_MODEL` environment variable overrides saved config for one-off runs and\nCI. Provider model access and API charges still apply.\n\nLarge multi-file changes can use several API requests: Augit may summarize\nindividual files before asking for the final commit message, and invalid or\ntruncated responses are retried.\n\n## Usage\n\nStage the intended change, then ask Augit to draft and review the commit:\n\n```sh\ngit add src/index.js test/index.test.js\naugit commit\n```\n\nUseful forms:\n\n```sh\n# Stage all changes first\naugit commit --all\n\n# Accept the first generated message (for scripts and CI)\naugit commit --yes\n\n# Pass options through to git commit\naugit commit -- --no-verify\naugit commit --all --yes -- --signoff\n```\n\nThe interactive review offers **Commit**, **Generate again**, and **Cancel**.\nRegeneration reuses the same API runtime and asks for a proposal different from\nthe last three results.\n\n### Caveman style\n\nMessages are written in caveman style by default: articles, filler and hedging\nare dropped, replacements are written as `<old> -> <new>`, and a body line is a\nfragment rather than a sentence.\n\n```\nfix(auth): expiry check use < not <=\n\n- retry cap 3 -> 5\n- drop unused `parseJwt` import\n```\n\nCompression stops where guessing would cost the reader. Identifiers, paths,\nflags, versions and error strings are copied out of the diff exactly, never\nabbreviated, and a `BREAKING CHANGE:` note, security fix, data migration or\nrevert keeps its plain full wording.\n\nTurn it off for plain English with `augit config set caveman false`.\n\n### Remove a model downloaded by an earlier version\n\nAugi no longer downloads or runs a local model. After upgrading from an older\nversion, reclaim the model's disk space with:\n\n```sh\naugi --clear-model\n```\n\nThe command also removes an interrupted download and its verification metadata.\nIt respects `AUGI_CACHE_DIR` when the former cache location was overridden.\n\n## Configuration\n\n| Key                  | Default     | Effect                                                                             |\n| -------------------- | ----------- | ---------------------------------------------------------------------------------- |\n| `AGENT_API_KEY`      | `<not set>` | Provider credential. CLI output always shows `<redacted>` once configured          |\n| `AGENT_MODEL`        | empty       | Model ID; an empty value selects the provider's default                            |\n| `AGENT_PROVIDER`     | `auto`      | `auto`, `openai`, `codex`, `claude`, or `deepseek`                                 |\n| `auto-stage-all`     | `false`     | Skip the staging prompt and stage all changes automatically                        |\n| `caveman`            | `true`      | Write the subject and body in caveman style; set `false` for plain English         |\n| `show-scope`         | `true`      | Include a scope such as `fix(cli): ...`; set `false` for a bare `fix: ...` subject |\n| `show-usage-summary` | `false`     | Print provider, model, token counts, and wall time after generation                |\n\nManage the file with:\n\n```sh\n# Show all current values plus an update command for each setting\naugit config\n\n# Compact values-only output or one specific value\naugit config list\naugit config get AGENT_PROVIDER\n\n# Update each available setting\naugit config set AGENT_API_KEY \"$OPENAI_API_KEY\"\naugit config set AGENT_PROVIDER openai\naugit config set AGENT_MODEL gpt-5.3-codex\naugit config set auto-stage-all true\naugit config set caveman false\naugit config set show-scope false\naugit config set show-usage-summary true\n```\n\nBare `augit config` shows all current settings and the update examples above.\nThe API key remains redacted in this view. `config list`, `config get\nAGENT_API_KEY`, and `config set AGENT_API_KEY ...` also never print the\ncredential. The config file is written with owner-only (`0600`) permissions on\nUnix-like systems and lives at:\n\n- macOS: `~/Library/Preferences/augit/config.json`\n- Linux: `${XDG_CONFIG_HOME:-~/.config}/augit/config.json`\n- Windows: `%APPDATA%\\augit\\config.json`\n\nSet `AUGIT_CONFIG_DIR` to override the directory.\n\n### Setup errors\n\nAugit prints provider errors to stderr with the provider name, HTTP status when\navailable, and a **How to fix** section. The suggested action depends on the\nfailure:\n\n- missing or rejected key: confirm the provider and save a fresh provider key;\n- ambiguous or unsupported provider: set `AGENT_PROVIDER` explicitly;\n- missing, unavailable, or unauthorized model: set an available model or reset\n  `AGENT_MODEL` to the provider default;\n- quota or rate limit: check provider billing and limits before retrying; and\n- network or provider server failure: check connectivity/status and retry.\n\nProvider error text is sanitized before printing, and the configured API key is\nnever included. Remember that `AGENT_API_KEY`, `AGENT_PROVIDER`, and\n`AGENT_MODEL` environment variables override the values shown by `augit config`.\n\n## What leaves the machine\n\nMoving to an API means the sanitized prompt is sent to the selected provider.\nIt can contain repository name, staged paths, recent commit style, and bounded\nstaged diff text. Augit applies the controls below before making the request:\n\n- Only staged changes are read.\n- Git runs without a shell or external diff driver.\n- Binary payloads are excluded.\n- Diffs are capped at 24 KiB by default.\n- Complete prompts are capped at 20 KiB.\n- Common keys, tokens, passwords, private keys, and credential URLs are\n  redacted.\n- Repository content is marked as untrusted prompt data.\n- Responses must satisfy the Conventional Commit contract and are retried when\n  invalid or truncated.\n\nThese controls reduce accidental exposure; they are not a general-purpose\nsecret scanner. Review your provider's data policy before sending sensitive\nsource code.\n\n## Library\n\nThe default runtime reads `AGENT_API_KEY`, `AGENT_PROVIDER`, and `AGENT_MODEL`\nfrom saved config, with environment variables taking precedence:\n\n```js\nimport { generateCommit, generateCommitMessage } from \"@booi-dev/augit\";\n\nconst message = await generateCommitMessage({ cwd: \"/path/to/repository\" });\nconst result = await generateCommit({ cwd: \"/path/to/repository\" });\n\nconsole.log(message, result.subject, result.body, result.input, result.usage);\n```\n\nAn integration can create and reuse a configured runtime:\n\n```js\nimport { createAgentRuntime, generateCommit } from \"@booi-dev/augit\";\n\nconst runtime = createAgentRuntime({\n  apiKey: process.env.MY_AGENT_KEY,\n  provider: \"claude\",\n});\n\ntry {\n  const result = await generateCommit({ runtime });\n  console.log(result.message);\n} finally {\n  await runtime.dispose();\n}\n```\n\nCallers may also inject a runtime implementing:\n\n```js\n{\n  async generate({ prompt, schema, signal }) {\n    return { subject: \"feat: example\", body: \"\" };\n  }\n}\n```\n\n## Development\n\n```sh\npnpm install\npnpm check\npnpm test:coverage\nnpm pack --dry-run\n```\n\nThe unit suite mocks every provider and never makes a paid API request.\n\nThe benchmark uses the configured provider and therefore makes billable API\ncalls:\n\n```sh\npnpm benchmark\npnpm benchmark -- --provider claude --model claude-haiku-4-5 --json\n```\n\nSee [the architecture](docs/ARCHITECTURE.md) and\n[benchmark methodology](docs/BENCHMARKS.md).\n","readmeFilename":"README.md"}