Transform web content and YouTube videos into structured, organized knowledge using AI analysis and hierarchical organization.
brAIn transforms information into structured knowledge and intelligently organizes it within your personal knowledge hierarchy.
- π Content Processing: Web articles, blog posts, and YouTube videos
- π§ 5-Pass AI Analysis: Comprehensive analysis across multiple dimensions
- ποΈ Hierarchical MOCs: Automatic organization into Domain β Area β Topic β Concept structure
- π Context-Aware Placement: AI understands existing knowledge structure to avoid duplicates
- π Cross-Domain Detection: Identifies content spanning multiple knowledge areas
- π§ Robust Error Handling: Advanced fallback mechanisms ensure reliable processing
- Structure & Metadata: Title optimization, hierarchy placement, learning context
- Content Analysis: Key facts, insights, core concepts, detailed summaries
- Perspectives & Examples: Multiple viewpoints, analogies, real-world applications
- Connections & Applications: Cross-domain links, practical applications, implications
- Learning & Next Steps: Knowledge gaps, learning pathways, actionable steps
- Hierarchy Context Integration: AI now analyzes your complete existing knowledge structure before making placement decisions
- Smart Conflict Detection: Prevents creation of parallel hierarchies for related concepts
- Intelligent Nesting: Automatically places new content under existing relevant hierarchies
- Robust MOC Creation: Advanced error handling with detailed debugging for folder and file creation
- Improved JSON Parsing: Strengthened AI response processing with better validation
- Comprehensive Error Recovery: Clear, actionable error messages with diagnostic information
- Single Source of Truth: Centralized hierarchy.json file maintains complete knowledge structure
- Faster Hierarchy Lookups: Optimized performance through unified hierarchy management
- Intelligent Conflict Resolution: Automated detection and resolution of hierarchy placement conflicts
- Obsidian (v1.0.0+)
- Node.js (v16+)
- Python (v3.8+)
- Google Gemini API key (Get one free) or OpenRouter API access
-
Download the plugin:
# Clone or download from GitHub git clone https://github.com/surendranb/second-brAIn.git -
Install dependencies:
cd second-brAIn npm install # Set up Python environment for YouTube transcript processing python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt
-
Build the plugin:
npm run build
-
Install in Obsidian:
- Copy the entire folder to
.obsidian/plugins/in your vault - Enable "Community plugins" in Obsidian settings
- Enable "brAIn" in the plugins list
- Copy the entire folder to
-
Choose your AI provider:
- Gemini (Recommended): Go to Google AI Studio for a free API key
- OpenRouter: Visit OpenRouter for access to multiple AI models
-
Configure brAIn:
- Click the brAIn icon in Obsidian's ribbon
- Select your preferred AI provider (Gemini/OpenRouter)
- Enter your API key
- Choose your preferred model (gemini-2.0-flash recommended)
- Set your knowledge organization folder (default: "MOCs")
- Click the brAIn icon in the ribbon
- Select "Create new note from URL"
- Paste any web URL or YouTube link
- Click "Generate Note"
- Watch as brAIn intelligently analyzes, creates, and organizes your knowledge!
- Click the brAIn icon in the ribbon
- Select "Organize existing note"
- Choose a note from the dropdown
- Click "Organize Note"
- Your note gets intelligently integrated into the optimal knowledge hierarchy
Each processed piece of content becomes a structured note with:
- Context & Background: Why this information matters and its broader significance
- Key Facts: Essential information and data points with source verification
- Multiple Perspectives: Different viewpoints, opinions, and stakeholder insights
- Deep Insights: Patterns, connections, implications, and meta-analysis
- Personal Reflection Space: Dedicated areas for your own thoughts and connections
- Analogies & Examples: Clear comparisons and real-world applications
- Questions for Exploration: Curated areas to investigate further
- Actionable Next Steps: Specific, prioritized things you can do
- Knowledge Connections: Intelligent links to related concepts and prerequisites
- Learning Context: Prerequisites, complexity level, estimated reading time
brAIn creates and maintains a context-aware hierarchical Map of Contents (MOC) system:
π Technology (Domain)
π Artificial Intelligence (Area)
π Computer Vision (Topic)
π World Models (Concept)
π Your New Video Note (intelligently placed here)
π Related Existing Notes
π Natural Language Processing (Topic)
π Software Engineering (Area)
- π― Context-Aware Placement: AI understands your existing knowledge structure
- π§ Advanced Error Recovery: Comprehensive debugging and failure recovery
- π Progress Tracking: Detailed status updates throughout processing
- π¨ Customizable Prompts: Tailor the AI analysis to your specific needs
- π Dual-Mode Interface: Seamlessly handle both new URLs and existing notes
- β‘ Optimized Performance: Fast hierarchy lookups and intelligent caching
- π‘οΈ Robust JSON Processing: Native JSON mode support with fallback parsing
- Centralized Knowledge Map: Single hierarchy.json file tracks your complete knowledge structure
- Conflict Detection: Automatically identifies and resolves hierarchy placement conflicts
- Smart Normalization: Handles plurals, similar concepts, and naming variations
- Learning Paths: AI suggests optimal learning progressions through your knowledge
- Comprehensive Logging: Detailed debugging information for troubleshooting
- Modular Architecture: Clean separation of concerns with specialized managers
- Extensible Prompts: External prompt files for easy customization
- TypeScript Support: Full type safety and modern development practices
π Python Script Errors:
- Ensure Python 3.8+ is installed and accessible
- Activate the virtual environment:
source venv/bin/activate - Reinstall dependencies:
pip install -r requirements.txt - Check YouTube transcript extraction permissions
π€ AI API Errors:
- Gemini: Verify your API key at Google AI Studio
- OpenRouter: Check your credits and model access at OpenRouter
- Try switching to a different AI model in settings
- Check API quotas and rate limits
π§ MOC Creation Issues:
- Check the browser console for detailed MOC creation logs
- Verify folder permissions in your vault
- Look for path length limitations on your operating system
- Review hierarchy conflict warnings in console
π± Plugin Loading Issues:
- Ensure the plugin folder is in
.obsidian/plugins/second-brAIn/ - Check that "Community plugins" is enabled in Obsidian
- Look for errors in Developer Console (Ctrl+Shift+I β Console)
- Verify all dependencies are installed with
npm install
β±οΈ Performance Issues:
- Large content may take 30-60 seconds to process
- YouTube videos with long transcripts require additional time
- Check your internet connection and API response times
- Monitor console logs for processing bottlenecks
- π Check the GitHub Issues for known problems
- π¬ Join discussions in GitHub Discussions
- π Enable detailed logging in Developer Console for debugging
- π Include console logs when reporting issues
- π Your API keys are stored locally in Obsidian settings only
- π Content is processed through your chosen AI provider (review their privacy policies)
- πΎ No personal data is stored on external servers beyond API processing
- π All notes and knowledge maps remain in your local Obsidian vault
- π‘οΈ Hierarchy information is stored locally in your vault's hierarchy.json
- Free tier available with generous limits
- Latest models: gemini-2.0-flash, gemini-1.5-pro
- Excellent reasoning for knowledge organization
- Setup: Google AI Studio
- Multiple model access including GPT-4, Claude, and others
- Pay-per-use pricing with transparent costs
- Native JSON mode support for better reliability
- Setup: OpenRouter
We welcome contributions! Areas where you can help:
- π Bug Reports: Detailed issues with console logs
- π‘ Feature Requests: New capabilities and improvements
- π Documentation: Better guides and examples
- π§ͺ Testing: Try edge cases and report findings
- π» Code: PRs for fixes and enhancements
See Contributing Guidelines for details.
- π Real-time Knowledge Sync: Live updates to knowledge maps
- π― Advanced Learning Paths: Personalized knowledge progression
- π Enhanced Cross-References: Deeper semantic linking
- π Knowledge Analytics: Insights into your learning patterns
- π€ Collaborative Features: Shared knowledge hierarchies
MIT License - see LICENSE for details.
Built for knowledge workers who want to learn faster, think deeper, and organize smarter.
Transform your information consumption into intelligent knowledge building with brAIn.