nitor 1.6.0 → 1.7.0

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/docs/README.md DELETED
@@ -1,281 +0,0 @@
1
- # Nitor Documentation
2
-
3
- Complete documentation for the Nitor CLI tool.
4
-
5
- ## Table of Contents
6
-
7
- - [Getting Started](#getting-started)
8
- - [Command Reference](#command-reference)
9
- - [Setup Guides](#setup-guides)
10
-
11
- ## Getting Started
12
-
13
- Nitor is a command-line interface tool designed to streamline development workflows including building, deploying, branch management, code review, and more.
14
-
15
- ### Installation
16
-
17
- ```bash
18
- npm install -g nitor
19
- ```
20
-
21
- ### Quick Start
22
-
23
- ```bash
24
- # View all available commands
25
- nitor help
26
-
27
- # Setup autocomplete
28
- nitor completion
29
-
30
- # Get help for specific command
31
- nitor <command> -help
32
- ```
33
-
34
- ## Command Reference
35
-
36
- ### Build & Deploy Commands
37
-
38
- - **[build](./BUILD.md)** - Build specified components
39
- - **[deploy](./DEPLOY.md)** - Deploy built components
40
- - **[build-deploy](./BUILD_DEPLOY.md)** - Build and deploy in one command
41
-
42
- ### Git Workflow Commands
43
-
44
- - **[create-branch](./CREATE_BRANCH.md)** - Create standardized Git branches
45
- - **[merge](./MERGE.md)** - Safely merge branches
46
- - **[cleanup](./CLEANUP.md)** - Clean up local branches
47
-
48
- ### Code Quality Commands
49
-
50
- - **[review](./REVIEW.md)** - AI-powered code review for merge requests
51
- - **[refactor](./REFACTOR.md)** - AI-enhanced text refinement
52
-
53
- ### Database Commands
54
-
55
- - **[backup](./BACKUP.md)** - MongoDB database backups
56
-
57
- ### GitLab Insights
58
-
59
- - **[mr-status](./MR_STATUS.md)** - List GitLab repositories you contribute to and view merge requests as a branch tree
60
-
61
- ### Time Entry Commands
62
-
63
- - **[time-entry](./TIME_ENTRY.md)** - Complete time tracking and management guide
64
- - `time-init` - Initialize configuration
65
- - `time-switch` - Switch projects
66
- - `time-add` - Add time entries
67
- - `time-update` - Update entries
68
- - `time-delete` - Delete entries
69
- - `time-stats` - View daily status
70
- - `time-entries` - View entries by date
71
- - `time-zoho` - Sync to Zoho Sprints
72
- - `time-gitlab` - Get GitLab activities
73
- - `time-merge` - View MR status
74
-
75
- ## Setup Guides
76
-
77
- ### Autocomplete
78
-
79
- See [AUTOCOMPLETE.md](./AUTOCOMPLETE.md) for detailed autocomplete setup instructions.
80
-
81
- Quick setup:
82
-
83
- ```bash
84
- nitor completion
85
- source ~/.bashrc # or ~/.zshrc for zsh
86
- ```
87
-
88
- ## Command Categories
89
-
90
- ### Development Workflow
91
-
92
- ```bash
93
- # 1. Create a feature branch
94
- nitor create-branch -t 123 -ty feat -d "user-authentication" -p portal
95
-
96
- # 2. Build your changes
97
- nitor build -p portal -c client -i dev
98
-
99
- # 3. Deploy to dev environment
100
- nitor deploy -p portal -c client -i dev
101
-
102
- # 4. Or build and deploy together
103
- nitor build-deploy -p portal -c client -i dev
104
- ```
105
-
106
- ### Code Review Workflow
107
-
108
- ```bash
109
- # Review merge request with AI
110
- nitor review -r portalClient -mId 456
111
-
112
- # Refactor commit messages
113
- nitor refactor "fixed some bugs in login"
114
- ```
115
-
116
- ### Branch Management
117
-
118
- ```bash
119
- # Merge feature to development
120
- nitor merge -s feat/123-user-auth -ta development
121
-
122
- # Clean up old branches
123
- nitor cleanup
124
- ```
125
-
126
- ### Database Management
127
-
128
- ```bash
129
- # Backup production database
130
- nitor backup -p medicaPortal
131
- ```
132
-
133
- ## Common Use Cases
134
-
135
- ### Daily Development
136
-
137
- ```bash
138
- # Start new feature
139
- nitor create-branch -t 789 -ty feat -d "payment-integration"
140
-
141
- # Build and test
142
- nitor build -p gateway -c rest-api -i dev
143
-
144
- # Deploy when ready
145
- nitor deploy -p gateway -c rest-api -i dev
146
- ```
147
-
148
- ### Release Process
149
-
150
- ```bash
151
- # Build for QA
152
- nitor build-deploy -p portal -c client -i qa
153
-
154
- # Review changes
155
- nitor review -r portalClient -mId 123
156
-
157
- # Merge to master
158
- nitor merge -s development -ta master
159
-
160
- # Deploy to production
161
- nitor deploy -p portal -c client -i pilot
162
- ```
163
-
164
- ### Maintenance
165
-
166
- ```bash
167
- # Backup before major changes
168
- nitor backup -p configService
169
-
170
- # Clean up old branches
171
- nitor cleanup
172
- ```
173
-
174
- ### Time Tracking
175
-
176
- ```bash
177
- # Initialize time entry
178
- nitor time-init
179
-
180
- # Add time entry
181
- nitor time-add
182
-
183
- # Check daily status
184
- nitor time-stats
185
-
186
- # Sync to Zoho
187
- nitor time-zoho
188
- ```
189
-
190
- ## Supported Projects
191
-
192
- - **portal** - Portal application
193
- - **gateway** - Gateway service
194
- - **phr** - Personal Health Records
195
- - **configService** - Configuration service
196
- - **healthRecords** - Health records service
197
- - **centralAuth** - Central authentication service
198
- - **mpi** - Master Patient Index
199
- - **phrAdminBackend** - PHR admin backend
200
- - **phrAdminClient** - PHR admin client
201
- - **terminologyService** - Terminology service
202
-
203
- ## Supported Components
204
-
205
- - **client** - Frontend client application
206
- - **administration** - Administration panel
207
- - **provider** - Provider interface
208
- - **rest-api** - REST API backend
209
-
210
- ## Supported Instances
211
-
212
- - **dev** - Development environment
213
- - **qa** - Quality assurance environment
214
- - **pilot** - Pilot/staging environment
215
-
216
- ## Getting Help
217
-
218
- For any command, use the `-help` flag:
219
-
220
- ```bash
221
- nitor <command> -help
222
- ```
223
-
224
- Examples:
225
-
226
- ```bash
227
- nitor build -help
228
- nitor deploy -help
229
- nitor create-branch -help
230
- ```
231
-
232
- ## Version Information
233
-
234
- Check your Nitor version:
235
-
236
- ```bash
237
- nitor version
238
- ```
239
-
240
- ## Troubleshooting
241
-
242
- ### Common Issues
243
-
244
- 1. **Command not found**
245
-
246
- - Ensure Nitor is installed globally: `npm install -g nitor`
247
- - Check PATH includes npm global bin directory
248
-
249
- 2. **Autocomplete not working**
250
-
251
- - Run `nitor completion`
252
- - Restart terminal or source shell config
253
- - See [AUTOCOMPLETE.md](./AUTOCOMPLETE.md) for details
254
-
255
- 3. **Build/Deploy failures**
256
-
257
- - Check credentials and permissions
258
- - Verify project and component names
259
- - Review error messages in output
260
-
261
- 4. **Git operations fail**
262
- - Ensure you're in a Git repository
263
- - Check for uncommitted changes
264
- - Verify branch names are correct
265
-
266
- ## Contributing
267
-
268
- For issues, feature requests, or contributions, visit:
269
- https://github.com/codebynithin/nitor
270
-
271
- ## License
272
-
273
- ISC License - See LICENSE file for details
274
-
275
- ## Author
276
-
277
- Nithin V <mails2nithin@gmail.com>
278
-
279
- ---
280
-
281
- For detailed information about each command, click on the links in the [Command Reference](#command-reference) section above.
package/docs/REFACTOR.md DELETED
@@ -1,375 +0,0 @@
1
- # Refactor Command Guide
2
-
3
- ## Overview
4
-
5
- The `refactor` command uses AI to enhance and improve text for better clarity, conciseness, and professional quality. It's perfect for refining documentation, commit messages, code comments, and other written content.
6
-
7
- ## Usage
8
-
9
- ### Basic Syntax
10
-
11
- ```bash
12
- nitor refactor <text>
13
- ```
14
-
15
- ## Options
16
-
17
- | Option | Short | Description |
18
- | -------- | ------- | ----------- |
19
- | `--help` | `-help` | Show help |
20
-
21
- ## Examples
22
-
23
- ### Refactor a Commit Message
24
-
25
- ```bash
26
- nitor refactor "added some stuff to fix the bug in login"
27
- ```
28
-
29
- **Output:**
30
-
31
- ```
32
- Fix: Resolve authentication issue in login functionality
33
- ```
34
-
35
- ### Refactor Documentation
36
-
37
- ```bash
38
- nitor refactor "This function does stuff with the database and returns data"
39
- ```
40
-
41
- **Output:**
42
-
43
- ```
44
- Retrieves and returns data from the database
45
- ```
46
-
47
- ### Refactor Code Comment
48
-
49
- ```bash
50
- nitor refactor "loop through array and do something with each item"
51
- ```
52
-
53
- **Output:**
54
-
55
- ```
56
- Iterate through array elements and process each item
57
- ```
58
-
59
- ### Refactor Multi-line Text
60
-
61
- ```bash
62
- nitor refactor "The user authentication system needs to be updated because it's not working properly and users are complaining about login issues"
63
- ```
64
-
65
- **Output:**
66
-
67
- ```
68
- Update user authentication system to resolve login issues reported by users
69
- ```
70
-
71
- ## Use Cases
72
-
73
- ### Commit Messages
74
-
75
- **Before:**
76
-
77
- ```bash
78
- nitor refactor "fixed bug"
79
- ```
80
-
81
- **After:**
82
-
83
- ```
84
- Fix: Resolve critical bug in user authentication
85
- ```
86
-
87
- ### Pull Request Descriptions
88
-
89
- **Before:**
90
-
91
- ```bash
92
- nitor refactor "made changes to improve performance and fixed some bugs"
93
- ```
94
-
95
- **After:**
96
-
97
- ```
98
- Enhance performance and resolve multiple bug fixes
99
- ```
100
-
101
- ### Code Documentation
102
-
103
- **Before:**
104
-
105
- ```bash
106
- nitor refactor "this method gets user info from db"
107
- ```
108
-
109
- **After:**
110
-
111
- ```
112
- Retrieves user information from the database
113
- ```
114
-
115
- ### README Content
116
-
117
- **Before:**
118
-
119
- ```bash
120
- nitor refactor "this project is a tool that helps developers do stuff faster"
121
- ```
122
-
123
- **After:**
124
-
125
- ```
126
- A developer productivity tool designed to streamline workflow and accelerate development
127
- ```
128
-
129
- ### Issue Descriptions
130
-
131
- **Before:**
132
-
133
- ```bash
134
- nitor refactor "the app crashes when you click the button sometimes"
135
- ```
136
-
137
- **After:**
138
-
139
- ```
140
- Application experiences intermittent crashes when button is clicked
141
- ```
142
-
143
- ## What Gets Improved
144
-
145
- ### Clarity
146
-
147
- - Removes ambiguity
148
- - Simplifies complex sentences
149
- - Uses precise language
150
-
151
- ### Conciseness
152
-
153
- - Eliminates redundancy
154
- - Removes filler words
155
- - Keeps essential information
156
-
157
- ### Professionalism
158
-
159
- - Uses appropriate tone
160
- - Follows conventions
161
- - Maintains consistency
162
-
163
- ### Grammar
164
-
165
- - Corrects spelling errors
166
- - Fixes punctuation
167
- - Improves sentence structure
168
-
169
- ## Best Practices
170
-
171
- ### Input Guidelines
172
-
173
- 1. **Be Specific**
174
-
175
- - Include relevant context
176
- - Mention key details
177
-
178
- 2. **Keep It Reasonable**
179
-
180
- - Don't input extremely long text
181
- - Break down complex content
182
-
183
- 3. **Provide Context**
184
- - Mention the purpose (commit, docs, etc.)
185
- - Include technical terms if needed
186
-
187
- ### Output Usage
188
-
189
- 1. **Review the Output**
190
-
191
- - Ensure accuracy
192
- - Verify technical terms
193
- - Check context preservation
194
-
195
- 2. **Customize if Needed**
196
- - Adjust for your style
197
- - Add project-specific terms
198
- - Maintain consistency
199
-
200
- ## Examples by Category
201
-
202
- ### Git Commit Messages
203
-
204
- ```bash
205
- # Feature
206
- nitor refactor "added new login page"
207
- # → "feat: Add user login page"
208
-
209
- # Bug Fix
210
- nitor refactor "fixed the error in payment"
211
- # → "fix: Resolve payment processing error"
212
-
213
- # Documentation
214
- nitor refactor "updated readme file"
215
- # → "docs: Update README documentation"
216
- ```
217
-
218
- ### Code Comments
219
-
220
- ```bash
221
- # Function Description
222
- nitor refactor "gets all users from database"
223
- # → "Retrieves all user records from the database"
224
-
225
- # Variable Purpose
226
- nitor refactor "stores the user data"
227
- # → "Contains user account information"
228
-
229
- # TODO Comments
230
- nitor refactor "need to fix this later"
231
- # → "TODO: Refactor for improved performance"
232
- ```
233
-
234
- ### Documentation
235
-
236
- ```bash
237
- # Installation Steps
238
- nitor refactor "run npm install to install stuff"
239
- # → "Execute npm install to install dependencies"
240
-
241
- # Feature Description
242
- nitor refactor "this feature lets users do things"
243
- # → "Enables users to perform specific actions"
244
- ```
245
-
246
- ## Prerequisites
247
-
248
- The refactor command requires:
249
-
250
- - AI service configuration (Google Generative AI)
251
- - Valid API key
252
- - Internet connection
253
-
254
- ## Configuration
255
-
256
- Ensure you have:
257
-
258
- 1. Google Generative AI API key configured
259
- 2. Proper environment variables set
260
- 3. Network access to AI service
261
-
262
- ## Troubleshooting
263
-
264
- ### No Output Generated
265
-
266
- If refactor produces no output:
267
-
268
- 1. **Check API configuration:**
269
-
270
- - Verify API key is set
271
- - Ensure environment variables are loaded
272
-
273
- 2. **Verify input:**
274
-
275
- - Ensure text is not empty
276
- - Check for special characters
277
-
278
- 3. **Check connectivity:**
279
- - Verify internet connection
280
- - Test API service availability
281
-
282
- ### Unexpected Results
283
-
284
- If output doesn't match expectations:
285
-
286
- 1. **Provide more context:**
287
-
288
- - Add relevant details
289
- - Specify the purpose
290
-
291
- 2. **Rephrase input:**
292
-
293
- - Use different wording
294
- - Break into smaller parts
295
-
296
- 3. **Review and adjust:**
297
- - Manually edit the output
298
- - Combine with your knowledge
299
-
300
- ### API Errors
301
-
302
- If you encounter API errors:
303
-
304
- 1. **Check API key:**
305
-
306
- ```bash
307
- echo $GOOGLE_AI_API_KEY
308
- ```
309
-
310
- 2. **Verify quota:**
311
-
312
- - Check API usage limits
313
- - Ensure quota is not exceeded
314
-
315
- 3. **Test connectivity:**
316
- - Ping API endpoint
317
- - Check firewall settings
318
-
319
- ## Tips for Better Results
320
-
321
- ### Be Descriptive
322
-
323
- **Instead of:**
324
-
325
- ```bash
326
- nitor refactor "fixed it"
327
- ```
328
-
329
- **Use:**
330
-
331
- ```bash
332
- nitor refactor "fixed the login validation error that prevented users from signing in"
333
- ```
334
-
335
- ### Include Technical Terms
336
-
337
- **Instead of:**
338
-
339
- ```bash
340
- nitor refactor "updated the thing"
341
- ```
342
-
343
- **Use:**
344
-
345
- ```bash
346
- nitor refactor "updated the authentication middleware"
347
- ```
348
-
349
- ### Specify Purpose
350
-
351
- **Instead of:**
352
-
353
- ```bash
354
- nitor refactor "changed some code"
355
- ```
356
-
357
- **Use:**
358
-
359
- ```bash
360
- nitor refactor "refactored user service to improve performance"
361
- ```
362
-
363
- ## Getting Help
364
-
365
- To see all available options:
366
-
367
- ```bash
368
- nitor refactor -help
369
- ```
370
-
371
- ## Related Commands
372
-
373
- - `nitor review` - AI code review
374
- - `nitor create-branch` - Create branches with good descriptions
375
- - Standard text editors for manual refinement