@@ -17,26 +17,20 @@ https://github.com/user-attachments/assets/9ca694a3-da23-4ae3-b476-1c071e675a66
1717refactorcode ./yourfile
1818```
1919
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.
2121
22- ## Setup Instructions
22+ ## Installation
2323
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 )
3126
27+ Install the package from [ npm] ( https://www.npmjs.com/package/refactorcode ) , either for the project or globally
3228``` bash
33- pnpm install
29+ npm install refactorcode
3430```
35-
36- OR
37-
31+ OR
3832``` bash
39- npm install
33+ npm install -g refactorcode
4034```
4135
4236Get an API Key from here: https://ai.google.dev/aistudio
@@ -71,20 +65,38 @@ API_KEY=YOURAPIKEYHERE
71653 . ** Edit the Configuration** :
7266 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.
7367
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
7573
7674``` bash
75+ git clone https://github.com/brokoli777/RefactorCode.git
76+ ```
7777
78- npm link
78+ ### Install node libraries
7979
80+ ``` bash
81+ pnpm install
8082```
8183
82- ### Run the application
84+ OR
8385
8486``` bash
87+ npm install
88+ ```
8589
86- refactorcode examples/test.py
90+ ### Link the application
91+
92+ ``` bash
93+ npm link
94+ ```
95+
96+ ### Run the application
8797
98+ ``` bash
99+ refactorcode examples/test.py
88100```
89101
90102## Options
@@ -97,19 +109,16 @@ Choices:
97109- 1.5p (gemini-1.5-pro)
98110
99111``` bash
100-
101112refactorcode examples/test.py -m 1.5p
102-
103113```
104114
105115** -o or --output** - Allows to set the output file
106116
117+ ``` bash
118+ refactorcode examples/test.py -o hello.py
119+ ```
120+
107121** -t or --token-usage:** Allows get information on the tokens used
108122
109123** -s or --stream** Streams the response as it is received
110124
111- ``` bash
112-
113- refactorcode examples/test.py -o hello.py
114-
115- ```
0 commit comments