Lock and Find is a plugin for Obsidian that helps you quickly locate and lock content within your notes.
Hint. You protect your data from others...
This plugin is built with TypeScript and utilizes the Obsidian plugin API.
- Dual Mode Operation: Switch between automatic PII scanning and manual text search
- Drag & Drop Interface: Easily select sensitive information by dragging items to the encryption area
- Text Selection Support: Select text directly in your notes and drag it for encryption
- Sidebar Integration: Opens in the left sidebar for easy access while working
- Secure Encryption: Uses modern cryptographic standards to protect your sensitive data
- Password Management: Secure password storage with hashing for repeated use
- Real-time Status: Visual feedback during scanning and encryption operations
- Customizable Settings: Configure PII patterns and plugin behavior
- Memory Efficient: Optimized event handling prevents memory leaks
- Open Obsidian Settings
- Navigate to Community Plugins and disable Safe Mode
- Click Browse and search for "Lock and Find"
- Install the plugin and enable it
- Download the latest release from the GitHub releases page
- Extract the files to your vault's plugin folder:
<vault>/.obsidian/plugins/obsidian-lock-n-find/ - Reload Obsidian
- Enable the plugin in the Community Plugins settings
- Click the Lock and Find icon in the ribbon menu to open the sidebar
- Choose between Scan Mode (automatic PII detection) or Search Mode (manual text search)
- In Scan Mode: Click "Scan Vault" to automatically detect sensitive information
- In Search Mode: Enter your search term and click "Search"
- Drag and drop items to the encryption area or manually select text from your notes
- Click "Lock Selected" to encrypt the sensitive information
Scan Mode: Automatically detects potentially sensitive information using predefined patterns:
- Personal identification numbers
- Email addresses
- Phone numbers
- Credit card information
- Custom patterns you define
Search Mode: Manually search for specific text strings:
- Find all instances of specific words or phrases
- Case-sensitive or case-insensitive search
- Search across your entire vault
Encrypt (Lock):
- Drag items from the results list to the drop area
- Select text in your notes and drag it to the drop area
- Click "Lock Selected" to encrypt all items
- Password is securely hashed and stored for convenience
Decrypt (Unlock):
- Click "Unlock All" to decrypt all encrypted content in your vault
- Uses the same password from encryption
- Processes all markdown files automatically
The plugin can be configured through the settings tab:
- Open Obsidian Settings
- Navigate to Plugin Options
- Select "Lock and Find"
Available settings include:
- Case sensitivity: Toggle case-sensitive searching
- Highlight color: Customize the color used for highlighting matches
- Lock duration: Set how long content remains locked
- Search scope: Configure which parts of your vault are searched
This plugin includes optional features that may fetch resources from the internet. These features are disabled by default and only activate when explicitly configured by the user:
- Import patterns from URL: Allows downloading PII detection patterns from remote JSON files
- Sync with GitHub Gist: Enables synchronization of patterns with GitHub Gists
- Auto-update patterns: Periodically updates patterns from a configured URL
All network requests are made using Obsidian's built-in requestUrl API. The plugin does not transmit any of your vault content or personal data to external servers. Network features are only used to download pattern definitions to enhance PII detection capabilities.
- Plugin doesn't appear in the ribbon: Make sure the plugin is enabled in the Community Plugins settings
- Search results are not accurate: Check your search settings and try adjusting the case sensitivity option
- Plugin conflicts with other search plugins: Disable other search plugins temporarily to identify conflicts
If you encounter any bugs or issues:
- Check the console for error messages (Ctrl+Shift+I)
- Visit our GitHub Issues page to report the problem
- Include details about your Obsidian version and operating system
- Clone this repository
- Make sure your NodeJS is at least v16 (
node --version) - Run
npm ioryarnto install dependencies - Run
npm run devto start compilation in watch mode - Copy the output files to your Obsidian plugins folder or create a symbolic link
This project follows modern development practices:
- Memory Management: Proper event listener cleanup to prevent memory leaks
- Error Handling: Consistent error logging and user feedback
- Constants: Named constants for timeouts and configuration values
- TypeScript: Full type safety throughout the codebase
- ESLint: Code quality enforcement (
eslint main.tsoreslint ./src/)
For plugin maintainers, to release a new version:
- Update
manifest.jsonwith the new version number and minimum Obsidian version - Update
versions.jsonwith"new-plugin-version": "minimum-obsidian-version" - Run
npm version [patch|minor|major]to automatically update version numbers - Create a GitHub release with the exact version number (no 'v' prefix)
- Upload
manifest.json,main.js, andstyles.cssas binary attachments - Publish the release
Note: The
manifest.jsonfile must be included both in the repository root and in the release.
This project is licensed under the MIT License - see the LICENSE file for details.
