Skip to content

Rifuroo/ryte

Repository files navigation

RYTE

Write it right. AI-powered Git workflow CLI for developers who care about clean history and velocity.

Turn messy git logs into structured, semantic history — instantly.

npm version License: MIT Node Version


RYTE Demo

Writing meaningful commit messages shouldn't feel like extra work. But in fast-paced teams, it often does.

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.

Core Value

  • Stay in Flow: No context switching. Pure terminal workflow.
  • Structured by Default: Clean Conventional Commits automatically.
  • Context-Aware: Understands diffs and branch intent.
  • Human-in-the-Loop: Accept, edit, or regenerate — your call.

⚡ Quick Start

Zero-Config: RYTE will guide you through the setup on your first run. No manual .env file needed.

# 1. Install globally
npm install -g @riflo/ryte

# 2. Stage your changes
git add .

# 3. Just run and go
ryte c

RYTE will ask for your AI provider and API key once, then save it securely for all future sessions.

Interactive Setup Example:

Select your LLM Provider:
1) OpenAI
2) Groq
3) OpenRouter
4) Local

Choose [1-4]: 2
Paste your GROQ API Key: gsk_****************************

✔ Configuration saved to ~/.ryte/config.json

The Problem It Solves

Your git log shouldn't look like this:

❌  update auth
❌  fix bug
❌  changes
❌  wip

With ryte c, it looks like this:

✅  feat(auth): implement JWT refresh token rotation
✅  fix(cart): resolve crash on empty product array
✅  refactor(db): extract query builder to repository layer
✅  chore: update dependencies to remove security vulnerabilities

See the Magic

What RYTE sees (git diff --staged):

+ const refreshToken = generateToken(user.id)
+ await saveTokenToDB(refreshToken)
+ return res.cookie('refresh_token', refreshToken, { httpOnly: true })

What RYTE writes:

feat(auth): implement JWT refresh token rotation via HTTP-only cookies

One command. Same diff. Clean history.


🧑‍💻 Built for Developers Who Care

If your git history looks like:

  • fix
  • update
  • asdf
  • final-final-real

RYTE is for you.


Installation

Via NPM (Recommended)

npm install -g @riflo/ryte

Via PNPM / Yarn

pnpm add -g @riflo/ryte
# or
yarn global add @riflo/ryte

Usage

1. Generate Semantic Commit

Stage your files first, then let AI write the message.

git add .
ryte c

Interactive Workflow:

  • [A]ccept: Applies the commit immediately.
  • [E]dit: Opens your default editor (Vim/Notepad/Nano) to refine the message.
  • [R]egenerate: Ask AI for another suggestion.
  • [C]ancel: Abort the process.

2. Generate PR Draft

Summarize your entire branch history into a clean Markdown description.

ryte pr

Example Output:

# 🔥 Feat: User Authentication Flow

## 📋 Summary
Introduces a complete JWT-based authentication system, including login, registration, and automatic token refresh via HTTP-only cookies.

## 🚀 Key Changes
- Implement `AuthMiddleware` for route protection
- Add `RefreshTokenRepository` for token rotation
- Create `LoginScreen` and `RegisterScreen` UI components

## ⚠️ Important Notes/Impact
- **Requires DB Migration**: Run `php artisan migrate` for the new `personal_access_tokens` table.
- **Dependency Added**: Added `firebase/php-jwt` package.

## 🔍 Reviewer Checklist
- [ ] Logic health & edge cases
- [ ] Performance considerations
- [ ] Code style & standard conformity

How It Works

  1. Extraction: Runs git diff --staged to capture your latest changes.
  2. Analysis: Filters out lockfiles and noise, then sends the core diff to high-performance AI models (Groq Llama 3 or OpenAI GPT-4o-mini).
  3. Generation: Crafts a semantic message (feat, fix, chore, etc.) based on the actual logic changes.
  4. Interaction: Presents a TUI (Terminal UI) for you to review and finalize the entry.

The result? AI assistance without surrendering control.


Why Not Just Use GitHub Copilot?

Fair question. Here's an honest comparison:

Feature GitHub Copilot RYTE
Works natively in terminal
Diff-aware (reads what you actually changed)
Enforces Conventional Commits format
Works with any editor
No IDE required
Free tier available ✅ (via Groq)
BYOK (Bring Your Own Key)

Copilot helps you write code.
RYTE helps your future self understand it.


🔒 Security & Privacy

We understand that sending code to an external API is a sensitive decision. Here's exactly what RYTE does and does not do:

What we send What we do NOT send
git diff --staged output only Full file contents
Truncated to max ~16k chars Binary files
Nothing from untracked files .env or secret files
  • ✅ No data is stored or logged by RYTE itself.
  • ✅ Lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock) are auto-excluded.
  • ✅ Minified files (*.min.js, *.min.css) are auto-excluded.
  • ✅ You can use your own API key (BYOK) for complete control over data flow.
  • ✅ Supports local AI models via Ollama (on roadmap).

Configuration

RYTE requires an API key to function. We support high-performance LLM providers like Groq and OpenAI.

Groq (Recommended - Free & Instant)

Get your free key at console.groq.com.

# Windows
$env:GROQ_API_KEY="gsk_..."

# Linux / Mac / Git Bash
export GROQ_API_KEY="gsk_..."

OpenAI

Get your key at platform.openai.com.

export OPENAI_API_KEY="sk-..."

Tip

Add these to your system environment variables to avoid setting them in every new session.


Philosophy

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.

Your future self will thank you.


⭐ Why Developers Love It

  • No more “wip” commits: No more generic, lazy history.
  • Cleaner PR reviews: Reviewers understand the why instantly.
  • Better team collaboration: Professional communication by default.
  • Future-proof project history: Debug and revert with confidence.

Roadmap

  • GitHub Action: Automate commit linting and PR generation in CI/CD.
  • Custom Rulesets: Define your own organization-specific commit styles.
  • Ticket Integration: Automatic JIRA / Linear / GitHub Issues syncing.
  • Local LLM Support: Support for Ollama/Llama.cpp for offline-only environments.
  • Context-Aware Radius: Analyze importing files to suggest impact warnings.

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please see our Contributing Guide for details on our code of conduct and the process for submitting pull requests.


License

Distributed under the MIT License. See LICENSE for more information.


FAQ

Q: Does it send my whole code to the AI?
A: No. It only sends the git diff of your staged changes. It automatically ignores binary files and common lockfiles.

Q: Is it free?
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).

Q: Can I use this in a private company repository?
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.


Developed with ❤️ by Riflo

About

Write it right. AI-powered Git workflow CLI that generates semantic commits and PR drafts in seconds. Native terminal experience with no IDE required

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors