Bases: User-defined scripted views inside notes

Allow an opt-in scripted Bases view/block that consumes results from the native Bases query engine and lets the user transform and render them programmatically.

Conceptually:

Vault
  ↓
Obsidian/Bases index + query/filter engine
  ↓
matching Base rows
  ↓
user script
  ↓
custom rendered output

For example:

```basejs
// receive/query native Bases results
// transform them with JavaScript
// render custom output
```

The script would not need its own vault index or query system. Bases would remain responsible for querying, filtering, sorting, and reacting to underlying data changes. The script would provide the final transformation/rendering layer.

Ideally it could:

  • consume the result set of a Base/view/filter

  • access current-note context

  • transform results with JavaScript

  • render Markdown/HTML or another supported output format

  • update when the underlying Bases results change

A sandboxed or otherwise explicitly trusted implementation would also be reasonable rather than unrestricted JavaScript by default.

How this differs from existing requests

Related requests cover adjacent pieces:

  • JavaScript-defined Bases formulas → programmable individual values

  • custom formula functions → plugin-provided formula extensions

  • programmatic Bases query access → plugins/scripts obtaining query results

  • custom Bases views → reusable views distributed as plugins

This request is specifically for ad-hoc, note-local programmable rendering backed by the native Bases query engine without requiring a full plugin.

Current workaround

**Use DataviewJS
**
DataviewJS provides the lightweight workflow, but requires Dataview and its separate query/indexing system. **

Implement and install a plugin that registers a custom Bases view.**

Custom Bases views already provide programmable rendering over Bases data, but are designed for reusable plugin functionality rather than small, note-local or vault-local scripts.