Smart Export
approvedby Iván Sotillo
Plugin that follows wikilinks to a configurable depth, joining the notes into a single export.
Smart Export
Smart Export follows links from a root note, builds a note tree, and exports it in formats that work well for both humans and LLMs.
1 Installation
1.1 BRAT (current installation method)
Use BRAT (Beta Reviewers Auto-update Tool):
- In Obsidian, open Settings → Community plugins → Browse and install BRAT.
- Open BRAT settings and click Add a beta plugin.
- Paste:
https://github.com/LittleHaku/obsidian-smart-export - Select the latest release.
1.2 Community plugins (when available)
- Open Settings → Community plugins.
- Turn off Restricted mode.
- Click Browse, search for Smart Export, then install and enable it.
2 Quick Start
- Open command palette (
Cmd/Ctrl+P) and runSmart Export: Open export(or click the ribbon icon). - Select a root note.
- Set depth values (recommended start: content
2, title4). - Choose output format.
- Click Export to clipboard or Export to new note.
Export to new note prompts for a vault-relative folder and note name, then creates the Markdown note using your default folder/open preferences from settings.
3 Features
- Smart note discovery using breadth-first traversal.
- Link direction modes: outgoing, incoming, or both.
- Dual depth controls:
- content depth (full content)
- title depth (title-only context)
- Folder exclusion (
Ignored folders) for traversal with comma-separated wildcard/path patterns. - Tag/property exclusion rules for traversal (
Hide notes with tags,Hide notes with property rules). - Output formats: XML, Markdown templates, Print-friendly Markdown.
- Multiple Markdown templates (built-in + custom folder templates) with placeholder support.
- Export delivery options: copy to clipboard or create a new note in the vault after choosing folder and note name.
- Markdown-based exports rewrite links to exported notes into Obsidian heading links so they stay navigable inside the generated note.
- Token estimate display before export.
4 Settings
Settings location: Obsidian → Settings → Smart Export
4.1 Export defaults
- Default content depth:
1-20 - Default title depth:
1-20 - Default output: XML, print-friendly Markdown,
LLM-ready, or your custom templates - Default export target: clipboard or new note
- Default link direction
- Default export note folder: vault-relative folder for new export notes (leave empty to use the source note folder)
4.2 Traversal exclusions
- Ignored folders: comma-separated folders/patterns (for example
templates, assets*, /archive) excluded from traversal/export. Leading/anchors to vault root. - Hide notes with tags: comma-separated tag patterns (for example
archive*, #draft, projects/*/old) excluded from traversal/export. - Hide notes with property rules: comma-separated rules using
keyorkey=value(for examplestatus=done, published=true, archived) excluded from traversal/export.
4.3 Markdown templates
- Markdown template folder: vault-relative folder for custom Markdown templates, with folder autocomplete
4.4 Export modal behavior
- Auto-select current note
- Close modal after export
- Open created export note
- Show per-note token estimates
Exclusion details (folders/tags/properties): Exclusion rules
4.5 Markdown templates
For Markdown template exports, Smart Export can load a custom template from your vault:
- Choose a template folder in Settings → Smart Export → Markdown template folder.
- Create one or more
.mdnotes in that folder. - Add placeholders from template docs to those notes.
Default folder: smart-templates (you can change it).
Template selection:
- In the export modal, use the Output dropdown.
- It includes XML, print-friendly Markdown, and Markdown template options.
- Markdown template options include built-in templates and templates found in your configured folder.
- Built-in templates are always available as fallback.
Default recommendation:
- In settings, the built-in option shown is LLM-ready.
- This template is the recommended baseline because it includes structured guidance text for prompt/context ingestion.
- Additional templates like
compactare provided as examples for users who want starting points.
Resolution order (only when no explicit template is selected / templateId is omitted):
<template-folder>/llm-markdown.md- first
.mdfile in<template-folder>(alphabetical path order) - built-in default template if no custom template is found via the above rules
Placeholder reference: templates/README.md
{{metadata_yaml}} includes the full YAML block with --- delimiters and keys like
export_timestamp, starting_note, total_notes_exported, and missing_notes_count.
5 Keyboard Shortcut
- Primary command:
Smart Export: Open export - Quick command:
Smart Export: Quick export current note(uses default settings and follows your configured default export target) - Assign your own shortcut in Settings → Hotkeys.
6 Documentation
- Documentation index
- API reference
- Exclusion rules
- Export architecture
- Startup process
- Versioning and releases
- Template placeholders
- Contributing guide
- Roadmap and feature backlog (GitHub Issues)
7 Example Output
7.1 XML (excerpt)
<obsidian_export>
<metadata>
<starting_note>Machine Learning</starting_note>
<total_notes_exported>5</total_notes_exported>
</metadata>
</obsidian_export>
7.2 LLM Markdown (excerpt)
# Smart Export Vault
- Starting Note: Machine Learning
- Total Notes: 5
8 Troubleshooting
8.1 Empty export or missing notes
- Ensure the root note exists.
- Ensure links resolve to real notes.
- Check that excluded folders are not filtering expected notes.
8.2 Export too large
- Use Export to new note to avoid clipboard limits for large exports.
- Set Default export target to
New noteif your quick-export hotkey should create files instead of using the clipboard. - Lower content/title depth.
- Switch to Print-friendly Markdown.
- Start from a more specific root note.
9 Contributing
See CONTRIBUTING.md.
Quick setup:
git clone https://github.com/LittleHaku/obsidian-smart-export.git
cd obsidian-smart-export
pnpm install
pnpm run dev
Benchmark:
pnpm benchmark
10 Support
- Star the repo.
- Report bugs and request features in GitHub Issues.
- Support development: Buy me a coffee.
11 License
MIT License. See LICENSE.
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.