No description
Find a file
2026-06-13 18:09:34 +01:00
.github/workflows ci: add release workflow with build provenance attestation 2026-06-13 18:04:14 +01:00
src fix(settings): use built-in folder control instead of FolderSuggest 2026-06-13 18:06:23 +01:00
.gitignore chore: add LICENSE, privacy disclosure, and directory-ready manifest description 2026-06-12 13:40:57 +01:00
CLAUDE.md docs: document the release process 2026-06-13 18:06:23 +01:00
esbuild.config.mjs chore: resolve Obsidian plugin review feedback 2026-06-13 17:48:24 +01:00
LICENSE chore: add LICENSE, privacy disclosure, and directory-ready manifest description 2026-06-12 13:40:57 +01:00
main.ts chore: resolve Obsidian plugin review feedback 2026-06-13 17:48:24 +01:00
manifest.json chore: release 0.3.0 2026-06-13 18:09:34 +01:00
package-lock.json chore: release 0.3.0 2026-06-13 18:09:34 +01:00
package.json chore: release 0.3.0 2026-06-13 18:09:34 +01:00
README.md docs: document the release process 2026-06-13 18:06:23 +01:00
styles.css feat: support OpenAI-compatible providers alongside Anthropic 2026-06-13 14:32:24 +01:00
tsconfig.json chore: scaffold Lens plugin 2026-05-30 18:38:36 +01:00
versions.json chore: release 0.3.0 2026-06-13 18:09:34 +01:00

Lens

An Obsidian plugin for thinking about a note through different lenses. Point it at an atomic note (or a text selection) and ask an LLM to Challenge, Steelman, or Concretize the idea. You can also add your own lenses. Results stream into a side panel where you can save a result as its own linked note.

Setup

  1. Install and enable the plugin.
  2. Settings → Lens → Language model: pick a Provider and set its model.
    • Anthropic (Claude) (default): create or select a secret for your API key, stored in Obsidian's secret storage, kept out of your synced settings.
    • OpenAI-compatible: set a base URL, model, and (for hosted services) a key. See Other providers and local models — this is also how you run a model locally with no API key.
  3. Open a note, then open the Lens panel (ribbon icon or command palette → Lens: Open panel).

Use

  • Pick a lens and Apply — the current note (optionally plus one hop of linked notes) is sent to Claude.
  • Save as note saves the result as <Lens> of <Note>.md, linked back to the source and tagged #lens/<lens>.

Other providers and local models

Beyond Anthropic, Lens can talk to any OpenAI-compatible chat API - hosted services like OpenAI, OpenRouter, Groq, or DeepSeek, and local servers like Ollama and LM Studio. Pick OpenAI-compatible as the Provider, then set the Base URL, Model, and (for hosted services) an API key.

Note: These providers return the whole response at once rather than streaming it token-by-token. That's a platform limitation, not a bug: Anthropic can stream directly from Obsidian, but other endpoints are reached through Obsidian's request layer, which doesn't stream.

LM Studio (local, no key)

  1. In LM Studio, download a model and start the local server (Developer → Start Server).
  2. Settings → Lens → Language model:
    • Provider: OpenAI-compatible
    • Base URL: http://localhost:1234/v1
    • API key: leave empty
    • Model: the loaded model's identifier (shown in LM Studio)

No CORS or network setup is needed — Lens reaches local servers through Obsidian's own request layer.

Reasoning models: if a reply comes back empty, the model likely spent the whole token budget thinking before answering. Raise Max response tokens in settings.

Ollama (local, no key)

  1. Install Ollama and pull a model: ollama pull llama3.1.
  2. Settings → Lens → Language model:
    • Provider: OpenAI-compatible
    • Base URL: http://localhost:11434/v1
    • API key: leave empty
    • Model: the name you pulled, e.g. llama3.1

Privacy, local models, and network use

When you apply a lens, Lens sends the active note's content to your configured provider's API. If "Include linked notes" is on (the default), it also sends the text of the notes the active note links to.

  • Requests use your own API key and go directly from your machine to the provider you choose — api.anthropic.com for Anthropic, or the base URL you set for an OpenAI-compatible provider. The plugin has no server and no telemetry; nothing is sent anywhere else.
  • With a local provider (Ollama, LM Studio), your notes never leave your machine.
  • Your key lives in Obsidian's secret storage, kept out of the plugin's data file and your synced settings.
  • See your provider's privacy policy for how it handles data sent to its API — for example, Anthropic's.

Hosted providers charge a small amount per run on your key (cheaper on smaller models); local models are free.

Customizing lenses

Settings → Lens → Perspectives. Each lens has a name, a one-line description, and a prompt. Add lens creates one; the pencil edits and the trash removes. The Shared instructions field is prepended to every lens, so a lens prompt only needs to describe its own angle. Use the restore button to bring back the three defaults. (New or renamed lenses get their command-palette entry after a reload.)

Releasing

Releases are cut by pushing a version tag. A GitHub Actions workflow (.github/workflows/release.yml) then builds the plugin, attaches main.js, manifest.json, and styles.css to the release, and attests their build provenance.

  1. Bump version in both manifest.json and package.json.

  2. Add the new version to versions.json, mapping it to the minimum Obsidian version it requires (e.g. "0.3.0": "1.13.0").

  3. Commit it (chore: release 0.3.0).

  4. Tag with the bare version — no v prefix — and push the tag:

    git tag 0.3.0
    git push origin main 0.3.0
    
  5. The workflow creates the GitHub release with the built assets. Don't create the release by hand — pushing the tag triggers it.

Users can verify a downloaded asset's provenance with, e.g., gh attestation verify main.js --repo fredoliveira/obsidian-lens.