Publishing Guide
Before initiating the publishing process, read and ensure that your extension meets all publishing prerequisites and license requirements. Only proceed with the steps below after satisfying these requirements. The publishing may be delayed or outright rejected otherwise.
Follow each step carefully to help the publishing process go smoothly.
Forking and cloning the repo
- Fork the
zed-industries/extensionsrepository.
Note: It is very helpful if you fork the
zed-industries/extensionsrepo to a personal GitHub account instead of a GitHub organization, as this allows Zed staff to push any needed changes to your PR to expedite the publishing process.
- Clone the repo to your local machine
# Substitute the url of your fork here:
# git clone https://github.com/zed-industries/extensions
cd extensions
git submodule init
git submodule update
To publish an extension, open a PR to the zed-industries/extensions repo.
In your PR, do the following:
- Add your extension as a Git submodule within the
extensions/directory under theextensions/{extension-id}path
git submodule add https://github.com/your-username/foobar-zed.git extensions/my-extension
git add extensions/my-extension
All extension submodules must use HTTPS URLs and not SSH URLS (
git@github.com). Furthermore, your extension repository must be publicly available and the checked out submodule commit must be on a branch and thus not be a detached commit.
- Add a new entry to the top-level
extensions.tomlfile containing your extension:
[my-extension]
submodule = "extensions/my-extension"
version = "0.0.1"
If your extension is in a subdirectory within the submodule, you can use the path field to point to where the extension resides:
[my-extension]
submodule = "extensions/my-extension"
path = "packages/zed"
version = "0.0.1"
- Run
pnpm sort-extensionsto ensureextensions.tomland.gitmodulesare sorted
Once your PR is merged, the extension will be packaged and published to the Zed extension registry.
Updating an extension
To update an extension, open a PR to the zed-industries/extensions repo.
In your PR do the following:
- Update the extension’s submodule to the commit of the new version. For this, you can run
# From the root of the repository:
git submodule update --remote extensions/your-extension-name
to update your extension to the latest commit available in your remote repository.
- Update the
versionfield for the extension inextensions.toml- Make sure the
versionmatches the one set inextension.tomlat the particular commit.
- Make sure the
If you’d like to automate this process, there is a community GitHub Action you can use.