Apply OpenCode
pendingby Dylan Shade
AI-powered frontmatter enhancement, title generation, content generation, and wiki link identification.
Apply OpenCode
AI-powered note enhancement for Obsidian, using OpenCode CLI.
Features
Frontmatter Enhancement
- Analyzes note content and suggests frontmatter improvements
- Learns from similar notes in your vault to match your existing schema
- Shows diff preview before applying changes
- Never removes existing values - only adds or extends
AI Title Generation
- Generate meaningful 2-5 word titles from note content
- Ribbon icon for quick access
- Optional confirmation modal before rename
- Bulk rename all "Untitled" files at once
Content Generation
- Select text to edit/replace it with AI-generated content
- Or place cursor to append content at that position
- Uses note title, frontmatter, and surrounding context for relevance
- Optional instruction to guide generation (e.g., "summarize", "expand", "add examples")
Wiki Link Identification
- Identify entities in notes that should become wiki links
- Two strategies: existing notes only (instant) or all entities via AI
- Configurable mode: first mention only or all mentions
- Shows diff preview before applying changes
- Smart selection handling: processes selection if present, otherwise full note
- Safety guaranteed: only adds
[[and]]brackets, never modifies content
Base File Generation
- Create Obsidian Base files (.base) from natural language descriptions
- Edit existing Base files with AI assistance
- Uses vault context (folders, tags, properties) for accurate references
- Includes examples from your existing .base files
Canvas Generation
- Create JSON Canvas files (.canvas) from natural language descriptions
- Edit existing Canvas files with AI assistance
- Smart layout rules prevent overlapping nodes
- Uses vault context for accurate file/folder references
Weekly Summary
- Analyze all notes created or modified in the past 7 days
- Generates insights on themes, progress, connections, and open threads
- Creates a new summary note with reflection prompts
- Includes activity statistics by tag, folder, and day
Installation
Using BRAT (Recommended)
- Install BRAT from Community Plugins
- Open BRAT settings and click "Add Beta plugin"
- Enter:
dpshade/apply-opencode - Enable the plugin in Settings > Community plugins
Manual Installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest release - Create folder
.obsidian/plugins/apply-opencode/in your vault - Copy downloaded files into the folder
- Reload Obsidian and enable the plugin in Settings > Community plugins
Requirements
- OpenCode CLI installed and configured
- Default path:
~/.opencode/bin/opencode
Usage
Enhance Frontmatter
- Open a note
- Run command: Apply OpenCode: Enhance note frontmatter
- Review diff and apply changes
Generate Title
- Open a note
- Click the brain icon in the ribbon, or run command: Apply OpenCode: Generate AI title for current file
- File is renamed based on content
Edit or Append Content
- Select text to replace, or place cursor where you want content
- Run command: Apply OpenCode: Edit or append content at selection
- Optionally type an instruction (e.g., "add a conclusion"), or leave empty
- Press Enter to generate
Identify Wiki Links
- Open a note (optionally select specific text)
- Run command: Apply OpenCode: Identify and add wiki links
- Review the diff showing proposed wiki links
- Click on any green line to remove that link
- Click "Apply changes" to add the wiki links
Create Base File
- Run command: Apply OpenCode: Create Obsidian base
- Describe what you want (e.g., "tasks not in Archive folder, grouped by status")
- Choose folder and filename
- Review and save
Create Canvas
- Run command: Apply OpenCode: Create canvas
- Describe what you want (e.g., "project roadmap with phases")
- Choose folder and filename
- Review and save
Weekly Summary
- Run command: Apply OpenCode: This week's summary
- Wait for analysis of recent notes
- New summary note opens with insights
Bulk Operations (Settings)
- Bulk rename untitled files - Rename all files with "Untitled" in the name
- Bulk enhance frontmatter - Add frontmatter to all files missing it
Settings
| Setting | Description |
|---|---|
| Model | OpenCode model for AI operations |
| Executable path | Path to opencode CLI |
| Diff view style | Side-by-side or unified diff |
| Max list items | Limit for array properties (tags, etc.) |
| Note search mode | Algorithm (top 5 scored) or Semantic (all titles) |
| Wiki link strategy | Existing notes only (fast) or All entities via AI (slow) |
| Wiki link mode | First mention only or All mentions |
| Ignored properties | Properties AI should never modify |
| Custom prompt | Additional instructions for enhancement |
| Confirm before rename | Show modal before title rename |
How It Works
- Find similar notes - Scores all notes with frontmatter by superset matching, links, tags, folder, recency
- Extract schema - Builds list of valid properties from top 5 similar notes
- Generate enhancement - Sends note + examples to OpenCode, requests YAML frontmatter
- Merge carefully - Adds new properties, extends arrays, never overwrites existing values
- Review & apply - Shows diff modal for user approval
License
MIT
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.