Merly Mentor is a self-supervised, federated learning system designed to reason about the semantics of code. Using an iterative, multi-tiered code abstraction model, Mentor can analyze code, learning from hundreds of billions of lines in a single day. This system is optimized to run on commodity hardware, allowing it to extract insights about code syntax, patterns, and semantics.
Mentor is capable of learning both "good" and "bad" code practices, making it a versatile tool for various development tasks. These include:
- Detecting potential technical debt or defects in code and recommending fixes.
- Grading the quality of code in a repository.
- Guiding developers through critical aspects of a codebase.
- Distributed Learning Framework: Scales to learn from massive codebases.
- Defect Detection: Identifies code smells, potential bugs, and technical debt.
- Code Quality Grading: Grades repositories based on code structure, semantics, and practices.
- Automated Code Guidance: Provides actionable recommendations for code improvement.
To start using Merly Mentor, you will need a valid registration key. You can obtain a free 30-day trial by signing up for early access at Merly AI Early Access.
- Docker installed
- Kubernetes (optional, for cluster deployment)
- Helm (optional, for Helm chart deployment)
To deploy Merly Mentor using Docker:
-
Ensure that you create the necessary directory and set the required permissions:
mkdir mentor-data sudo chown -R 999:999 mentor-data sudo chmod -R 755 mentor-data
-
Pull the container image and run it:
docker run -d \ --name merly-mentor \ -e REGISTRATION_KEY=your_registration_key \ -p 3000:3000 \ -v ./mentor-data:/app/.mentor \ merlyai/merly-mentor
-
Access Merly Mentor by opening your browser and navigating to
http://localhost:3000
.
For a more modular deployment, use Docker Compose. Below is a sample docker-compose.yml
file:
services:
merly-models:
image: merlyai/merly-mentor-models:v2.0.0
volumes:
- models-data:/app/.models
merly-assets:
image: merlyai/merly-mentor-assets:v1.0.0
volumes:
- assets-data:/app/.assets
merly-mentor:
image: merlyai/merly-mentor-daemon:v0.4.19
environment:
- REGISTRATION_KEY=${REGISTRATION_KEY}
ports:
- "4200"
volumes:
- mentor-data:/merly/.mentor
- models-data:/merly/.models
- assets-data:/merly/.assets
init: true
depends_on:
- merly-models
- merly-assets
merly-bridge:
image: merlyai/merly-mentor-bridge:v0.1.0
environment:
- MERLY_AI_DAEMON_URL=http://merly-mentor:4200/
ports:
- "8080"
depends_on:
- merly-mentor
merly-ui:
image: merlyai/merly-mentor-ui:v0.1.0
environment:
- MERLY_AI_BRIDGE_URL=http://merly-bridge:8080
ports:
- "3000:3000"
depends_on:
- merly-bridge
volumes:
mentor-data:
driver: local
driver_opts:
type: none
device: ${PWD}/mentor-data
o: bind
assets-data:
driver: local
models-data:
driver: local
-
Before running the Docker Compose, ensure the
mentor-data
directory is created and permissions are correctly set:mkdir mentor-data sudo chown -R 999:999 mentor-data sudo chmod -R 755 mentor-data
-
Deploy the stack:
docker-compose up -d
-
Set your registration key and apply the manifests to deploy Merly Mentor on Kubernetes:
export REGISTRATION_KEY="your_registration_key" curl -s https://github.com/merly-ai/merly-mentor/releases/download/v1.0.20/deploy.yaml | envsubst | kubectl apply -f -
For a Helm-based deployment, refer to the official Helm chart repository at https://charts.merly-mentor.ai.
Merly Mentor is continuously evolving, with frequent updates to improve functionality and performance. Stay tuned for the latest features and enhancements!