terraphim / terraphim/terraphim-ai

Obsidian community plugin: WASM-powered semantic search

Open
#606 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
62
Forks
5
Avg merge
2h 27m
Merged PRs (30d)
1

Description

Summary

Obsidian community plugin that provides deterministic semantic search powered by terraphim's Aho-Corasick automata, compiled to WASM and running entirely in Obsidian's Electron runtime. Zero network, zero LLM, zero API key.

Architecture

Obsidian Plugin (TypeScript)
    |
    v
@terraphim/autocomplete (WASM)  <-- already exists as npm package
    |
    v
terraphim_automata (Rust -> WASM)  <-- already compiles to wasm32
    |
    v
User's vault (markdown files)

Existing WASM Infrastructure

  • terraphim_types has typescript + wasm features (tsify + wasm-bindgen)
  • terraphim_automata has typescript + wasm features
  • terraphim_ai_nodejs exists as Node.js native bindings
  • @terraphim/autocomplete is published on npm

Plugin Features

Core
  • Command palette: "Terraphim: Search concepts" -- type a term, get synonym-expanded results
  • Sidebar panel: persistent search with result list linking to vault files
  • Status bar: concept count and last build timestamp
Configuration
  • Settings tab:
    • Vault path (auto-detected)
    • Format: obsidian (default) / logseq / terraphim
    • Synonym property name (default: aliases for obsidian, synonyms for logseq)
    • Rebuild trigger: on file change / manual / on startup
    • Custom KG directory (optional, for dedicated concept files)
Integration
  • Clicking a search result opens the file in Obsidian
  • Results show: concept name, matched synonym, file path, relevance score
  • Works with Obsidian's aliases: frontmatter natively (#604)
  • Respects .obsidian/ exclusions

Development Plan

  1. Scaffold Obsidian plugin with obsidian-sample-plugin template
  2. Bundle @terraphim/autocomplete WASM module
  3. On startup: walk vault files, build thesaurus from aliases: + synonyms:: + #tags
  4. Register command palette action for search
  5. Register sidebar panel for persistent search
  6. File watcher for incremental thesaurus rebuild
  7. Settings UI

Submission to Community Registry

Affected Crates / Packages

  • terraphim_automata (ensure WASM build is up to date)
  • terraphim_ai_nodejs (may need to update WASM bindings)
  • New repo or directory: terraphim-obsidian-plugin

Estimated Effort

~2 days (scaffolding + WASM integration + settings + testing)

Dependencies

  • #604 Obsidian format parser (parse aliases: and wikilinks)

Part of

Epic #603

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the obsidian-sample-plugin template and inspect the published @terraphim/autocomplete package, the existing WASM features, and dependency #604. Map the planned vault scanning, search UI, settings, and file-watcher work before implementation. Done includes the required manifest.json, versions.json, main.js, tests, and an offline plugin suitable for registry submission.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, typescript, wasm
Domain
desktop-dev, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.