mirror of
https://github.com/algometrix/second_brain_builder.git
synced 2026-07-22 08:29:32 +00:00
Rename plugin to Second Brain Builder
The previous name described the mechanism; the new one describes the outcome: growing a vault into a linked knowledge graph. Plugin id is now second-brain-builder. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e22cc920b7
commit
0b4ba97b33
7 changed files with 23 additions and 23 deletions
|
|
@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||
|
||||
## What This Is
|
||||
|
||||
An Obsidian plugin ("AI Explainer") that generates detailed explanation notes using Claude Code CLI, Gemini CLI, Codex CLI, or a local Ollama server. Users select text in a note, pick a teaching style (mode), and the plugin spawns the CLI to produce a new note or inline enhancement. Desktop only; supports Windows, macOS, and Linux.
|
||||
An Obsidian plugin ("Second Brain Builder") that generates detailed explanation notes using Claude Code CLI, Gemini CLI, Codex CLI, or a local Ollama server. Users select text in a note, pick a teaching style (mode), and the plugin spawns the CLI to produce a new note or inline enhancement. Desktop only; supports Windows, macOS, and Linux.
|
||||
|
||||
## Build Commands
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ This is a single-file plugin. All source code lives in `main.ts` (~3800 lines).
|
|||
- **modes.sample.json** -- committed sample set of general-purpose modes (Explain, Deep Inquiry, Feynman, etc.); the default build input for fresh clones
|
||||
- **modes.config.json** -- optional, gitignored; `{ "modesFile": "<path>" }` points the build at a personal modes file (conventionally `modes.personal.json`, also gitignored)
|
||||
- **styles.css** -- modal and queue UI styles
|
||||
- **manifest.json** -- Obsidian plugin manifest (id: `ai-explainer`)
|
||||
- **manifest.json** -- Obsidian plugin manifest (id: `second-brain-builder`)
|
||||
- **scripts/** -- build helpers and vault fix scripts:
|
||||
- **sync-modes.js** -- prepares `modes.json` before builds (see above); wired into `npm run build` and `npm run dev`
|
||||
- **vault-root.js** -- shared vault path resolution for the fix scripts (first non-flag CLI argument, or `OBSIDIAN_VAULT` env var)
|
||||
|
|
|
|||
14
README.md
14
README.md
|
|
@ -1,4 +1,4 @@
|
|||
# AI Explainer (Obsidian Plugin)
|
||||
# Second Brain Builder (Obsidian Plugin)
|
||||
|
||||
Generate detailed, linked explanation notes from any selection in your vault, powered by an AI CLI (Claude Code, Gemini, or Codex) or a fully local Ollama model. Select text, pick a teaching style, and get a new note wired into your knowledge graph. Desktop only. Works on Windows, macOS, and Linux.
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ Five steps from zero to your first generated note. Each step links to a detailed
|
|||
- macOS / Linux: run `./install.sh`
|
||||
|
||||
The script builds the plugin and finds your vaults automatically. See [Installation](#installation) for the manual route.
|
||||
4. **Enable it in Obsidian:** Settings → Community plugins → turn off Restricted mode → refresh → toggle **AI Explainer** on. If you chose Ollama in step 2, also open Settings → AI Explainer and set the provider to Ollama.
|
||||
4. **Enable it in Obsidian:** Settings → Community plugins → turn off Restricted mode → refresh → toggle **Second Brain Builder** on. If you chose Ollama in step 2, also open Settings → Second Brain Builder and set the provider to Ollama.
|
||||
5. **Generate your first note:** open any note, select a word or phrase, press `Ctrl+P` (macOS: `Cmd+P`), run **"Explain selection with AI"**, and pick the **Explain** mode. A new linked note appears in the same folder.
|
||||
|
||||
If the plugin says it cannot find the CLI, see [Troubleshooting](#troubleshooting); it is almost always a PATH issue with a one-line fix.
|
||||
|
|
@ -101,7 +101,7 @@ All generation runs through a sequential background queue, so you can queue seve
|
|||
|
||||
## Setting Up an AI Backend
|
||||
|
||||
Pick one provider in **Settings → AI Explainer → AI provider**. All four work on Windows, macOS, and Linux.
|
||||
Pick one provider in **Settings → Second Brain Builder → AI provider**. All four work on Windows, macOS, and Linux.
|
||||
|
||||
### Claude Code CLI (default)
|
||||
|
||||
|
|
@ -164,14 +164,14 @@ Then copy `main.js`, `manifest.json`, and `styles.css` into your vault:
|
|||
|
||||
| OS | Typical destination |
|
||||
|---|---|
|
||||
| Windows | `C:\Users\<you>\Documents\MyVault\.obsidian\plugins\ai-explainer\` |
|
||||
| macOS | `~/Documents/MyVault/.obsidian/plugins/ai-explainer/` |
|
||||
| Linux | `~/Documents/MyVault/.obsidian/plugins/ai-explainer/` |
|
||||
| Windows | `C:\Users\<you>\Documents\MyVault\.obsidian\plugins\second-brain-builder\` |
|
||||
| macOS | `~/Documents/MyVault/.obsidian/plugins/second-brain-builder/` |
|
||||
| Linux | `~/Documents/MyVault/.obsidian/plugins/second-brain-builder/` |
|
||||
|
||||
### Enable the plugin
|
||||
|
||||
1. Open **Settings → Community plugins** and turn off Restricted mode if needed.
|
||||
2. Refresh installed plugins and toggle **AI Explainer** on.
|
||||
2. Refresh installed plugins and toggle **Second Brain Builder** on.
|
||||
3. Recommended: assign a hotkey to "Explain selection with AI" under **Settings → Hotkeys**.
|
||||
|
||||
## Note Modes
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
setlocal enabledelayedexpansion
|
||||
|
||||
:: ============================================================
|
||||
:: AI Explainer — Obsidian Plugin Installer (Windows)
|
||||
:: Second Brain Builder — Obsidian Plugin Installer (Windows)
|
||||
:: ============================================================
|
||||
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
|
|
@ -89,7 +89,7 @@ exit /b 0
|
|||
|
||||
:install_vault
|
||||
set "V=%~1"
|
||||
set "DEST=%V%\.obsidian\plugins\ai-explainer"
|
||||
set "DEST=%V%\.obsidian\plugins\second-brain-builder"
|
||||
|
||||
if not exist "%V%\.obsidian" (
|
||||
echo SKIP: %V% — .obsidian folder missing
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
# =============================================================
|
||||
# AI Explainer — Obsidian Plugin Installer (macOS / Linux)
|
||||
# Second Brain Builder — Obsidian Plugin Installer (macOS / Linux)
|
||||
# =============================================================
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
|
@ -43,7 +43,7 @@ install_vault() {
|
|||
return
|
||||
fi
|
||||
|
||||
local DEST="$VAULT/.obsidian/plugins/ai-explainer"
|
||||
local DEST="$VAULT/.obsidian/plugins/second-brain-builder"
|
||||
mkdir -p "$DEST"
|
||||
|
||||
cp "$SCRIPT_DIR/main.js" "$DEST/main.js"
|
||||
|
|
|
|||
10
main.ts
10
main.ts
|
|
@ -401,7 +401,7 @@ const DEFAULT_SETTINGS: ClaudeExplainerSettings = {
|
|||
ollamaModel: "llama3",
|
||||
};
|
||||
|
||||
const LOG_PREFIX = "[AI Explainer]";
|
||||
const LOG_PREFIX = "[Second Brain Builder]";
|
||||
const MAX_LOG_LINES = 500;
|
||||
|
||||
class Logger {
|
||||
|
|
@ -2421,7 +2421,7 @@ class LogViewerModal extends Modal {
|
|||
onOpen() {
|
||||
const { contentEl } = this;
|
||||
contentEl.addClass("ch-modal");
|
||||
setModalTitle(this, "AI Explainer Logs");
|
||||
setModalTitle(this, "Second Brain Builder Logs");
|
||||
|
||||
const btnRow = contentEl.createDiv({ attr: { style: "margin-bottom: 8px; display: flex; gap: 8px;" } });
|
||||
const copyBtn = btnRow.createEl("button", { text: "Copy to clipboard" });
|
||||
|
|
@ -3221,7 +3221,7 @@ export default class ClaudeExplainerPlugin extends Plugin {
|
|||
}
|
||||
|
||||
indexLines.push("---\n");
|
||||
indexLines.push("*Scaffold created by AI Explainer.*\n");
|
||||
indexLines.push("*Scaffold created by Second Brain Builder.*\n");
|
||||
|
||||
const indexPath = normalizePath(`${basePath}/${name}.md`);
|
||||
const existingIndex = this.app.vault.getAbstractFileByPath(indexPath);
|
||||
|
|
@ -4087,7 +4087,7 @@ Rules:
|
|||
// Codex has no system prompt flag in exec mode; prepend it to the stdin prompt.
|
||||
// Its stdout interleaves progress logs with output, so the final message is
|
||||
// captured via --output-last-message instead.
|
||||
codexOutputFile = join(tmpdir(), `ai-explainer-codex-${Date.now()}.md`);
|
||||
codexOutputFile = join(tmpdir(), `second-brain-builder-codex-${Date.now()}.md`);
|
||||
args = [
|
||||
"exec",
|
||||
"--sandbox", "read-only",
|
||||
|
|
@ -4243,7 +4243,7 @@ class ClaudeExplainerSettingTab extends PluginSettingTab {
|
|||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
|
||||
containerEl.createEl("h2", { text: "AI Explainer Settings" });
|
||||
containerEl.createEl("h2", { text: "Second Brain Builder Settings" });
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("AI Provider")
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"id": "ai-explainer",
|
||||
"name": "AI Explainer",
|
||||
"id": "second-brain-builder",
|
||||
"name": "Second Brain Builder",
|
||||
"version": "1.0.0",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Select any word or phrase to generate detailed explanation notes using Claude Code, Gemini, Codex, or a local Ollama model, with multiple teaching styles.",
|
||||
"description": "Grow your vault into a linked knowledge graph: select any word or phrase to generate detailed, wiki-linked explanation notes using Claude Code, Gemini, Codex, or a local Ollama model.",
|
||||
"author": "algometrix",
|
||||
"isDesktopOnly": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "ai-explainer",
|
||||
"name": "second-brain-builder",
|
||||
"version": "1.0.0",
|
||||
"description": "Obsidian plugin to generate explanation notes using Claude Code, Gemini, Codex, or Ollama",
|
||||
"description": "Obsidian plugin that grows your vault into a linked knowledge graph using Claude Code, Gemini, Codex, or Ollama",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"dev": "node scripts/sync-modes.js && node esbuild.config.mjs",
|
||||
|
|
|
|||
Loading…
Reference in a new issue