nitor 1.5.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/CHANGELOG.md +37 -0
- package/LICENSE +15 -0
- package/README.md +21 -2
- package/package.json +13 -4
- package/services/autocomplete.js +8 -0
- package/services/enums/actions.enum.js +1 -0
- package/services/mr-status.js +306 -0
- package/services/process-commands.js +29 -3
- package/services/task-stats.js +22 -3
- package/services/utils.js +36 -9
- package/.commitlintrc.json +0 -10
- package/.editorconfig +0 -16
- package/.eslintrc.js +0 -29
- package/.gitattributes +0 -2
- package/.prettierrc +0 -5
- package/.releaserc.json +0 -34
- package/docs/AUTOCOMPLETE.md +0 -136
- package/docs/BACKUP.md +0 -343
- package/docs/BUILD.md +0 -120
- package/docs/BUILD_DEPLOY.md +0 -320
- package/docs/CLEANUP.md +0 -285
- package/docs/CREATE_BRANCH.md +0 -173
- package/docs/DEPLOY.md +0 -130
- package/docs/MERGE.md +0 -253
- package/docs/README.md +0 -277
- package/docs/REFACTOR.md +0 -375
- package/docs/REVIEW.md +0 -185
- package/docs/TIME_ENTRY.md +0 -422
package/docs/README.md
DELETED
|
@@ -1,277 +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
|
-
### Time Entry Commands
|
|
58
|
-
|
|
59
|
-
- **[time-entry](./TIME_ENTRY.md)** - Complete time tracking and management guide
|
|
60
|
-
- `time-init` - Initialize configuration
|
|
61
|
-
- `time-switch` - Switch projects
|
|
62
|
-
- `time-add` - Add time entries
|
|
63
|
-
- `time-update` - Update entries
|
|
64
|
-
- `time-delete` - Delete entries
|
|
65
|
-
- `time-stats` - View daily status
|
|
66
|
-
- `time-entries` - View entries by date
|
|
67
|
-
- `time-zoho` - Sync to Zoho Sprints
|
|
68
|
-
- `time-gitlab` - Get GitLab activities
|
|
69
|
-
- `time-merge` - View MR status
|
|
70
|
-
|
|
71
|
-
## Setup Guides
|
|
72
|
-
|
|
73
|
-
### Autocomplete
|
|
74
|
-
|
|
75
|
-
See [AUTOCOMPLETE.md](./AUTOCOMPLETE.md) for detailed autocomplete setup instructions.
|
|
76
|
-
|
|
77
|
-
Quick setup:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
nitor completion
|
|
81
|
-
source ~/.bashrc # or ~/.zshrc for zsh
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Command Categories
|
|
85
|
-
|
|
86
|
-
### Development Workflow
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
# 1. Create a feature branch
|
|
90
|
-
nitor create-branch -t 123 -ty feat -d "user-authentication" -p portal
|
|
91
|
-
|
|
92
|
-
# 2. Build your changes
|
|
93
|
-
nitor build -p portal -c client -i dev
|
|
94
|
-
|
|
95
|
-
# 3. Deploy to dev environment
|
|
96
|
-
nitor deploy -p portal -c client -i dev
|
|
97
|
-
|
|
98
|
-
# 4. Or build and deploy together
|
|
99
|
-
nitor build-deploy -p portal -c client -i dev
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Code Review Workflow
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
# Review merge request with AI
|
|
106
|
-
nitor review -r portalClient -mId 456
|
|
107
|
-
|
|
108
|
-
# Refactor commit messages
|
|
109
|
-
nitor refactor "fixed some bugs in login"
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Branch Management
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
# Merge feature to development
|
|
116
|
-
nitor merge -s feat/123-user-auth -ta development
|
|
117
|
-
|
|
118
|
-
# Clean up old branches
|
|
119
|
-
nitor cleanup
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Database Management
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Backup production database
|
|
126
|
-
nitor backup -p medicaPortal
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Common Use Cases
|
|
130
|
-
|
|
131
|
-
### Daily Development
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
# Start new feature
|
|
135
|
-
nitor create-branch -t 789 -ty feat -d "payment-integration"
|
|
136
|
-
|
|
137
|
-
# Build and test
|
|
138
|
-
nitor build -p gateway -c rest-api -i dev
|
|
139
|
-
|
|
140
|
-
# Deploy when ready
|
|
141
|
-
nitor deploy -p gateway -c rest-api -i dev
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Release Process
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
# Build for QA
|
|
148
|
-
nitor build-deploy -p portal -c client -i qa
|
|
149
|
-
|
|
150
|
-
# Review changes
|
|
151
|
-
nitor review -r portalClient -mId 123
|
|
152
|
-
|
|
153
|
-
# Merge to master
|
|
154
|
-
nitor merge -s development -ta master
|
|
155
|
-
|
|
156
|
-
# Deploy to production
|
|
157
|
-
nitor deploy -p portal -c client -i pilot
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Maintenance
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
# Backup before major changes
|
|
164
|
-
nitor backup -p configService
|
|
165
|
-
|
|
166
|
-
# Clean up old branches
|
|
167
|
-
nitor cleanup
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### Time Tracking
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
# Initialize time entry
|
|
174
|
-
nitor time-init
|
|
175
|
-
|
|
176
|
-
# Add time entry
|
|
177
|
-
nitor time-add
|
|
178
|
-
|
|
179
|
-
# Check daily status
|
|
180
|
-
nitor time-stats
|
|
181
|
-
|
|
182
|
-
# Sync to Zoho
|
|
183
|
-
nitor time-zoho
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## Supported Projects
|
|
187
|
-
|
|
188
|
-
- **portal** - Portal application
|
|
189
|
-
- **gateway** - Gateway service
|
|
190
|
-
- **phr** - Personal Health Records
|
|
191
|
-
- **configService** - Configuration service
|
|
192
|
-
- **healthRecords** - Health records service
|
|
193
|
-
- **centralAuth** - Central authentication service
|
|
194
|
-
- **mpi** - Master Patient Index
|
|
195
|
-
- **phrAdminBackend** - PHR admin backend
|
|
196
|
-
- **phrAdminClient** - PHR admin client
|
|
197
|
-
- **terminologyService** - Terminology service
|
|
198
|
-
|
|
199
|
-
## Supported Components
|
|
200
|
-
|
|
201
|
-
- **client** - Frontend client application
|
|
202
|
-
- **administration** - Administration panel
|
|
203
|
-
- **provider** - Provider interface
|
|
204
|
-
- **rest-api** - REST API backend
|
|
205
|
-
|
|
206
|
-
## Supported Instances
|
|
207
|
-
|
|
208
|
-
- **dev** - Development environment
|
|
209
|
-
- **qa** - Quality assurance environment
|
|
210
|
-
- **pilot** - Pilot/staging environment
|
|
211
|
-
|
|
212
|
-
## Getting Help
|
|
213
|
-
|
|
214
|
-
For any command, use the `-help` flag:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
nitor <command> -help
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Examples:
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
nitor build -help
|
|
224
|
-
nitor deploy -help
|
|
225
|
-
nitor create-branch -help
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## Version Information
|
|
229
|
-
|
|
230
|
-
Check your Nitor version:
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
nitor version
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## Troubleshooting
|
|
237
|
-
|
|
238
|
-
### Common Issues
|
|
239
|
-
|
|
240
|
-
1. **Command not found**
|
|
241
|
-
|
|
242
|
-
- Ensure Nitor is installed globally: `npm install -g nitor`
|
|
243
|
-
- Check PATH includes npm global bin directory
|
|
244
|
-
|
|
245
|
-
2. **Autocomplete not working**
|
|
246
|
-
|
|
247
|
-
- Run `nitor completion`
|
|
248
|
-
- Restart terminal or source shell config
|
|
249
|
-
- See [AUTOCOMPLETE.md](./AUTOCOMPLETE.md) for details
|
|
250
|
-
|
|
251
|
-
3. **Build/Deploy failures**
|
|
252
|
-
|
|
253
|
-
- Check credentials and permissions
|
|
254
|
-
- Verify project and component names
|
|
255
|
-
- Review error messages in output
|
|
256
|
-
|
|
257
|
-
4. **Git operations fail**
|
|
258
|
-
- Ensure you're in a Git repository
|
|
259
|
-
- Check for uncommitted changes
|
|
260
|
-
- Verify branch names are correct
|
|
261
|
-
|
|
262
|
-
## Contributing
|
|
263
|
-
|
|
264
|
-
For issues, feature requests, or contributions, visit:
|
|
265
|
-
https://github.com/codebynithin/nitor
|
|
266
|
-
|
|
267
|
-
## License
|
|
268
|
-
|
|
269
|
-
ISC License - See LICENSE file for details
|
|
270
|
-
|
|
271
|
-
## Author
|
|
272
|
-
|
|
273
|
-
Nithin V <mails2nithin@gmail.com>
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
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
|