AI-Augmented Java Migration Assistant - Open Source Edition
Project description
GraphShift Discovery
GraphShift Discovery is an AI-augmented Java migration analysis tool that helps developers identify deprecated APIs, assess migration complexity, and plan upgrade paths for Java applications. GraphShift uses python, and you will need Python 3.8 or higher for compatibility
Features
- Single Repository Analysis: Analyze individual Java repositories for migration readiness
- Organization-wide Analysis: Scan multiple repositories across GitHub organizations
- Migration Readiness Assessment: Categorize findings by severity (Critical, Warning, Info)
- Rich HTML Reports: Interactive reports with filtering, sorting, and visual indicators
- Multiple Output Formats: JSON, HTML, and CSV outputs for different use cases
- Configurable Scope: Focus on upgrade blockers or comprehensive deprecation analysis
Installation
Via pip (Recommended)
pip install graphshift-discovery
From Source
git clone https://github.com/graphshift-dev/discovery
cd discovery
pip install -e .
Quick Start
First Run - Initialization
On first use, GraphShift will prompt you to set up a working directory:
graphshift init
# GraphShift needs a working directory.
# Working directory [C:\Users\user\AppData\Local\GraphShift]:
This working directory will contain:
reports/- Analysis results and HTML reportstemplates/- Customizable HTML report templateslogs/- Application logsclones/- Temporary repository clonestemp/- Temporary analysis filesresources/- Static assets (logo, etc.)config/- User editable configuration (GitHub Token)
Basic Commands
Health Check
graphshift health
Health Check
graphshift health
Verifies system requirements and configuration.
Single Repository Analysis
# Remote repository
graphshift analyze --repo https://github.com/spring-projects/spring-petclinic
# Local repository
graphshift analyze --local-path /path/to/local/repo
# With specific target JDK
graphshift analyze --repo https://github.com/user/repo --to-version 21
# Focus on upgrade blockers only
graphshift analyze --repo https://github.com/user/repo --scope upgrade-blockers
Organization Analysis
# Analyze all public repositories in an organization
graphshift analyze --org spring-projects
# Limit number of repositories
graphshift analyze --org spring-projects --max-repos 5
# Analyze with specific parameters
graphshift analyze --org spring-projects --to-version 17 --scope upgrade-blockers
Command Reference
Global Options
--verbose, -v- Enable verbose logging--config CONFIG- Specify custom configuration file
Analysis Commands
graphshift analyze
Analyze Java repositories for migration issues.
Repository Selection:
--repo URL- Analyze single remote repository--local-path PATH- Analyze local repository--org ORGANIZATION- Analyze GitHub organization--local-org PATH- Analyze local directory containing multiple repos
Analysis Options:
--to-version VERSION- Target JDK version (default: 21)--scope SCOPE- Analysis scope:all-deprecationsorupgrade-blockers(default: all-deprecations)--max-repos N- Maximum repositories to analyze for organization scans (default: 50)--provider PROVIDER- SCM provider:github(default: github)
Output Options:
--no-keep-clones- Delete cloned repositories after analysis
graphshift health
Check system health and configuration.
graphshift init
Manually initialize or reconfigure GraphShift.
Options:
--base-dir PATH- Specify working directory
Configuration
GraphShift uses a YAML configuration file that is copied to your working directory during initialization. You can customize settings like GitHub tokens, memory allocation, and analysis parameters.
Managing Configuration
Use the graphshift config commands to manage your configuration:
# Edit configuration (opens in default editor)
graphshift config edit
# View current configuration
graphshift config show
# Show config file location
graphshift config path
GitHub Access
For organization analysis, configure GitHub access:
graphshift:
scm:
github:
base_url: "https://api.github.com"
# Add personal access token for private repos or higher rate limits
# token: "your-github-token"
Actions:
graphshift config edit- Open config file in default editorgraphshift config show- Display current configurationgraphshift config path- Show config file location
Understanding the Output
Migration Readiness Status
- READY - No blocking issues found
- READY WITH TECH DEBT - Minor warnings that should be reviewed
- BLOCKED - Critical issues that prevent migration
Severity Levels
- Critical - APIs removed in target JDK version, will cause compilation failures
- Warning - APIs deprecated in target JDK version, may be removed in future versions
- Info - General deprecation notices for awareness
Report Files
For each analysis, GraphShift generates:
- JSON Report (
*_analysis.json) - Raw analysis data for programmatic use - HTML Report (
*_analysis.html) - Interactive web report with filtering and sorting - CSV Report (
*_analysis.csv) - Tabular data for spreadsheet analysis
Organization Reports
Organization analysis creates:
- Individual repository reports in subdirectories
- Organization summary report (
*_organization_summary.html) - Aggregated JSON data with cross-repository insights
Analysis Settings
graphshift:
jar:
memory: "4g"
initial_memory: "1g"
stack_size: "8m"
Examples
Analyzing Spring Framework
graphshift analyze --repo https://github.com/spring-projects/spring-framework --to-version 21
Organization Survey
graphshift analyze --org apache --max-repos 10 --scope upgrade-blockers
Local Development
graphshift analyze --local-path ./my-java-project --to-version 17
Architecture
GraphShift Discovery uses a hybrid architecture:
- Java Analysis Engine - Performs AST parsing and deprecation detection
- Python Orchestration - Handles workflow, SCM integration, and report generation
- Knowledge Base - Curated deprecation and removal information
- Template System - Customizable HTML report generation
System Requirements
- Python: 3.8 or higher
- Java: JDK 8 or higher (for analysis engine)
- Memory: 4GB RAM recommended for large codebases
- Storage: Temporary space for repository clones
Troubleshooting
Common Issues
"JAR analyzer not found"
- Ensure Java is installed and accessible
- Check that the analysis engine was properly packaged
"No SCM providers configured"
- Verify GitHub configuration for organization analysis
- Check network connectivity for remote repositories
"Analysis failed with memory error"
- Increase JVM memory settings in configuration
- Analyze smaller repository subsets
Debug Mode
Enable verbose logging for detailed troubleshooting:
graphshift --verbose analyze --repo https://github.com/user/repo
Contributing
GraphShift Discovery is designed for extensibility:
- Templates: Customize HTML reports by modifying templates in your working directory
- Configuration: Extend analysis parameters through YAML configuration
- Integration: Use JSON output for integration with other tools
License
Apache License 2.0
Support
Bugs or Enhancements? https://github.com/graphshift-dev/discovery/issues Feedback? Send an email to hi@graphshift.dev with subject line Feedback
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphshift_discovery-1.0.0.tar.gz.
File metadata
- Download URL: graphshift_discovery-1.0.0.tar.gz
- Upload date:
- Size: 10.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21f8ba5de3871dc5396d1eb8252927df0fc7e8e229566f1d3550ed6bb1fe294
|
|
| MD5 |
67302bf2546632ad29fb7300fd968b08
|
|
| BLAKE2b-256 |
28d6093388c9462e363001195e18fecb43bf2e6359539359fb4ba10cc673293e
|
File details
Details for the file graphshift_discovery-1.0.0-py3-none-any.whl.
File metadata
- Download URL: graphshift_discovery-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a2346e84606f110536d59418ef71affb4c32958c29c06acf5177a2f8b3c7578
|
|
| MD5 |
61656367c89093645ebaaf53289ec6f5
|
|
| BLAKE2b-256 |
13f5d43638b59646bb254a47242a5deb1043f44123150830955af0e8af36ebf0
|