👋 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 .

What is Refactory?

Refactory is your intelligent coding assistant, designed to analyze your PRs and let you control what you want using PR comments.

Comment-Driven Controls to Refactor, Test, Document

Control refactoring, test generation, and documentation creation on-demand or automatically through PR comments.

For developers by developers

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.

Get the big picture. Analyze and Refactor

Analyze entire code base, get insights into functions, and understand the quality of the whole project. Apply refactoring suggestions directly from PR comments.

Integrate into your workflow

See actionable results within GitHub pull requests. Control what you want using PR comments directly from Refactory's interface. Enhance collaboration and maintainabilit

Refactory Bot Commands

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

Examples of command arguments

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

Notes