Quick Start Guide
Get up and running with RefineAI in just a few minutes. This guide will walk you through the basic setup and your first code optimization.
Prerequisites
- Node.js version 14 or higher
- npm or yarn package manager
- A GitHub account for repository integration (optional)
Step 1: Install the CLI
The RefineAI CLI is the easiest way to get started. Install it globally using npm or yarn:
npm install -g refine-ai-cliOr if you prefer yarn:
yarn global add refine-ai-cliStep 2: Initialize Your Project
Navigate to your project directory and initialize RefineAI:
cd your-project-directoryrefine initThis will create a .refineai.yml file in your project root.
Step 3: Configure Your Project
Edit the .refineai.yml file to customize your optimization settings:
# RefineAI Configuration
version: 1
project:
name: "my-awesome-app"
version: "1.0.0"
analysis:
optimization_level: "balanced"
include:
- "src/**/*.js"
- "src/**/*.ts"
exclude:
- "node_modules"
- "dist"
- "**/*.test.js"
rules:
performance: true
security: true
maintainability: trueStep 4: Run Your First Analysis
Start the code analysis process with a simple command:
refine analyzeThis will scan your codebase and generate an analysis report in the refine-reports directory.
Step 5: Review and Apply Optimizations
Review the suggested optimizations and apply them to your codebase:
refine optimizeThis will apply the optimizations to your code. Don't worry, RefineAI creates backups of your original files before making any changes.
What's Next?
Now that you've completed your first optimization, explore more advanced features:
- Set up GitHub integration for automatic PR-based optimizations
- Configure the API for programmatic access
- Learn best practices for integrating RefineAI into your workflow
