- Shell 40.3%
- Python 34.3%
- PowerShell 25.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .obsidian | ||
| Obsidian_Clean | ||
| .gitignore | ||
| install_obsidian.ps1 | ||
| install_obsidian.sh | ||
| README.md | ||
Obsidian Dotfiles Installer
A powerful and user-friendly tool to automatically install and sync your Obsidian configuration across multiple vaults. This project provides both Bash and PowerShell scripts for cross-platform compatibility.
🚀 Features
- 🔍 System-Wide Discovery: Automatically finds
.obsidiandirectories across your entire system - 🛡️ Safety First: Creates automatic backups before overwriting existing configurations
- 🎯 Smart Installation: Handles single or multiple vaults intelligently
- 🎨 Beautiful Output: Colored, informative status messages
- ⚡ Cross-Platform: Works on Windows, macOS, and Linux
- 🔧 Flexible Options: Multiple command-line options for different use cases
- 📦 Zero Dependencies: No external dependencies required
- 🌐 Flexible Source: Works from any directory with a
.obsidianfolder
📋 Prerequisites
- Bash (for Linux/macOS) or PowerShell (for Windows)
- Obsidian: At least one Obsidian vault with a
.obsidiandirectory - Source Directory: A
.obsidiandirectory in the current folder to serve as the source
🛠️ Installation
- Clone or download this repository to your local machine
- Navigate to the repository directory
- Make the bash script executable (Linux/macOS only):
chmod +x install_obsidian.sh
📖 Usage
Basic Usage
Bash (Linux/macOS/Git Bash):
# Search entire system and install
./install_obsidian.sh
# Search only current directory
./install_obsidian.sh -l
# Install to specific path
./install_obsidian.sh /path/to/vault/.obsidian
PowerShell (Windows):
# Search entire system and install
.\install_obsidian.ps1
# Search only current directory
.\install_obsidian.ps1 -Local
# Install to specific path
.\install_obsidian.ps1 -TargetPath "C:\path\to\vault\.obsidian"
Advanced Options
Both scripts support the following options:
| Option | Bash | PowerShell | Description |
|---|---|---|---|
| Help | -h, --help |
-Help, -h |
Show help menu |
| Version | -v, --version |
-Version, -v |
Show version info |
| Force | -f, --force |
-Force, -f |
Install without confirmation |
| No Backup | -b, --no-backup |
-NoBackup, -b |
Skip creating backups |
| Quiet | -q, --quiet |
-Quiet, -q |
Suppress non-error output |
| Local | -l, --local |
-Local, -l |
Search only current directory |
| System | -s, --system |
-System, -s |
Search entire system (default) |
Examples
Show help:
./install_obsidian.sh --help
.\install_obsidian.ps1 -Help
Search entire system and force install to all found directories:
./install_obsidian.sh --force
.\install_obsidian.ps1 -Force
Search only current directory:
./install_obsidian.sh --local
.\install_obsidian.ps1 -Local
Install without creating backups:
./install_obsidian.sh --no-backup
.\install_obsidian.ps1 -NoBackup
Quiet mode (suppress output):
./install_obsidian.sh --quiet
.\install_obsidian.ps1 -Quiet
🔧 How It Works
- Source Validation: Verifies you have a
.obsidiandirectory in the current folder - System Discovery: Searches for
.obsidiandirectories across your entire system (or locally if specified) - Smart Filtering: Excludes system directories and limits results for performance
- Backup Creation: Creates timestamped backups of existing configurations
- Installation: Copies your dotfiles from the source to target directories
- Verification: Provides status updates and success confirmations
📁 File Structure
GayKarma/
├── .obsidian/ # Your Obsidian configuration (source)
│ ├── plugins/ # Plugin configurations
│ ├── themes/ # Theme files
│ ├── snippets/ # CSS snippets
│ └── ... # Other Obsidian config files
├── install_obsidian.sh # Bash installer script
├── install_obsidian.ps1 # PowerShell installer script
├── .gitignore # Git ignore rules
└── README.md # This file
🛡️ Safety Features
- Automatic Backups: Creates backups with timestamps before overwriting
- Validation: Checks for required directories and permissions
- Error Handling: Graceful error handling with informative messages
- Smart Filtering: Excludes system directories to prevent conflicts
- Result Limiting: Prevents overwhelming output with too many results
🔍 Troubleshooting
Common Issues
"Source directory '.obsidian' not found in current directory"
- Ensure you have a
.obsidiandirectory in the current folder - The script needs this as the source for installation
"No .obsidian directories found"
- Check that your Obsidian vaults have
.obsidiandirectories - Try using the
-Localoption to search only the current directory - Try specifying a target path manually
Permission denied errors
- Make sure the script is executable:
chmod +x install_obsidian.sh - Check file permissions on target directories
- On Windows, run PowerShell as Administrator if needed
System search is slow
- Use the
-Localoption to search only the current directory - The system-wide search may take time depending on your system size
Getting Help
- Show help menu:
./install_obsidian.sh --help - Check version:
./install_obsidian.sh --version - Review logs: Check the colored output for error messages
🤝 Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
Development
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Obsidian Team for creating an amazing note-taking app
- Open Source Community for inspiration and best practices
- GitHub for providing excellent tools and hosting
📞 Support
If you encounter any issues or have questions:
- Check the troubleshooting section
- Review the help menu:
./install_obsidian.sh --help - Open an issue on GitHub
- Check existing issues for similar problems
Made with ❤️ for the Obsidian community