@riflo/ryte 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,22 +10,24 @@
10
10
 
11
11
  ---
12
12
 
13
- ## Introduction
13
+ ![RYTE Demo](demo.gif)
14
14
 
15
- Writing meaningful commit messages and well-structured Pull Requests is critical for team collaboration, but it’s often a friction point in a fast-paced development cycle.
15
+ Writing meaningful commit messages shouldn't feel like extra work. But in fast-paced teams, it often does.
16
16
 
17
- **ryte** is your CLI companion that **bridges** the gap between "coding" and "documenting". It reads your git diffs, understands the context of your changes, and generates professional, semantic-compliant messages in seconds.
17
+ **RYTE** is your AI-powered CLI companion that **bridges** the gap between "coding" and "documenting". It reads your git diffs, understands the context of your changes, and generates professional, semantic-compliant messages in seconds.
18
18
 
19
19
  ### Core Value
20
- - **Zero Friction**: Stay in the terminal. No Web UI, no heavy extensions.
21
- - **Semantic by Default**: Automatically follows [Conventional Commits](https://www.conventionalcommits.org/).
22
- - **Intelligent Context**: Infers motivation from diffs and branch names.
23
- - **Interactive Control**: You are always in charge with an `Accept/Edit/Regenerate` workflow.
20
+ - **Stay in Flow**: No context switching. Pure terminal workflow.
21
+ - **Structured by Default**: Clean Conventional Commits automatically.
22
+ - **Context-Aware**: Understands diffs and branch intent.
23
+ - **Human-in-the-Loop**: Accept, edit, or regenerate your call.
24
24
 
25
25
  ---
26
26
 
27
27
  ## ⚡ Quick Start
28
28
 
29
+ > ⚡ **TL;DR**: `git add .` → `ryte c` → **done.**
30
+
29
31
  ```bash
30
32
  # 1. Install globally
31
33
  npm install -g @riflo/ryte
@@ -77,6 +79,18 @@ One command. Same diff. Clean history.
77
79
 
78
80
  ---
79
81
 
82
+ ## 🧑‍💻 Built for Developers Who Care
83
+
84
+ If your git history looks like:
85
+ - `fix`
86
+ - `update`
87
+ - `asdf`
88
+ - `final-final-real`
89
+
90
+ **RYTE is for you.**
91
+
92
+ ---
93
+
80
94
  ## Installation
81
95
 
82
96
  ### Via NPM (Recommended)
@@ -143,6 +157,8 @@ Introduces a complete JWT-based authentication system, including login, registra
143
157
  3. **Generation**: Crafts a semantic message (feat, fix, chore, etc.) based on the actual logic changes.
144
158
  4. **Interaction**: Presents a TUI (Terminal UI) for you to review and finalize the entry.
145
159
 
160
+ The result? **AI assistance without surrendering control.**
161
+
146
162
  ---
147
163
 
148
164
  ## Why Not Just Use GitHub Copilot?
@@ -154,6 +170,7 @@ Fair question. Here's an honest comparison:
154
170
  | Works natively in terminal | ❌ | ✅ |
155
171
  | Diff-aware (reads what you actually changed) | ❌ | ✅ |
156
172
  | Enforces Conventional Commits format | ❌ | ✅ |
173
+ | Works with any editor | ❌ | ✅ |
157
174
  | No IDE required | ❌ | ✅ |
158
175
  | Free tier available | ❌ | ✅ (via Groq) |
159
176
  | BYOK (Bring Your Own Key) | ❌ | ✅ |
@@ -183,7 +200,7 @@ We understand that sending code to an external API is a sensitive decision. Here
183
200
 
184
201
  ## Configuration
185
202
 
186
- **ryte** requires an API key to function. We support high-performance LLM providers like Groq and OpenAI.
203
+ **RYTE** requires an API key to function. We support high-performance LLM providers like Groq and OpenAI.
187
204
 
188
205
  ### Groq (Recommended - Free & Instant)
189
206
  Get your free key at [console.groq.com](https://console.groq.com/keys).
@@ -210,14 +227,26 @@ export OPENAI_API_KEY="sk-..."
210
227
 
211
228
  We believe that **every commit should be written right**. A clean git history is not just about aesthetics; it's about debuggability, revertability, and understanding the "why" behind the code months after it was written.
212
229
 
230
+ *Your future self will thank you.*
231
+
232
+ ---
233
+
234
+ ## ⭐ Why Developers Love It
235
+
236
+ - **No more “wip” commits**: No more generic, lazy history.
237
+ - **Cleaner PR reviews**: Reviewers understand the *why* instantly.
238
+ - **Better team collaboration**: Professional communication by default.
239
+ - **Future-proof project history**: Debug and revert with confidence.
240
+
213
241
  ---
214
242
 
215
243
  ## Roadmap
216
244
 
217
- - [ ] **Context-Aware Radius**: Analyze importing files to suggest impact warnings.
218
- - [ ] **JIRA / Linear / GitHub Issues**: Automatic ticket status sync.
219
- - [ ] **Custom Rulesets**: Define your own commit linting rules for the AI.
245
+ - [ ] **GitHub Action**: Automate commit linting and PR generation in CI/CD.
246
+ - [ ] **Custom Rulesets**: Define your own organization-specific commit styles.
247
+ - [ ] **Ticket Integration**: Automatic JIRA / Linear / GitHub Issues syncing.
220
248
  - [ ] **Local LLM Support**: Support for Ollama/Llama.cpp for offline-only environments.
249
+ - [ ] **Context-Aware Radius**: Analyze importing files to suggest impact warnings.
221
250
 
222
251
  ---
223
252
 
@@ -241,6 +270,9 @@ A: No. It only sends the `git diff` of your staged changes. It automatically ign
241
270
  **Q: Is it free?**
242
271
  A: The tool itself is free. If you use Groq, the API usage is currently free. If you use OpenAI, you pay for what you use (extremely cheap, ~$0.01 for dozens of commits).
243
272
 
273
+ **Q: Can I use this in a private company repository?**
274
+ A: **Yes.** RYTE only sends the staged diff to your configured AI provider using your own API key (BYOK). No code or credentials are ever stored by RYTE itself.
275
+
244
276
  ---
245
277
 
246
278
  Developed with ❤️ by **Riflo**
package/demo.gif ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riflo/ryte",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "AI Git Workflow Assistant - Generate semantic commits and PRs",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/ai.js CHANGED
@@ -44,9 +44,13 @@ export async function generateAIResponse(messages) {
44
44
  if (response.status === 429) {
45
45
  // Rate limited — parse retry-after header or use exponential backoff
46
46
  const retryAfter = parseInt(response.headers.get("retry-after") || "15", 10);
47
- const waitMs = (retryAfter + 1) * 1000;
48
- console.warn(`\x1b[33m⚠ Rate limit hit. Waiting ${retryAfter + 1}s before retry (${attempt}/${MAX_RETRIES})...\x1b[0m`);
49
- await new Promise(r => setTimeout(r, waitMs));
47
+ const waitSeconds = retryAfter + 1;
48
+
49
+ for (let i = waitSeconds; i > 0; i--) {
50
+ process.stdout.write(`\r\x1b[33m⚠ Rate limit hit. Waiting ${i}s before retry (${attempt}/${MAX_RETRIES})...\x1b[0m`);
51
+ await new Promise(r => setTimeout(r, 1000));
52
+ }
53
+ process.stdout.write("\r" + " ".repeat(80) + "\r"); // Clear the line
50
54
  continue;
51
55
  }
52
56
 
package/src/index.js CHANGED
@@ -22,8 +22,11 @@ function editInteractively(initialText) {
22
22
  const tmpFile = path.join(os.tmpdir(), `ryte_edit_${Date.now()}.txt`);
23
23
  fs.writeFileSync(tmpFile, initialText, "utf-8");
24
24
 
25
- const editor = process.env.EDITOR || "vim";
26
- console.log(`\nOpening in ${editor}... Close the editor to save.`);
25
+ const defaultEditor = process.platform === "win32" ? "notepad" : "vim";
26
+ const editor = process.env.EDITOR || defaultEditor;
27
+
28
+ console.log(`\n\x1b[33m💡 Tip: Don't forget to SAVE (Ctrl+S) before closing the editor!\x1b[0m`);
29
+ console.log(`Opening in ${editor}... Close the editor to save.`);
27
30
  try {
28
31
  execSync(`${editor} ${tmpFile}`, { stdio: "inherit" });
29
32
  const result = fs.readFileSync(tmpFile, "utf-8").trim();
@@ -136,7 +139,7 @@ async function main() {
136
139
  \x1b[1;38;5;39m╚═╝ ╚═╝\x1b[1;38;5;63m ╚═╝ \x1b[1;38;5;129m ╚═╝ \x1b[1;38;5;161m╚══════╝\x1b[0m
137
140
 
138
141
  \x1b[90mAI-Powered Git Workflow Assistant\x1b[0m
139
- \x1b[90mv1.0.4 | by Riflo\x1b[0m
142
+ \x1b[90mv1.1.2 | by Riflo\x1b[0m
140
143
 
141
144
  \x1b[33mCOMMANDS:\x1b[0m
142
145
  \x1b[32mryte c\x1b[0m Generate semantic commit from diff