spider

approved

by huangtao

AI chat branches as an interactive knowledge map. Tab to drill down, arrow keys to navigate, structured exports. - This plugin has not been manually reviewed by Obsidian staff.

β˜… 1 stars↓ 236 downloadsUpdated 25d agoMIT

Spider

GitHub release (latest) GitHub downloads License Obsidian min version Status

🌏 Other languages: δΈ­ζ–‡ζ–‡ζ‘£

AI conversations that branch like a spider's web β€” press Tab to spin off a deep-dive from any answer. Explore, compare, and trace back without losing context.

An Obsidian plugin that turns ChatGPT / Claude / DeepSeek / any OpenAI-compatible API into a branching knowledge map. Read an AI answer, hit an unfamiliar term, select the text, press Tab β€” a child node appears, ready for the next question. Infinite depth, instant backtrack, one-click export to Obsidian Canvas / Markdown / Mermaid mindmap.

spider screenshot

🎬 Looking for an animated demo? A GIF should live here β€” record a 5-second Tab-branch interaction, save as .github/demo.gif, and replace the image above. See Recording a Demo for tools.


πŸ€” Why Spider?

ScenarioPlain AI chatSpider
Mid-answer, want to drill into a termCopy-paste β†’ new window β†’ lose the original threadSelect text β†’ Tab β†’ child node carries the context
Want to compare 3 phrasings of the same questionOpen 3 tabs and alt-tabSame parent, 3 children, side-by-side
Done exploring, want it as notesCopy-paste into a note, links breakAdd personal node notes, then export Markdown + Canvas
Want AI to live inside your docs, not a separate tabConstant window switchingStay in Obsidian the entire time

vs Copilot plugin: Copilot is a single-thread chatbot. Spider is a multi-thread knowledge graph β€” same topic, Copilot gives you one line, Spider gives you one tree.


⚑ 30-Second Quick Start

  1. Install: Settings β†’ Community plugins β†’ Browse β†’ search spider β†’ Enable
  2. Configure your API key: Settings β†’ Spider β†’ fill in apiBaseUrl + apiKey + model (any OpenAI-compatible endpoint)
  3. Create your first map: Click the spider ribbon icon (or run command Spider: New map) β†’ start chatting
  4. Try Tab-branching: Select any text in an AI response, press Tab β€” that's it

✨ Features

🌳 Infinite-Depth Branching Chat

  • No depth limit: drill down as deep as you need; the graph grows with you
  • Optional parent context: child node requests automatically include parent title / summary / anchor
  • Streaming responses: typewriter-style real-time rendering with Markdown & code-block highlighting
  • Select-to-branch: highlight any text in an AI response β†’ Tab β†’ the child's "anchor" is that exact highlight
  • Auxiliary actions: retry, summarize, AI auto-title

πŸ•ΈοΈ Interactive Knowledge Graph

  • Full-tab canvas powered by React Flow
  • Click a node to switch context; the chat panel follows automatically
  • Collapse / expand subtrees to keep large maps clean
  • Auto-layout via Dagre algorithm with active-path highlighting
  • Drag nodes β€” positions persist, the canvas looks the way you left it
  • Personal node notes β€” hover the pencil for a preview, click to pin and edit with autosave

πŸ“¦ One-Click Structured Export

Spider Maps/
  β”œβ”€β”€ index.md                  # Obsidian entry-point note
  β”œβ”€β”€ brief.md                  # Findings, open questions, and progress
  β”œβ”€β”€ nodes/                    # One Markdown file per node
  └── map.canvas                # Visual knowledge map
  • Canvas nodes are color-coded by state (purple = root / green = understood / gray = archived / blue = open)
  • Edges carry labels (anchor text or first-question excerpt) with clear arrow directions
  • Markdown files cross-link parent / child / index β€” backlinks wire up the full thinking chain

