@@ -17,26 +17,20 @@ https://github.com/user-attachments/assets/9ca694a3-da23-4ae3-b476-1c071e675a66
17
17
refactorcode ./yourfile
18
18
```
19
19
20
- By the refactored code is displayed in the console. To specify an output file, use ` -o ` . See [ Options] ( #options )
20
+ The refactored code is displayed in the console. To specify an output file, use ` -o ` . See [ Options] ( #options ) for more details.
21
21
22
- ## Setup Instructions
22
+ ## Installation
23
23
24
- ### Clone the repo
25
-
26
- ``` bash
27
- git clone https://github.com/brokoli777/RefactorCode.git
28
- ```
29
-
30
- ### Install node libraries
24
+ Ensure you have npm and node.js installed on your computer:
25
+ [ Node.js] ( https://nodejs.org/en )
31
26
27
+ Install the package from [ npm] ( https://www.npmjs.com/package/refactorcode ) , either for the project or globally
32
28
``` bash
33
- pnpm install
29
+ npm install refactorcode
34
30
```
35
-
36
- OR
37
-
31
+ OR
38
32
``` bash
39
- npm install
33
+ npm install -g refactorcode
40
34
```
41
35
42
36
Get an API Key from here: https://ai.google.dev/aistudio
@@ -71,20 +65,38 @@ API_KEY=YOURAPIKEYHERE
71
65
3 . ** Edit the Configuration** :
72
66
Open the ` .refactorcode.toml ` file in your preferred text editor, and add your API key value, and any other preferences (e.g. MODEL) you need.
73
67
74
- ### Link the application
68
+ If you want to contribute to project or make a custom version of the library, here are the instructions:
69
+
70
+ ## Development Setup Instructions
71
+
72
+ ### Clone the repo
75
73
76
74
``` bash
75
+ git clone https://github.com/brokoli777/RefactorCode.git
76
+ ```
77
77
78
- npm link
78
+ ### Install node libraries
79
79
80
+ ``` bash
81
+ pnpm install
80
82
```
81
83
82
- ### Run the application
84
+ OR
83
85
84
86
``` bash
87
+ npm install
88
+ ```
85
89
86
- refactorcode examples/test.py
90
+ ### Link the application
91
+
92
+ ``` bash
93
+ npm link
94
+ ```
95
+
96
+ ### Run the application
87
97
98
+ ``` bash
99
+ refactorcode examples/test.py
88
100
```
89
101
90
102
## Options
@@ -97,19 +109,16 @@ Choices:
97
109
- 1.5p (gemini-1.5-pro)
98
110
99
111
``` bash
100
-
101
112
refactorcode examples/test.py -m 1.5p
102
-
103
113
```
104
114
105
115
** -o or --output** - Allows to set the output file
106
116
117
+ ``` bash
118
+ refactorcode examples/test.py -o hello.py
119
+ ```
120
+
107
121
** -t or --token-usage:** Allows get information on the tokens used
108
122
109
123
** -s or --stream** Streams the response as it is received
110
124
111
- ``` bash
112
-
113
- refactorcode examples/test.py -o hello.py
114
-
115
- ```
0 commit comments