You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Record/keep extension source for later reuse (quarto update extension ...) #11468
Currently, when installation an extension from GitHub, if the extension name does not match the repository name, it's not possible to use quarto update extension ....
The majority of extensions uses quarto-<extension name> as a repository name instead of <extension name>.
For example:
Install extensions:
quarto add mcanouil/quarto-iconify
quarto add quarto-ext/typst-templates/poster
Check the installed extensions
quarto list extensions
Id Version Contributes
quarto-ext/poster 1.0.0 formats
mcanouil/iconify 2.1.0 shortcodes
Update the extensions
quarto update extension quarto-ext/poster
Extension not found in local or remote sources
This means that it's not possible to update the extension quarto-ext/poster because the repository name (directory) is typst-templates/poster and not poster.
Same goes for the extension mcanouil/iconify.
This could be solved by recording/keeping the repository name (source) somewhere.
It could be in _extension.yml under source key.
Keeping the source would allow better extension management and easier updates, e.g., quarto update extension all.
Reacted by Christophe Dervieux and Carlos Scheidegger
Just a note for clarity that quarto update extension does work, but you need to know the github repo name
> quarto update extension quarto-ext/quarto-poster
and we don't record it for now and we do store the extension in org-name/ext-name, ext-name being the registered name from the metadata of the extension. This name is also the one to use inside the document to load a filter for example. filter: [quarto-ext/poster]
So we need to
Find where to store the source information, and maybe other information.
We could adopt an approach similar to R package that does modify the DESCRIPTION in the installed package folder. We could write some fields in the _extension.yml with install datetime, type of extension (local zip, remote, ...) and source of the remote if so.
Show this information in quarto list extension indeed
Adapt quarto update to use the source when installed extension is used (quarto update quarto-ext/poster) and probably allow to update from source directly quarto update extension quarto-ext/typst-template/poster
I'm going to second writing the source info into _extension.yml on install. Relatedly, it'd also be nice if that could support a command to help users open extension docs (it's offered during install but I don't think there's a way to return to the docs if you select No at that point).
(Sidenote: there's enough here that it'd be nice to have a quarto extension subcommand. I never feel secure that I'm doing the right thing when I use quarto add, quarto list or quarto update to interact with extensions. quarto extension add or quarto extension update are more verbose but much more certain.)
Reacted by Carlos Scheidegger and Christophe Dervieux
Writing the source in _extension.yml is also what I had in mind.
I am a bit working on this for my VSCode extension (https://github.com/mcanouil/quarto-wizard), especially to provide an interface to update/install/remove/get help on extensions.
If this design is validated and if that's ok, I volunteer to work on this on my spare time and make a PR.
Sidenote: my VSCode extension allows to access any extension repository (I plan to make a better UI than a list)
We have a 2025 goal to improve third-party extensibility in Quarto, and rethinking our extension tooling definitely fits. quarto extension doesn't actually fit most of our other commands; from memory, I think they're all verbs.
That doesn't mean we shouldn't do it, but it means that we need to think about it more carefully.
quarto extension doesn't actually fit most of our other commands; from memory, I think they're all verbs.
yes we have only quarto tools as left over. Previously it was quarto tools install but it has been switched (d2447e0) to verb with quarto install for all extensions or tools, and then quarto add was added as better way for extension quarto install extension <extension> is now quarto add <extension>
So if we are changing this, we definitely need to see the current state of all this and make the clearer API that will last 😄
q2 calls this record .quarto-source.yml. It sits in each installed extension's folder, _extensions/[<org>/]<name>/.quarto-source.yml, and q2 never touches the author's _extension.yml.
Source code (last change to the record module: commit f9fe40f79, 2026-10-22):
# Generated by `q2 add`. Do not edit.## Records where this extension was installed from, and a sha256 of each# installed file. Before replacing this extension, `q2 add` compares the# files against these hashes and refuses (without --force) to overwrite# local changes.version: 1source: acme/demo-ext@v1.0.0kind: githubref: v1.0.0files:
_extension.yml: <sha256>filter.lua: <sha256>
Keys:
Key
Type
Meaning
version
integer
Schema version of the file, currently 1 (RECORD_VERSION).
source
string
The source exactly as the user typed it, including any @ref.
kind
enum
One of github, url, local-archive or local-dir (kebab-case of SourceKind).
ref
string, optional
The text after the last @ of a GitHub source: a tag, a branch, or a full or short commit SHA (since quarto-dev/q2#1006). It's left out when no ref was typed, so an install without a ref (which takes main, then master) doesn't record which branch or commit it got. URL and local sources have no ref.
files
map
Each path, relative to the extension folder with / separators, mapped to a lowercase hex sha256 of the file's raw bytes. The record itself is left out, symbolic links are followed, the walk stops at a depth of 32, and keys are sorted (BTreeMap).
How q2 reads it (installed_state):
No file:Untracked. q2 installs or updates anyway, with a note.
File present, every hash matches:Unmodified.
A file modified, missing or added:Modified, and q2 refuses to replace the extension without --force.
A record q2 can't parse: also Modified (UnreadableRecord), so it needs --force too. This covers invalid YAML, a missing field, and an unknown kind such as registry.
Unknown extra keys: accepted, because the struct doesn't reject unknown fields. q2 drops them the next time it rewrites the record.
I've closed #13764, since q2 already handles this with its .quarto-source.yml record.
Is there a plan to backport that record to Quarto 1.x? @cscheid
If so, quarto add could write the same file in q2's version 1 format, and quarto update extension could read it to find the source.
Both tools would then share one record, and an extension installed with one could be updated with the other.
For reference, amongst several improvements, I'm aligning Quarto Wizard with q2 to ensure native support and no conflicts issues between Quarto Wizard and Q2 ways of recording the source.
This is on the main branch of Quarto Wizard and isn't released yet.
Source code (Quarto Wizard main at commit 95522cb, 2026-11-02):
Quarto Wizard writes the same _extensions/[<org>/]<name>/.quarto-source.yml, in q2's schema version 1: version, source, kind, ref and files, with the same sha256 hashing and the same file walk.
It reads the record the way q2 does, and an unreadable record, an unknown kind or a version above 1 counts as a local edit.
It refuses to replace an extension whose files don't match the hashes, unless you choose Replace anyway.
It no longer writes source and source-type into the author's _extension.yml.
It still reads those keys from extensions installed with Quarto Wizard 3, and the next update writes a record.
So an extension installed with one tool can be updated with the other.
What Quarto Wizard adds:
Quarto Wizard can follow either the latest version tag or the head of a branch.
It keeps that choice, and the commit it installed from a branch, under an optional quarto-wizard key:
# Generated by Quarto Wizard. Do not edit.version: 1source: acme/demo-ext@devkind: githubref: devfiles:
_extension.yml: <sha256>filter.lua: <sha256>quarto-wizard:
track: branchcommit: <full 40-character sha>
Key
Type
Meaning
quarto-wizard.track
tag or branch, optional
What an update follows: the latest version tag, or the head of a branch. Quarto Wizard writes it for every GitHub install, and a record without it counts as tag.
quarto-wizard.commit
string, optional
The full commit, in lower case, of an install from a branch, or from a repository with no version tag.
quarto-wizard.source-type
registry, optional
Set when the extension was installed from the extension registry that Quarto Wizard lists.
q2 ignores the quarto-wizard key, because it accepts unknown keys.
It drops the key the next time it rewrites the record, and Quarto Wizard then falls back to tag.
Activity
cderv commentedon Nov 18, 2024
Just a note for clarity that
quarto update extensiondoes work, but you need to know the github repo nameand we don't record it for now and we do store the extension in
org-name/ext-name,ext-namebeing the registered name from the metadata of the extension. This name is also the one to use inside the document to load a filter for example.filter: [quarto-ext/poster]So we need to
Find where to store the source information, and maybe other information.
We could adopt an approach similar to R package that does modify the DESCRIPTION in the installed package folder. We could write some fields in the
_extension.ymlwith install datetime, type of extension (local zip, remote, ...) and source of the remote if so.Show this information in
quarto list extensionindeedAdapt
quarto updateto use the source when installed extension is used (quarto update quarto-ext/poster) and probably allow to update from source directlyquarto update extension quarto-ext/typst-template/posterThanks a lot for the report @mcanouil !
gadenbuie commentedon Dec 5, 2024
I'm going to second writing the source info into
_extension.ymlon install. Relatedly, it'd also be nice if that could support a command to help users open extension docs (it's offered during install but I don't think there's a way to return to the docs if you select No at that point).(Sidenote: there's enough here that it'd be nice to have a
quarto extensionsubcommand. I never feel secure that I'm doing the right thing when I usequarto add,quarto listorquarto updateto interact with extensions.quarto extension addorquarto extension updateare more verbose but much more certain.)mcanouil commentedon Dec 5, 2024
Writing the source in
_extension.ymlis also what I had in mind.I am a bit working on this for my VSCode extension (https://github.com/mcanouil/quarto-wizard), especially to provide an interface to update/install/remove/get help on extensions.
If this design is validated and if that's ok, I volunteer to work on this on my spare time and make a PR.
Sidenote: my VSCode extension allows to access any extension repository (I plan to make a better UI than a list)

cscheid commentedon Dec 5, 2024
We have a 2025 goal to improve third-party extensibility in Quarto, and rethinking our extension tooling definitely fits.
quarto extensiondoesn't actually fit most of our other commands; from memory, I think they're all verbs.That doesn't mean we shouldn't do it, but it means that we need to think about it more carefully.
cderv commentedon Dec 6, 2024
yes we have only
quarto toolsas left over. Previously it wasquarto tools installbut it has been switched (d2447e0) to verb withquarto installfor all extensions or tools, and thenquarto addwas added as better way for extensionquarto install extension <extension>is nowquarto add <extension>So if we are changing this, we definitely need to see the current state of all this and make the clearer API that will last 😄
mcanouil commentedon Mar 24, 2025
FYI, Quarto Wizard adds a
source: owner/repoorsource: owner/repo@tagupon install/update to the extension manifest.mcanouil commentedon Oct 30, 2026
For reference:
q2 calls this record
.quarto-source.yml. It sits in each installed extension's folder,_extensions/[<org>/]<name>/.quarto-source.yml, and q2 never touches the author's_extension.yml.Source code (last change to the record module: commit
f9fe40f79, 2026-10-22):SourceKindenum: lines 44-51.SourceRecordstruct: lines 53-66.installed_state(the local-edit check): lines 121-171.hash_tree(the hashing): lines 175-191.source,kindandrefare filled in: https://github.com/quarto-dev/q2/blob/main/crates/quarto/src/commands/add/resolve.rs (Provenance, around lines 62-66 and 122-150).SourceRecord { … }, around line 84).Format (schema version 1):
Keys:
version1(RECORD_VERSION).source@ref.kindgithub,url,local-archiveorlocal-dir(kebab-case ofSourceKind).ref@of a GitHub source: a tag, a branch, or a full or short commit SHA (since quarto-dev/q2#1006). It's left out when no ref was typed, so an install without a ref (which takesmain, thenmaster) doesn't record which branch or commit it got. URL and local sources have no ref.files/separators, mapped to a lowercase hex sha256 of the file's raw bytes. The record itself is left out, symbolic links are followed, the walk stops at a depth of 32, and keys are sorted (BTreeMap).How q2 reads it (
installed_state):Untracked. q2 installs or updates anyway, with a note.Unmodified.Modified, and q2 refuses to replace the extension without--force.Modified(UnreadableRecord), so it needs--forcetoo. This covers invalid YAML, a missing field, and an unknownkindsuch asregistry.mcanouil commentedon Nov 2, 2026
I've closed #13764, since q2 already handles this with its
.quarto-source.ymlrecord.Is there a plan to backport that record to Quarto 1.x? @cscheid
If so,
quarto addcould write the same file in q2's version 1 format, andquarto update extensioncould read it to find the source.Both tools would then share one record, and an extension installed with one could be updated with the other.
mcanouil commentedon Nov 3, 2026
For reference, amongst several improvements, I'm aligning Quarto Wizard with q2 to ensure native support and no conflicts issues between Quarto Wizard and Q2 ways of recording the source.
This is on the
mainbranch of Quarto Wizard and isn't released yet.Source code (Quarto Wizard
mainat commit95522cb, 2026-11-02):q2binary: https://github.com/mcanouil/quarto-wizard/blob/95522cb/packages/core/scripts/q2-compat.mjsWhat's shared with q2:
_extensions/[<org>/]<name>/.quarto-source.yml, in q2's schema version 1:version,source,kind,refandfiles, with the same sha256 hashing and the same file walk.kindor aversionabove 1 counts as a local edit.sourceandsource-typeinto the author's_extension.yml.It still reads those keys from extensions installed with Quarto Wizard 3, and the next update writes a record.
So an extension installed with one tool can be updated with the other.
What Quarto Wizard adds:
Quarto Wizard can follow either the latest version tag or the head of a branch.
It keeps that choice, and the commit it installed from a branch, under an optional
quarto-wizardkey:quarto-wizard.tracktagorbranch, optionaltag.quarto-wizard.commitquarto-wizard.source-typeregistry, optionalq2 ignores the
quarto-wizardkey, because it accepts unknown keys.It drops the key the next time it rewrites the record, and Quarto Wizard then falls back to
tag.