Skip to content

Commit 720ee31

Browse files
release(version): Release 2.12.0 [skip ci]
# [2.12.0](2.11.0...2.12.0) (2026-03-05) ### Bug Fixes * **capture:** preserve canvas tab indentation on configured writes ([#1125](#1125)) ([0a1578e](0a1578e)) * disallow capture targets with .base extension ([cb39ed4](cb39ed4)) * **field-suggestions:** opt-in inline values from fenced code blocks ([#1128](#1128)) ([8597905](8597905)) * **gui:** preserve modal edit position during settings reload ([#1132](#1132)) ([11bda19](11bda19)) * **gui:** reduce ai settings modal reload churn ([#1134](#1134)) ([ae0f7a1](ae0f7a1)) * **gui:** reduce choice builder reload churn ([#1136](#1136)) ([818272a](818272a)) * **gui:** reduce macro settings modal reload churn ([#1135](#1135)) ([a1a6271](a1a6271)) * harden existing-tab matching and document issue workflow ([#1108](#1108)) ([7b12d3b](7b12d3b)) * make template path resolution deterministic ([3297d54](3297d54)) * normalize capture title for non-markdown targets ([964d672](964d672)) * preserve capture-format spacing for insert-at-end ([#1119](#1119)) ([8bb8ed4](8bb8ed4)) * preserve explicit capture target file extensions ([57e43ff](57e43ff)) * preserve insert-at-end order for non-newline captures ([#1120](#1120)) ([e7cbbf2](e7cbbf2)) * resolve template file-name paths without duplicate default folder ([7bfd41b](7bfd41b)) * resolve vault-relative template paths using root folders ([81216de](81216de)) ### Features * add AI request logging API and reduce assistant log noise ([#1110](#1110)) ([2c36800](2c36800)) * automate docs version snapshot during release ([#1111](#1111)) ([1571846](1571846)) * **capture:** fully support capture into canvas cards ([#1124](#1124)) ([a53f889](a53f889)) * **cli:** add native QuickAdd Obsidian CLI handlers ([#1129](#1129)) ([8102d47](8102d47)) * **format:** support mapped VALUE suggester display text ([#1127](#1127)) ([b8ec56c](b8ec56c)) * **macro:** add editor cursor navigation commands ([101d5f6](101d5f6)) * support .base template files for template choices ([11e6490](11e6490)) ### Reverts * **gui:** remove modal reload refactor series ([#1137](#1137)) ([3ba1a73](3ba1a73)), closes [#1136](#1136) [#1135](#1135) [#1134](#1134) [#1133](#1133) [#1132](#1132)
1 parent 3ba1a73 commit 720ee31

53 files changed

Lines changed: 5356 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
title: AI Assistant
3+
---
4+
5+
# AI Assistant
6+
7+
The AI Assistant in QuickAdd leverages the power of Large Language Models (LLMs) to act as your personal AI assistant within Obsidian. It can streamline your workflows by automating routine tasks and providing intellectual support. To use this feature, you need the QuickAdd plugin and a provider you'd like to use.
8+
9+
## How to Setup the AI Assistant
10+
11+
To set up the AI Assistant, follow these steps:
12+
13+
1. In Obsidian, create a new folder dedicated to AI prompt templates, e.g. `bins/ai_prompts`.
14+
2. Navigate to QuickAdd settings and locate the "AI Assistant" section. Specify the path to the folder you created in step 1.
15+
3. In the same section, add a provider to get started. If you are using OpenAI, you will need to add your API key to the settings. As of v1.8.x, you need to enter your API key in the [provider](#providers) settings. The video below is from an older version, but the process is the similar.
16+
17+
![AI Assistant Setup](./Images/AI_Assistant_Setup.gif)
18+
19+
That's really it. You're now ready to use the AI Assistant.
20+
21+
The basic idea is that you set up a QuickAdd Macro, which will trigger the AI Assistant.
22+
The AI Assistant will then use the prompt template you specify to generate a prompt, which it will then send to your selected provider.
23+
The provider will then return a response, which the AI Assistant passes on to the QuickAdd Macro.
24+
You can then use the response in subsequent steps in the macro, e.g. to capture to a note, or create a new note.
25+
26+
**Creating prompt templates is simple: just create a note in your prompt templates folder.**
27+
28+
Creating prompt templates is as simple as creating a note within your prompt templates folder. These templates can utilize QuickAdd's [Format Syntax](./FormatSyntax.md) or [Inline Scripts](./InlineScripts.md).
29+
30+
Here's an example of how you can set up a prompt template:
31+
32+
![AI Assistant Macro](./Images/AI_Assistant_Macro.gif)
33+
34+
You can also use AI Assistant features from within the [API](./QuickAddAPI.md).
35+
36+
## Providers
37+
38+
QuickAdd supports multiple providers for LLMs.
39+
QuickAdd works with OpenAI-compatible APIs and also supports Google Gemini.
40+
41+
Here are a few providers that are known to work with QuickAdd:
42+
43+
- [OpenAI](https://openai.com)
44+
- [Gemini (Google AI)](https://ai.google.dev)
45+
- [TogetherAI](https://www.together.ai)
46+
- [Groq](https://groq.com)
47+
- [Ollama (local)](https://ollama.com)
48+
49+
Paid providers expose their own API, which you can use with QuickAdd. Free providers, such as Ollama, are also supported.
50+
51+
By default, QuickAdd will add the OpenAI and Gemini providers. You can add more providers by clicking the "Add Provider" button in the AI Assistant settings. This now opens a preset picker with common providers (OpenAI, Gemini, Groq, Together, OpenRouter, etc.). Select or create a SecretStorage entry for your API key and click Connect to add the provider. You can also add a custom provider.
52+
53+
QuickAdd stores provider API keys in Obsidian's SecretStorage. The provider settings only keep the secret name, not the key itself.
54+
Existing provider API keys are migrated into SecretStorage automatically.
55+
56+
Here's a video showcasing adding Groq as a provider:
57+
58+
<video controls style={{width: "100%"}}>
59+
60+
<source src="https://github.com/chhoumann/quickadd/assets/29108628/493b556a-a8cd-4445-aa39-054d379c7bb9" type="video/mp4"/>
61+
</video>
62+
63+
### Local LLMs
64+
65+
You can use your own machine to run LLMs. This is useful if you want to keep your data private, or if you want to use a specific model that isn't available on the cloud.
66+
To use a local LLM, you need to set up a server that can run the model.
67+
You can then add the server as a provider in QuickAdd.
68+
69+
One such server is [Ollama](https://ollama.com). Ollama is a free, open-source, and self-hosted LLM server. You can set up Ollama on your own machine, and then use it as a provider in QuickAdd.
70+
You can find the [quick start documentation here](https://github.com/ollama/ollama/blob/main/README.md#quickstart).
71+
Ollama binds to the port `11434` ([src](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network)), so your provider settings would be as follows:
72+
73+
```
74+
Name: Ollama
75+
URL: http://localhost:11434/v1
76+
API Key secret: (empty)
77+
```
78+
79+
And that's it! You can now use Ollama as a provider in QuickAdd.
80+
Make sure you add the model you want to use. [mistral](https://ollama.com/library/mistral) is great.
81+
82+
### Gemini (Google AI)
83+
84+
Gemini is supported out of the box.
85+
86+
```
87+
Name: Gemini
88+
URL: https://generativelanguage.googleapis.com
89+
API Key secret: (AI Studio API key)
90+
Models (add one or more):
91+
- gemini-1.5-pro (Max Tokens: 1000000)
92+
- gemini-1.5-flash (Max Tokens: 1000000)
93+
- gemini-1.5-flash-8b (Max Tokens: 1000000)
94+
```
95+
96+
Notes:
97+
98+
- Use only supported parameters for Gemini (temperature, top_p). Frequency/presence penalties are not sent to Gemini.
99+
- Make sure "Disable AI & Online features" is turned off in QuickAdd settings to enable requests.
100+
101+
### Importing and syncing models
102+
103+
- Use the **Model source** dropdown inside each provider to choose where QuickAdd discovers models: your provider's `/v1/models` endpoint, the public models.dev directory, or an automatic mode that tries the provider first and falls back to models.dev.
104+
- The "Browse models" button pulls from whichever source you selected, letting you search and multi-select models even for custom OpenAI-compatible endpoints that models.dev does not list.
105+
- Choose Add-only to merge or Replace to overwrite the provider's model list.
106+
- Enable Auto-sync to keep your model list updated; use Sync now for a manual refresh. Auto-sync honors the same model source you picked.
107+
108+
## AI Assistant Settings
109+
110+
Within the main AI Assistant settings accessible via QuickAdd settings, you can configure the following options:
111+
112+
- Providers: Configure provider endpoints and API key secrets (SecretStorage).
113+
- Prompt Templates Folder: The location where all your prompt templates reside.
114+
- Default model: The default OpenAI model to be used.
115+
- Show Assistant: Toggle for status messages.
116+
- Default System Prompt Template: Sets the behavior of the model.
117+
118+
For each individual AI Assistant command in your macros, you can set these options:
119+
120+
- Prompt Template: Determines the prompt template to use.
121+
- Model: Specifies the OpenAI model to use, overriding the default model.
122+
- Output Name Variable: Sets the variable name for the AI Assistant’s output.
123+
- System Prompt Template: Determines the models behavior, overriding the default system prompt template.
124+
125+
You can also tweak model parameters in advanced settings:
126+
127+
- **temperature:** Allows you to adjust the sampling temperature between 0 and 2. Higher values result in more random outputs, while lower values make the output more focused and deterministic.
128+
- **top_p:** This parameter relates to nucleus sampling. The model considers only the tokens comprising the top 'p' probability mass. For example, 0.1 means only tokens from the top 10% probability mass are considered.
129+
- **frequency_penalty:** A parameter ranging between -2.0 and 2.0. Positive values penalize new tokens based on their frequency in the existing text, reducing the model's tendency to repeat the same lines. (Not applicable to Gemini.)
130+
- **presence_penalty:** Also ranging between -2.0 and 2.0, positive values penalize new tokens based on their presence in the existing text, encouraging the model to introduce new topics. (Not applicable to Gemini.)
131+
132+
## AI-Powered Workflows
133+
134+
You can create powerful workflows utilizing the AI Assistant. Some examples are:
135+
136+
- **Generating Writing Prompts:** Using links to related notes to generate writing prompts.
137+
- **Summarizer:** Create summaries of selected text.
138+
- **Transform Selected:** Transform selected text based on provided instructions.
139+
- **Flashcard Creator:** Generate flashcards based on selected text.
140+
- **Get Me Started Writing About…:** Generate points to kickstart your writing on a given topic.
141+
- **Manual Prompt:** Provide a manual prompt to the AI assistant.
142+
- **Alternative Viewpoints:** Obtain alternative perspectives and improvements on your draft.
143+
- **Prompt Chaining:** Chain multiple prompts together, with each prompt using the output of the previous one.
144+
145+
All of these examples, and more, can be found in [Christian's blog post about the AI Assistant](https://bagerbach.com/blog/obsidian-ai).
146+
147+
Please note, using the AI Assistant will incur costs depending on the API usage. Set spending limits on your OpenAI account to avoid unexpected expenses. Play around with different models to find the one that best suits your needs.
148+
149+
### Example: Summarizer
150+
151+
Here’s a simple prompt where you select some text, and then use the assistant with that prompt.
152+
Then it’ll spit out an AI-generated summary:
153+
154+
```markdown
155+
Please summarize the following text. Use only the text itself as material for summarization, and do not add anything new. Rewrite this for brevity, in outline form:
156+
{{value}}
157+
```
158+
159+
You can use the getting-started demonstration shown earlier to set this up.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: QuickAdd CLI
3+
---
4+
5+
QuickAdd now registers native Obsidian CLI handlers when your Obsidian version
6+
supports plugin CLI commands.
7+
8+
## Requirements
9+
10+
- Obsidian `1.12.2` or newer (plugin CLI handler API introduced in `1.12.2`)
11+
- QuickAdd enabled in the target vault
12+
13+
## Commands
14+
15+
### `quickadd` / `quickadd:run`
16+
17+
Run a QuickAdd choice from the CLI.
18+
19+
```bash
20+
obsidian vault=dev quickadd choice="Daily log"
21+
obsidian vault=dev quickadd:run id="choice-id"
22+
```
23+
24+
### `quickadd:list`
25+
26+
List all QuickAdd choices (including nested choices inside multis).
27+
28+
```bash
29+
obsidian vault=dev quickadd:list
30+
obsidian vault=dev quickadd:list type=Capture
31+
obsidian vault=dev quickadd:list commands
32+
```
33+
34+
### `quickadd:check`
35+
36+
Check which inputs are still missing before a non-interactive run.
37+
38+
```bash
39+
obsidian vault=dev quickadd:check choice="Daily log"
40+
```
41+
42+
## Passing variables
43+
44+
QuickAdd CLI supports three variable patterns:
45+
46+
1. `value-<name>=...` (URI-compatible)
47+
2. extra `key=value` args
48+
3. `vars=<json-object>` for structured values
49+
50+
Examples:
51+
52+
```bash
53+
obsidian vault=dev quickadd \
54+
choice="Daily log" \
55+
value-project="QuickAdd" \
56+
mood="focused"
57+
58+
obsidian vault=dev quickadd \
59+
choice="Daily log" \
60+
vars='{"project":"QuickAdd","sprint":42}'
61+
```
62+
63+
## Non-interactive behavior
64+
65+
By default, `quickadd` and `quickadd:run` are non-interactive. If QuickAdd
66+
detects missing inputs, it returns a JSON payload with `missing` fields and
67+
`missingFlags` suggestions instead of opening prompts.
68+
69+
Use `ui` to allow interactive prompts:
70+
71+
```bash
72+
obsidian vault=dev quickadd choice="Daily log" ui
73+
```
74+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Open QuickAdd from a URI
3+
---
4+
5+
QuickAdd choices can be launched from external scripts or apps such as Shortcuts on Mac and iOS, through the use of the `obsidian://quickadd` URI.
6+
7+
If you prefer shell scripting, see [QuickAdd CLI](./CLI.md) for native Obsidian
8+
CLI handlers.
9+
10+
```
11+
obsidian://quickadd?choice=<YOUR_CHOICE_NAME>[&value-VALUE_NAME=...]
12+
```
13+
14+
:::note
15+
16+
All parameter names and values must be properly [URL encoded](https://en.wikipedia.org/wiki/Percent-encoding) to work. You can use an online tool like [urlencoder.org](https://www.urlencoder.org/) to help you easily encode parts of the URI.
17+
18+
:::
19+
20+
The only required parameter is `choice` which selects the choice to run by its name. The name must match exactly, otherwise it will not be able to be found.
21+
22+
[Variables to your choice](../FormatSyntax.md) are passed as additional `value-VARIABLE_NAME` parameters, with `value-` prefixing the name. Variables with a space in their name can still be used, but the spaces in the name must be encoded as `%20` as usual. For example, a capture asking for a variable named `log notes` would be passed as `value-log%20notes=...` in the URI.
23+
24+
Keep in mind that unnamed variables (a bare `{{VALUE}}`/`{{NAME}}` or `{{MVALUE}}`) cannot be filled by the URI and you will instead be prompted inside Obsidian as usual.
25+
26+
## Vault parameter
27+
28+
Like every Obsidian URI, you can use the special `vault` parameter to specify which vault to run QuickAdd in. If left blank, it will be executed in your most recent vault.
29+
30+
```
31+
obsidian://quickadd?vault=My%20Vault&choice=Daily%20log&value-contents=Lorem%20ipsum.
32+
```
33+
34+
## Important: Sync Service Limitations
35+
36+
:::warning
37+
38+
When using QuickAdd via URI with sync services (Obsidian Sync, iCloud, Dropbox, etc.), be aware of a critical limitation:
39+
40+
**If Obsidian hasn't been opened on a device**, files created on other devices won't be synced yet. This can cause QuickAdd to create duplicate files that overwrite the synced versions when they arrive.
41+
42+
### Example Scenario
43+
1. You create a Daily Note on your laptop
44+
2. Without opening Obsidian on your phone, you trigger a Capture via URI
45+
3. QuickAdd checks if the Daily Note exists (it doesn't locally)
46+
4. QuickAdd creates a new Daily Note
47+
5. When sync runs, the new file overwrites the one from your laptop
48+
49+
### Workarounds
50+
- **Open Obsidian first**: Always open Obsidian and wait for sync before using URIs
51+
- **Use device-specific names**: Configure different filename formats per device (e.g., `{{date}}-mobile`)
52+
- **Capture to active file**: Use an already-open note to avoid file creation issues
53+
- **Include timestamps**: Add `{{time}}` to filenames to ensure uniqueness
54+
55+
This is a fundamental limitation of file-based sync services and cannot be fully resolved without sync status APIs.
56+
57+
:::

0 commit comments

Comments
 (0)