CodeMaister
A powerful code analysis and refactoring tool with autonomous PR capabilities
Features
Key Features
Vulnerability Scanning
Automatically detects and fixes security vulnerabilities in code and dependencies
Dependency Management
Keeps dependencies up to date and resolves conflicts
Static Analysis
Identifies code quality issues, bugs, and potential improvements
Automated Refactoring
Applies best practices and patterns to improve code quality
Test Generation
Creates unit tests and property-based tests for untested code
Autonomous PRs
Automatically creates pull requests for all improvements
Process
How CodeMaister Works
A powerful automated workflow that improves your codebase with minimal effort
Code Analysis
CodeMaister scans your entire codebase using advanced static analysis techniques. It identifies security vulnerabilities, outdated dependencies, code quality issues, and potential bugs without running your code.
Automatic Fixes
For each detected issue, CodeMaister applies intelligent fixes using language-specific best practices. It updates dependencies, refactors problematic code patterns, and patches security vulnerabilities automatically.
Test Generation
For modified code, CodeMaister generates comprehensive tests to ensure the changes work as expected. It creates unit tests, integration tests, and property-based tests depending on the context.
Verification
Before finalizing any changes, CodeMaister runs all tests to verify the fixes don't break existing functionality. It ensures backward compatibility and proper behavior of the updated code.
Documentation
Every change is documented with detailed explanations of what was fixed and why. CodeMaister generates comprehensive reports highlighting the improvements made and their benefits.
Pull Request Creation
Finally, CodeMaister creates a structured pull request with all the improvements grouped by category. This allows your team to review and merge the changes according to your workflow.
Feature Comparison
Functionality | CodeMaister | Snyk | Dependabot | OpenRewrite | Diffblue Cover | PR‑Agent | Sourcery | Codeium |
---|---|---|---|---|---|---|---|---|
Vulnerability Fix PRs | Yes | Yes | No | No | No | No | No | No |
Dependency Updates | Yes | Yes | Yes | No | No | No | No | No |
Static Analysis | Yes | Yes | No | No | No | No | Yes | No |
Automated Refactoring | Yes | No | No | Yes | No | Yes | No | Yes |
Test Generation | Yes | No | No | No | Yes | Yes | No | No |
Autonomous PRs | Yes | Yes | Yes | Yes | Yes | Yes | No | No |
Getting Started
CLI Usage
Analyze your code for issues:
codemaister /path/to/your/project
Automatically fix detected issues:
codemaister /path/to/your/project --fix
Fix issues and create a pull request with changes:
codemaister /path/to/your/project --fix --create-pr
See detailed information during analysis:
codemaister /path/to/your/project --debug
Docker Usage
Run CodeMaister without installation using Docker:
docker run -v $(pwd):/code registry.gitlab.com/codemaister/cli:latest /code
Analyze and fix issues:
docker run -v $(pwd):/code registry.gitlab.com/codemaister/cli:latest /code --fix
Using with custom settings:
docker run -v $(pwd):/code -v ~/.codemaister:/root/.codemaister registry.gitlab.com/codemaister/cli:latest /code
Creating a convenient alias:
alias codemaister='docker run -v $(pwd):/code registry.gitlab.com/codemaister/cli:latest'
CI/CD Integration
Add this to your GitHub Actions workflow:
name: CodeMaister Analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * 1' # Weekly on Mondays
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run CodeMaister
run: |
docker run -v ${PWD}:/code registry.gitlab.com/codemaister/cli:latest /code --fix
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: "fix: CodeMaister automated fixes"
title: "CodeMaister Automated Fixes"
body: "This PR contains automated fixes from CodeMaister"
branch: codemaister-fixes
Add this to your GitLab CI configuration:
codemaister:
image: registry.gitlab.com/codemaister/cli:latest
stage: test
script:
- codemaister /builds/$CI_PROJECT_PATH --fix
rules:
- if: $CI_PIPELINE_SOURCE == 'schedule'
- if: $CI_COMMIT_BRANCH == 'main'
- if: $CI_MERGE_REQUEST_IID
codemaister-mr:
image: registry.gitlab.com/codemaister/cli:latest
stage: test
script:
- codemaister /builds/$CI_PROJECT_PATH --fix --create-pr
rules:
- if: $CI_PIPELINE_SOURCE == 'schedule'
when: manual
- if: $CI_COMMIT_BRANCH == 'main'
when: manual