👋 Welcome to Refactory’s Documentation! Our mission is to help you convert your pull requests into masterpieces through refactoring your code, improving the tests and generating documentation .
Refactory is your intelligent coding assistant, designed to analyze your PRs and let you control what you want using PR comments.
Control refactoring, test generation, and documentation creation on-demand or automatically through PR comments.
Integrate in seconds. Analyze pull requests with your comments. Get actionable refactoring suggestions. Built with developers in mind. Currently supports Python with more language support coming soon.
Analyze entire code base, get insights into functions, and understand the quality of the whole project. Apply refactoring suggestions directly from PR comments.
See actionable results within GitHub pull requests. Control what you want using PR comments directly from Refactory's interface. Enhance collaboration and maintainabilit
| Command | Description |
|---|---|
/refactory refactor-all |
Run the refactoring tool on all changed entities |
/refactory refactor-function |
Run the refactoring tool on all changed functions |
/refactory refactor-class |
Run the refactoring tool on all changed classes |
/refactory refactor-function <path:function1> <path:function2> ... |
Run the refactoring tool on the specified functions |
/refactory refactor-class <path:class1> <path:class2> ... |
Run the refactoring tool on the specified classes |
/refactory refactor-class-functions --class <path:class> --function <function1> <function2> ... |
Run the refactoring tool on the specified functions in the specified class |
| Example Command | Result |
|---|---|
/refactory refactor-function src/main.py:main src/utils.py:helper |
Run the refactoring tool on the specified functions i.e. main in src/main.py and helper in src/utils.py |
/refactory refactor-class src/main.py:MainClass src/utils.py:HelperClass |
Run the refactoring tool on the specified classes i.e. MainClass in src/main.py and HelperClass in src/utils.py |
/refactory refactor-class-functions --class src/main.py:MainClass --function main helper |
Run the refactoring tool on the specified functions i.e. main and helper in MainClass in src/main.py |
/refactory refactor-class-functions command, the -class and -function flags are mandatory. The -class flag takes a single argument i.e. the path to the class. The -function flag takes one or more arguments i.e. the names of the functions in the class to be refactored.main function in src/main.py is src/main.py:main and the path to the helper function in src/utils.py is src/utils.py:helper.