README file from
GithubLina (ALPHA)
AI-powered note assistant and hybrid search engine for Obsidian. Features local indexing, semantic search, contextual slash commands, and privacy-first AI analysis.
User Manual | Commands Guide | Changelog | Roadmap
Overview & Key Features
Lina helps you find, connect, and enrich Markdown notes in Obsidian without taking control away from you.
Start locally: Lina works immediately with local text search. No AI provider or API key is required to get started. AI providers are optional and enable semantic search and AI-assisted features.
- 🔍 Hybrid Search: Combines fast local text indexing with semantic vector embeddings into a single ranked list.
- ⚡ Contextual Slash Commands: Execute
/ask(AI note query),/tags(smart tag suggestions), and/yaml(frontmatter generation) directly from the sidebar input. - 🔒 Privacy First: All indexing data is stored locally in
.lina/index/. Zero network requests by default. Remote AI providers are contacted only when explicitly configured and triggered. - 🛡️ Explicit Confirmation: AI responses, tag additions, and YAML fields are applied to active notes only after your explicit confirmation.
- 📱 Mobile & Sync Friendly: Memory-aware safeguards for mobile devices (validated on Android) with opt-in binary shadow sets and Syncthing support.
Quickstart & Installation
Option 1: Manual Installation
- Download
manifest.json,main.js, andstyles.cssfrom the latest release. - Create the directory
<Vault>/<configDir>/plugins/lina/(where<configDir>is your vault's Obsidian config directory, default.obsidian). - Copy the downloaded files into that folder.
- Enable Lina under Obsidian Settings > Community Plugins.
Option 2: Community Plugins
Search for Lina in Obsidian Community Plugins once officially listed.
First-Time Indexing Note:
When installed for the first time, Lina does not auto-build the full index. Open the Lina side panel and click Rebuild Index (or run the rebuild index command). Once a valid index exists, Lina keeps it updated automatically in the background.
Features & Side Panel
The Lina panel lives in Obsidian's right sidebar. It serves as your search interface and AI assistant hub.
Search Modes
- Hybrid (Recommended): Combines text (default weight
0.7) and semantic similarity (default weight0.3). - Text: Fast local search by note title, path, or content. Supports exact, prefix, and substring matching.
- Semantic: Meaning-based search powered by vector embeddings. Requires generated embeddings.
Contextual Slash Commands (/ask, /tags, /yaml)
Type a slash command in the sidebar input to interact with your notes using AI:
/ask <prompt>: Queries the configured AI provider about the active note context. Insert responses below selection, replace selection, or append to note after confirmation./tags: Asks AI to suggest tags for the context. Displays checkboxes to apply non-duplicate tags with confirmation./yaml: Asks AI to suggest frontmatter fields. Displays checkboxes to safely apply new fields without overwriting existing data.
Context Selection Order:
- Selected text in active Markdown editor.
- Preserved selection captured from the active note (if focus shifted to panel).
- Active note content.
[!NOTE] All slash commands recheck context against configured path and term exclusions before contacting an AI provider.
AI Providers & Model Configuration
Lina allows separate provider and model configurations for Analysis AI (Chat/LLM) and Embeddings.
| Provider | Type | Embeddings | Chat / Analysis | Recommended / Default Models |
|---|---|---|---|---|
| Ollama | Local | ✅ | ✅ | Embeddings: nomic-embed-text-v2-moeChat: gemma4:e2b |
| Mistral | Remote (API) | ✅ | ✅ | Embeddings: mistral-embedChat: mistral-small-latest |
| OpenRouter | Remote (API) | ❌ | ✅ | Chat: Configurable model |
Configuration Details
- Base URLs: Automatically populated for Ollama (
http://localhost:11434), Mistral (https://api.mistral.ai/v1), and OpenRouter (https://openrouter.ai/api/v1), customizable. - Model Selection: For Ollama and Mistral, select a catalog model from the dropdown or select
Manual/custom model...to reveal a text field for custom model identifiers. OpenRouter uses a permanent free-text input field. - API Keys: Per-device structure. Keys start empty and require explicit save or clear actions.
- Batch Size: Configurable (1–50) for native batching with Mistral and modern Ollama (
/api/embed). Legacy Ollama endpoint fallback processes 1 item per request.
Mobile & Multi-Device (Syncthing)
Desktop Producer & Mobile Companion Architecture
isDesktopOnly: false. Manually validated on Desktop (Windows) and Android (Samsung Galaxy S23 Ultra, One UI 8.5, 8 GB RAM).- DeviceCapabilities Enforcement: Desktop acts as the Producer (watching vault changes, maintaining the text index, diffing/generating embeddings, and compiling binary copies). Mobile acts as the Companion (reading synchronized artifacts for fast local text, semantic, and hybrid search without local write watchers or compilation loops).
- Memory safeguards prevent dangerous allocations on mobile (16MB vector limit / 64MB peak memory). If embeddings exceed budgets, Lina reports
no-safe-sourceand falls back cleanly to text search.
Recommended Syncthing Workflow ("Desktop Producer / Mobile Companion")
- Desktop Producer: Generate the text index and canonical
embeddings.jsonlon desktop. Optionally maintain the binary shadow copy (embeddings.vectors.f32). - Sync Vault: Sync the
.lina/index/directory to your mobile device via Syncthing. - Mobile Companion: Mobile syncs the pre-built index and validates publication integrity, enabling instant local search and AI features without battery-draining indexing overhead.
For full .stignore rules and step-by-step instructions, see the Syncthing Guide in the User Manual.
Experimental Binary Embedding Storage
An opt-in derived shadow copy (embeddings.binary.manifest.json, embeddings.meta.jsonl, embeddings.vectors.f32) is available for advanced users:
- Canonical Source:
.lina/index/embeddings.jsonlremains the source of truth. - Preference:
maintainBinaryEmbeddingCopy(default off) andembeddingStorageReadPreference(prefer-binary). - Safety: Binary is accepted only when all three files are valid and match the canonical
publicationId. Falls back safely to JSONL or text search.
Privacy & Local Data Storage
- Data Path: Local index operational data is stored strictly in
.lina/index/. - No Web Storage: Lina does not use
localStorageorsessionStorage. Settings use Obsidian'sloadData/saveDataAPIs. - Network Boundaries: Zero network traffic by default. External APIs are called only when you explicitly configure a remote provider and run an action.
Support and feedback
If you experience difficulties, find a bug, or have a suggestion, you can contact us through:
Contact details are only used to respond to the matter submitted and are not shared with third parties.
Development
Contributions are welcome. Lina uses automated validation to keep changes reliable.
# Install dependencies
npm ci
# Run the development build
npm run dev
# Validate a change
npm run lint
npm test
npm run build
Before preparing a release, run:
npm run release:validate
The same checks run in CI before release publishing.