LeetFetch
pendingby Yash Agrawal
Transform your LeetCode journey into a structured knowledge base. Auto-sync solved problems, generate individual notes, and build connected topic graphs.
LeetFetch
Transform your LeetCode journey into a structured knowledge base with automatic syncing and intelligent organization.
LeetFetch automatically syncs your solved LeetCode problems into Obsidian, creating individual notes and building a comprehensive DSA knowledge base with backlinking and topic organization.
Features
- Automatic sync: Fetch recent or complete submission history
- Individual notes: Customizable templates for each problem
- Topic organization: Automatic
[[Topic]]links and dedicated topic pages - Obsidian Bases: Structured database format with multiple views
- Smart filtering: Prevents duplicate imports
Installation
Requirements
- Obsidian v1.9.10+
- LeetCode account
Steps
- Download
main.js,manifest.json,styles.cssfrom releases - Create folder:
YourVault/.obsidian/plugins/leetfetch/ - Copy files into the folder
- Restart Obsidian and enable the plugin
Quick start
- Open Settings > Community Plugins > LeetFetch
- Enter your LeetCode username
- Click the ribbon icon or run "Sync LeetCode problems"
Authentication (optional)
For private submissions, add tokens from browser cookies:
LEETCODE_SESSION(session token)csrftoken(CSRF token)
Tokens are stored locally and used only for LeetCode API calls.
Configuration
| Setting | Default | Description |
|---|---|---|
| Base file | DSA/leetcode-problems.base | Main database file |
| Individual notes | DSA/Problems/ | Problem note directory |
| Topic notes | DSA/Topics/ | Topic page directory |
| Auto sync | Off | Sync at set intervals |
| Recent limit | 20 | Problems per sync (1-100) |
Commands
- Sync LeetCode problems: Fetch recent submissions
- Sync all LeetCode problems: Import complete history
- Create problem note from current line: Generate note from link
- Initialize Obsidian Bases format: Set up database
- Validate Bases data integrity: Check consistency
- Clear all cache: Reset tracking data
Template variables
Use these in custom templates:
{{title}}, {{difficulty}}, {{topics}}, {{url}}, {{date}}, {{language}}, {{tags}}, {{id}}, {{status}}
Troubleshooting
| Problem | Solution |
|---|---|
| User not found | Check username and profile visibility |
| Auth failed | Regenerate tokens, check for extra spaces |
| No new problems | Use "Sync all" or clear cache |
| Sync timeout | Reduce recent submissions limit |
Contributing
git clone https://github.com/yash4agr/leetfetch.git
cd leetfetch
npm install
npm run build
License
MIT License. See LICENSE file.
Links
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.