A work assistant born to serve the beasts of burden; he's willing to do anything you can think of.
Go to Settings → Tools → Second Hand → AI Configuration
OpenAI Setup:
- Provider: OpenAI
- API Key: Your OpenAI API key
- Model:
gpt-3.5-turboorgpt-4 - Endpoint:
https://api.openai.com/v1
Claude Setup:
- Provider: Claude
- API Key: Your Anthropic API key
- Model:
claude-3-opusorclaude-3-sonnet - Endpoint:
https://api.anthropic.com
Go to Settings → Tools → Second Hand → Email Configuration
- SMTP Host: Your SMTP server (e.g.,
smtp.gmail.com) - SMTP Port:
587(TLS) or465(SSL) - Username: Your email address
- Password: Your email password or app-specific password
- From Email: Your sender email
- To Emails: Comma-separated recipient list
- Schedule: Choose when to send reports
Gmail Setup:
- Enable 2-Factor Authentication
- Generate an App Password: Google Account → Security → App Passwords
- Use the app password in the plugin
- Open the Second Hand tool window:
View→Tool Windows→Second Hand - Click "Generate Report" to create a weekly report
- Preview the report in the tool window
- Click "Send Email" to send the report
- Configure email settings as described above
- Set the schedule to "Weekly (Monday 9:00 AM)" or custom
- The plugin will automatically generate and send reports
- View all previous reports in the tool window
- Click on any report to preview its content
- Re-send any report via email
Commit data is stored locally in your project:
your-project/.idea/second-hand/data.json
This file contains:
- All captured commits
- Generated reports
- Statistics
You can safely delete this file to reset all data.
Each weekly report includes:
- 本周概览 - Statistics (commits, lines changed, files)
- 主要工作内容 - AI-generated work summary
- 技术要点 - Technical highlights and achievements
- 问题与解决方案 - Problems encountered and solutions
- 代码质量分析 - Commit type distribution
- 下周计划建议 - AI-suggested tasks for next week
# Build the plugin
./gradlew buildPlugin
# Run in development mode
./gradlew runIde
# Verify plugin
./gradlew verifyPlugin
# Publish to marketplace
./gradlew publishPlugin# Build the plugin
mvn clean package
# Run tests
mvn testNote: Gradle is the recommended build tool for IntelliJ Platform plugins.
second-hand/
├── src/main/java/com/yourname/commitreporter/
│ ├── core/ # Git tracking and storage
│ ├── analysis/ # AI analysis services
│ ├── report/ # Report generation
│ ├── email/ # Email sending
│ ├── config/ # Configuration management
│ ├── ui/ # User interface
│ └── data/ # Data models
└── src/main/resources/
└── META-INF/
└── plugin.xml # Plugin descriptor
- New AI Provider: Extend
AIAnalyzerService - Custom Report Template: Modify
ReportTemplate - Additional Statistics: Extend
Statisticsclass - UI Improvements: Update panels in
ui/package
- Check if commit tracking is enabled in settings
- Verify the branch is not in the ignored branches list
- Check the IDE log:
Help→Show Log in Explorer
- Verify your API key is correct
- Check your internet connection
- Ensure the API endpoint is reachable
- Try the "Test Connection" button in settings
- Verify SMTP settings are correct
- For Gmail, use an App Password instead of your account password
- Check if your email provider requires app-specific passwords
- Test connection in settings
- API Keys: Stored securely in IntelliJ's encrypted storage
- Email Passwords: Stored securely using
PasswordSafe - Data Privacy: All data is stored locally; no data is sent to third parties except configured AI/SMTP services
MIT License - see LICENSE file for details
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
- Support for multiple languages (English, Chinese, Japanese)
- Integration with Jira/Linear for ticket tracking
- Chart and visualization generation
- Team collaboration features (aggregate team reports)
- Web dashboard for viewing historical data
- Export reports as PDF
- Custom report templates with variables
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- IntelliJ Platform SDK
- OkHttp for HTTP client
- Gson for JSON processing
- Jakarta Mail for email functionality