galaxyrepowatch 1.0.13 → 1.0.15

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.
Files changed (3) hide show
  1. package/README.md +280 -18
  2. package/dist/cli.js +72 -72
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,25 +1,287 @@
1
- # 🛡️ Galaxy Repo Watch — AI Guard
1
+ # 🛡️ Galaxy Repo Watch — AI Git Review Guard
2
2
 
3
- Enterprise-grade AI Git Review Guard powered by Gemini.
3
+ Enterprise-grade AI-powered Git Review Guard powered by **Google Gemini**.
4
4
 
5
- ⚠️ **DO NOT RUN `npm install`** ⚠️
6
- This package is an automated installer. To set up AI Guard in your project, simply run the init command:
5
+ ![npm](https://img.shields.io/npm/v/galaxyrepowatch)
6
+ ![Downloads](https://img.shields.io/npm/dw/galaxyrepowatch)
7
+ ![License](https://img.shields.io/npm/l/galaxyrepowatch)
8
+
9
+ ---
10
+
11
+ # 🚀 Quick Start
12
+
13
+ > **⚠️ Do NOT install this package using `npm install`.**
14
+
15
+ Galaxy Repo Watch is an automated project initializer.
16
+
17
+ Simply run:
18
+
19
+ ```bash
20
+ npx galaxyrepowatch init
21
+ ```
22
+
23
+ The setup wizard will configure everything automatically.
24
+
25
+ ---
26
+
27
+ # ✨ Features
28
+
29
+ - 🤖 AI-powered code review using Google Gemini
30
+ - 🔒 Detects hardcoded secrets and credentials
31
+ - 🚫 Blocks risky commits before they reach your repository
32
+ - ⚡ Automatic Husky Git Hook installation
33
+ - ⚙️ Easy one-time setup
34
+ - 📝 Reviews only staged files for faster execution
35
+ - 🎯 Works with any Git repository
36
+
37
+ ---
38
+
39
+ # 📦 What Happens During Setup
40
+
41
+ Running:
7
42
 
8
43
  ```bash
9
44
  npx galaxyrepowatch init
10
45
  ```
11
46
 
12
- ## What this does:
13
- Running the command above will automatically:
14
- 1. Install the required dependencies.
15
- 2. Initialize Husky in your project.
16
- 3. Configure a `pre-commit` hook to automatically review your code before every commit.
17
- 4. Ask for your Gemini API key (only once) and save it locally.
18
- 5. Create a `.repowatchrc` configuration file for custom rules.
19
-
20
- ## How it works:
21
- Every time you run `git commit`, the AI Guard will:
22
- - Check your code for critical syntax errors.
23
- - Scan for hardcoded secrets and passwords.
24
- - Run a Gemini 2.5 Flash AI code review on your staged changes.
25
- - Block the commit if the code exceeds the risk threshold (75/100).
47
+ will automatically:
48
+
49
+ - Install required dependencies
50
+ - Initialize Husky
51
+ - Configure a Git `pre-commit` hook
52
+ - Ask for your Gemini API Key (only once)
53
+ - Store your API Key securely on your local machine
54
+ - ✅ Generate a `.repowatchrc` configuration file
55
+
56
+ No manual configuration is required.
57
+
58
+ ---
59
+
60
+ # ⚙️ How It Works
61
+
62
+ Whenever you run:
63
+
64
+ ```bash
65
+ git commit
66
+ ```
67
+
68
+ Galaxy Repo Watch automatically reviews your staged changes before the commit is created.
69
+
70
+ The AI performs the following checks:
71
+
72
+ ### 🔍 AI Code Review
73
+
74
+ - Detects syntax issues
75
+ - Identifies potential bugs
76
+ - Reviews code quality
77
+ - Suggests improvements
78
+ - Highlights risky code changes
79
+
80
+ ---
81
+
82
+ ### 🔒 Security Scan
83
+
84
+ Scans your staged files for:
85
+
86
+ - API Keys
87
+ - Passwords
88
+ - Access Tokens
89
+ - JWT Secrets
90
+ - Private Keys
91
+ - Hardcoded Credentials
92
+
93
+ ---
94
+
95
+ ### 🚫 Smart Commit Protection
96
+
97
+ If the AI determines that your changes are too risky (default threshold: **75/100**), the commit will be blocked.
98
+
99
+ Example:
100
+
101
+ ```
102
+ ❌ Commit Blocked
103
+
104
+ Risk Score : 86/100
105
+
106
+ Reasons:
107
+
108
+ • Hardcoded API key detected
109
+ • Potential SQL Injection
110
+ • Critical syntax issue
111
+
112
+ Please fix the issues before committing.
113
+ ```
114
+
115
+ ---
116
+
117
+ # 📁 Configuration
118
+
119
+ Galaxy Repo Watch creates a configuration file named:
120
+
121
+ ```
122
+ .repowatchrc
123
+ ```
124
+
125
+ Example:
126
+
127
+ ```json
128
+ {
129
+ "provider": "gemini",
130
+ "model": "gemini-2.5-flash",
131
+ "riskThreshold": 75,
132
+ "blockCommit": true
133
+ }
134
+ ```
135
+
136
+ ---
137
+
138
+ # 🔑 Gemini API Key
139
+
140
+ During setup, you'll be prompted once for your Gemini API key.
141
+
142
+ ```
143
+ Enter your Gemini API Key:
144
+ ```
145
+
146
+ Your API key is stored locally and is never committed to your Git repository.
147
+
148
+ ---
149
+
150
+ # 🔄 Workflow
151
+
152
+ ```
153
+ Developer
154
+
155
+
156
+
157
+
158
+ git add .
159
+
160
+
161
+
162
+
163
+ git commit
164
+
165
+
166
+
167
+
168
+ Galaxy Repo Watch
169
+
170
+
171
+
172
+
173
+ Security Scan
174
+
175
+
176
+
177
+
178
+ AI Code Review
179
+
180
+
181
+
182
+
183
+ ───────────────
184
+
185
+ Low Risk
186
+
187
+
188
+
189
+ ✅ Commit Allowed
190
+
191
+ ───────────────
192
+
193
+ High Risk
194
+
195
+
196
+
197
+ ❌ Commit Blocked
198
+ ```
199
+
200
+ ---
201
+
202
+ # 💻 Example Output
203
+
204
+ ```
205
+ 🛡 Galaxy Repo Watch
206
+
207
+ Analyzing staged files...
208
+
209
+ ✔ Security Scan Passed
210
+
211
+ ✔ AI Code Review Completed
212
+
213
+ Risk Score : 22/100
214
+
215
+ ✅ Commit Approved
216
+ ```
217
+
218
+ ---
219
+
220
+ # 📋 Requirements
221
+
222
+ - Node.js 18+
223
+ - Git
224
+ - Gemini API Key
225
+ - Internet connection
226
+
227
+ ---
228
+
229
+ # 🔒 Privacy
230
+
231
+ Galaxy Repo Watch only analyzes your staged changes before a commit.
232
+
233
+ - Configuration remains on your local machine.
234
+ - API keys are never committed.
235
+ - Only staged code is sent to the configured AI provider for review.
236
+
237
+ ---
238
+
239
+ # 🛣 Roadmap
240
+
241
+ ### Current Release
242
+
243
+ - ✅ AI Code Review
244
+ - ✅ Secret Detection
245
+ - ✅ Husky Integration
246
+ - ✅ Commit Risk Scoring
247
+ - ✅ Automatic Project Setup
248
+
249
+ ### Coming Soon
250
+
251
+ - ⏳ Commit Impact Analysis
252
+ - ⏳ Custom AI Rules
253
+ - ⏳ Multi-AI Provider Support
254
+ - ⏳ GitHub Actions Integration
255
+ - ⏳ Pull Request Review
256
+ - ⏳ VS Code Extension
257
+ - ⏳ Team Dashboard
258
+
259
+ ---
260
+
261
+ # 🤝 Contributing
262
+
263
+ Contributions are welcome!
264
+
265
+ 1. Fork the repository
266
+ 2. Create a feature branch
267
+ 3. Commit your changes
268
+ 4. Push your branch
269
+ 5. Open a Pull Request
270
+
271
+ ---
272
+
273
+ # 📄 License
274
+
275
+ MIT License
276
+
277
+ ---
278
+
279
+ # ⭐ Support
280
+
281
+ If Galaxy Repo Watch helps improve your development workflow, please consider giving the project a ⭐ on GitHub.
282
+
283
+ Your support motivates us to continue building powerful AI tools for developers.
284
+
285
+ ---
286
+
287
+ ## Made with ❤️ by Galaxy Weblinks