Writing vague commits like "fix bug" or "wip" is a bad habit when moving fast. I built Ryte CLI (published on NPM as @riflo/ryte) to read staged git diffs and draft clean Conventional Commits in seconds, right from the terminal.
The Problem: Broken Flow State
When you are in the zone and have changed 15 files, stopping to write a structured Conventional Commit breaks your focus. Existing tools required heavy plugins or complex setup. I wanted a lightweight, interactive CLI that runs instantly.
Architecture & Core Tech Stack
The CLI is built with lightweight JavaScript utilities focused on speed:
- Commander.js: Command-line interface framework for options parsing.
- Simple-Git: Executes native
git diff --stagedextraction safely. - Groq & OpenAI API: Fast inference with low latency for diff parsing.
- Interactive TUI: Terminal prompt interface allowing users to Accept, Edit, or Regenerate AI suggestions.
Security & Privacy Safeguards
Sending codebase information to an external API requires strict security guarantees. Ryte enforces automated sanitization before payload dispatch:
| Sent to AI Provider | Strictly Excluded |
|---|---|
Staged diff output only (git diff --staged) |
Full repository files or untracked code |
| Truncated context limits (~16k chars max) | Binary files & media assets |
| Logic changes only | Lockfiles (package-lock.json, pnpm-lock.yaml) |
| Bring Your Own Key (BYOK) model | Sensitive credential / .env files |