πŸ”Œ Works with Any OpenAI-Compatible API

  • Official OpenAI (https://api.openai.com/v1)
  • DeepSeek / Moonshot / Qwen / GLM (OpenAI-compatible mode)
  • OpenRouter / Together / Groq (aggregator APIs)
  • Local LLMs: Ollama, vLLM, LM Studio β€” all expose OpenAI-compatible endpoints
  • Anthropic Claude via proxy

πŸ’‘ Because it's the OpenAI Chat Completions spec, you just need a base URL + key + any model name that endpoint supports.

πŸ” Privacy & Network Disclosure

  • The plugin requires network to call AI, but you fully control which endpoint
  • API key stays local (Obsidian's plugin data.json); never uploaded
  • Never reads your vault β€” only sends the current node's messages + optional parent context + optional anchor text
  • Maps are 100% local: stored as .spider/maps/*.json, syncable via Obsidian Sync
  • Offline-capable: knowledge graph, navigation, export, history β€” everything works offline. Only "send message" needs network.

🌐 Bilingual UI

Switch between Chinese and English any time in settings. Export artifacts are intentionally hard-coded to Chinese β€” exports are historical records and shouldn't be retroactively rewritten when the UI language changes.


⌨️ Keyboard Shortcuts

KeyAction
TabWith text selected in an AI response β†’ create child node from that anchor. Without selection β†’ create empty child node.
Shift + TabJump to parent node
← β†’Parent ↔ first child
↑ ↓Move between sibling nodes
EnterSend message (inside composer)
Shift + EnterNewline (inside composer)
EscClear current selection
Delete / BackspaceDelete current node (non-root, focus not in input)

βš™οΈ Settings

SettingDescriptionDefault
API Base URLOpenAI-compatible endpointhttps://api.openai.com/v1
API KeyYour API key (password input, stored locally)β€”
ModelAny model name your endpoint supportsgpt-4o-mini
Interface LanguageChinese / EnglishEnglish
Include parent contextSend parent title/summary/anchor with child requestsβœ… on
Include full contextAlso send parent's full message history (more tokens)❌ off
Stream responsesStream tokens as they arriveβœ… on
Tab to create child nodesEnable the Tab shortcutβœ… on
Auto-summarize nodesAI auto-summarizes each node❌ off
Default export folderWhere export packages goSpider Maps

πŸ“₯ Installation

From Community Plugin Store (recommended)

  1. Obsidian β†’ Settings β†’ Community plugins
  2. Turn off Safe mode (if it's on)
  3. Browse β†’ search spider β†’ Install β†’ Enable
  4. Settings β†’ Spider β†’ fill in your API key and model

From Source (development)

git clone https://github.com/111pointer111/spider
cd spider
npm install
npm run build
# Copy main.js, manifest.json, styles.css into
# <vault>/.obsidian/plugins/spider/
# Then enable the plugin in Obsidian

Or use npm run link to symlink the build output to your vault and pair with npm run dev for live-reload during development.


πŸ›  Development

npm install        # install dependencies
npm run dev        # watch mode (esbuild)
npm run build      # production build (runs tsc --noEmit first)
npm test           # run vitest tests
npm run link       # symlink build output into your vault

Project Structure

src/
  ai/          OpenAI-compatible API provider (streaming + sync + summarize)
  domain/      ChatMap immutable factories + tree ops + guards + Dagre layout
  export/      Markdown / Mermaid / Canvas / JSON exporters
  state/       Multi-view session store + per-session ViewState
  storage/     Vault JSON persistence (backward-compatible with old directory)
  ui/          React components (graph, chat panel, gallery, modals)
  utils/       ID generation, path handling, activeDocument shim
tests/         vitest unit tests (domain + export + AI layers)
__mocks__/     Obsidian API stub for vitest

πŸŽ₯ Recording a Demo

🎬 Want to contribute a demo GIF?

  1. Record 5–10 seconds with Kap (macOS) / ScreenToGif (Windows) / ffmpeg (Linux)
  2. Show: open spider β†’ ask a question β†’ select text in AI response β†’ press Tab β†’ child node appears β†’ continue asking
  3. Export as GIF, save to .github/demo.gif
  4. Open a PR; we'll swap the static screenshot above for ![spider demo](.github/demo.gif)

🧭 Roadmap (running list)

  • Full-text node search (Ctrl/Cmd+F inside the canvas)
  • Multi-select nodes + batch operations
  • Node backlinks (auto-track "which nodes reference me")
  • Custom system prompts
  • Optional AI summary attached to export package

πŸ“œ License

MIT


πŸ™ Credits

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.