Skip to content

feat/ts rewrite#5

Merged
raghavpillai merged 5 commits into
mainfrom
feat/ts-rewrite
Nov 19, 2025
Merged

feat/ts rewrite#5
raghavpillai merged 5 commits into
mainfrom
feat/ts-rewrite

Conversation

@raghavpillai
Copy link
Copy Markdown
Owner

  • Migrate gen-commit from Python to TypeScript
  • Migrate project from Python to TypeScript/Bun
  • Simplify diff handling and improve LLM wrapper options
  • CI, package rename, publish config, README updates
  • Update CI to install namespaced package tarball

- Remove Python CLI and helpers (gencommit.py, utils/config.py, utils/llm_wrapper.py)
- Add Node/TypeScript CLI (src/cli.ts) implementing arg parsing, init, version, and commit flow
- Introduce TypeScript utils: config.ts (zod validation), llm-wrapper.ts (ai SDK adapters), prompts.ts
- Implement diff formatting, token estimation/truncation, retrying LLM calls, and safer git commit via spawnSync
- Add config initialization template and improved config error handling (ConfigError)
- Convert prompt templates to TS and wire LLM chat to generate structured commit messages
- Remove Python package entry import (src/__init__.py) to reflect migration
- Replace Python project configuration (pyproject, requirements, uv.lock) with Node/Bun setup (package.json, bun.lock)
- Introduce TypeScript build config (tsconfig.json) and Biome linter settings (biome.json)
- Add .npmignore and overhaul .gitignore for JS/TS, Bun, IDE, and OS files
- Add Bun lockfile and dependencies; remove many Python-specific files and scripts
- Convert and update src code: TypeScript CLI tweaks (token/truncation, debug timing, config defaults, git commit execution commented)
- Update LLM wrapper to new SDK factory APIs, set abort timeout and reasoningEffort
- Remove legacy Python tests and utility scripts; clean up build/upload shell scripts
- Remove custom diff formatting and return raw git diff text
- Support unstaged full-diff via '-a' flag (use git diff HEAD)
- Remove MAX_LINE_LENGTH config/env usage and related parsing
- Re-enable git commit execution error handling (spawnSync check)
- Add provider-specific reasoningEffort options for OpenAI/Anthropic/Google in LLM wrapper
- Update prompts and config schema to reflect removed MAX_LINE_LENGTH setting
- Add GitHub Actions CI workflow with test, security, and publish-test jobs
- Remove .npmignore to include files via package.json files field
- Rename package to @raghavp/gen-commit and bump version to 2.0.2
- Add publishConfig public access and adjust files list
- Update README installation instructions and model examples
- Remove Python install instructions and related config notes
- change npm global install pattern in CI from gen-commit-*.tgz to raghavp-gen-commit-*.tgz
- ensure CI tests install and run the correct packaged CLI tarball
@raghavpillai raghavpillai merged commit 1f61763 into main Nov 19, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant