Kirby Copilot v2 introduces a copilot button for the Kirby writer and textarea fields.
Open the prompt dialog by clicking the Copilot button in the toolbar. The selected text (if any) will be appended to the user prompt before sending it to the AI model. Follow the selected text section for more information.
This feature is useful when you need to generate content based on existing text, or when you want to generate content for a specific part of the text. It is also useful for nested fields such as writer fields in blocks.
You can also define custom user prompts that will be pre-filled when the Copilot prompt dialog is opened.
Open the prompt dialog with keyboard shortcuts:
| Field | Shortcut |
|---|---|
| Writer | Cmd + . (macOS) / Ctrl + . (Windows/Linux) |
| Textarea | . (period key) |
writer and textarea field, even if you have not added the Copilot button to the toolbar.For text fields (text, textarea, writer), the prompt dialog shows an Append/Replace toggle:
Press Escape to cancel generation mid-stream.
Your prompts are saved in the browser's local storage (up to 50 entries per site). Navigate with arrow keys.
If you only want to add the Copilot button to the toolbar without removing the default marks, you must first define all default markers in the field configuration, followed by the copilot button.

fields:
text:
label: Text
type: writer
toolbar:
inline: false
marks:
# These are the default marks
- bold
- italic
- underline
- strike
- code
- "|"
- link
- email
- "|"
- clear
# Append the Copilot button to the toolbar
- "|"
- copilot
Similarly, you can add the Copilot button to the toolbar of a textarea field. The configuration is the same as for the writer field, but with buttons instead of marks.

fields:
text:
label: Text
type: textarea
buttons:
# These are the default buttons
- headlines
- "|"
- bold
- italic
- code
- "|"
- link
- email
- file
- "|"
- ul
- ol
# Append the Copilot button to the toolbar
- "|"
- copilot
Define a custom userPrompt for writer and textarea fields to pre-fill the Copilot dialog when the toolbar button is clicked.
fields:
text:
label: Text
type: writer
marks:
- bold
- italic
- "|"
- copilot
copilot:
userPrompt: Check grammar and improve writing style. Keep the original meaning and tone.
The custom prompt can be edited before generating content.
copilot.userPrompt to the nested field definition.When you select text in the writer or textarea field and then click the Copilot button, the selected text will be passed to the prompt dialog.
Before the instruction is sent to your AI provider, the selected text is added to the user prompt.
For example, if this is your user prompt:
Shorten the selected text to 200 characters.
Then, the selected text will be added to the prompt, resulting in this final prompt:
Shorten the selected text to 200 characters.
<selected_text>
(Your selected text will be here)
</selected_text>