Skip to main content

Requirements

Python Version: 3.8 or higher
Supported Platforms: macOS, Linux, Windows

Install via pip

The recommended way to install Refactron is using pip:
pip install refactron

Development Version

To install the latest development version from GitHub:
pip install git+https://github.com/Refactron-ai/Refactron_lib.git

Verify Installation

Check that Refactron is installed correctly:
refactron --version
You should see output like:
refactron, version 1.0.15

Optional: Install Development Dependencies

If you plan to contribute to Refactron:
# Clone the repository
git clone https://github.com/Refactron-ai/Refactron_lib.git
cd Refactron_lib

# Run the development setup script
bash setup_dev.sh
This will:
  • Create a virtual environment
  • Install all dependencies (including dev tools)
  • Set up pre-commit hooks
  • Run initial tests

Dependencies

Refactron automatically installs these dependencies:
  • libcst - Code parsing and transformation
  • click - CLI framework
  • rich - Terminal formatting
  • radon - Complexity metrics
  • astroid - AST analysis
  • chromadb - Vector database for RAG
  • tree-sitter - Code parsing
  • sentence-transformers - Embeddings
  • groq - LLM integration
  • pydantic - Data validation

Troubleshooting

If you get a permission error, try:
pip install --user refactron
Ensure you’re using Python 3.8+:
python --version
If needed, use a specific Python version:
python3.10 -m pip install refactron
On macOS, you may need to install certificates:
/Applications/Python\ 3.x/Install\ Certificates.command

Next Steps

Configuration

Configure Refactron for your project