A minimal lich extension: one screen with a button that shows a toast.
The full contract is docs/extensions.md.
- Set the module path in
go.modto your repository. - In
manifest.json, setid(lowercase, and the name of every archive),name,description(one line, at most 160 characters, required for the catalog) and the surface'stitleandicon. Keepidabovesurfaces:release.shreads the firstidin the file. - Write the same name and description in
locales/en/extension.json, and one folder per language you translate to (locales/pt-br/extension.json, ...). - Rename the binary in
.gitignore. - Pick a license and replace
LICENSE. The template is 0BSD so it does not choose one for you.
go build -o hello .
ln -s "$PWD" ~/.config/lich/extensions-dev/helloUse your id for both names. A lich run with LICH_DEV set reads extensions-dev; an installed lich reads
extensions beside it. The folder is ~/Library/Application Support/lich/ on macOS and %AppData%\lich\ on
Windows. Restart lich to pick the link up, and build and restart again after a change. What the extension prints
to stderr goes to lich's log.
./release.sh v0.1.0
lich extension check dist/hello_linux_amd64.tar.gzrelease.sh builds dist/<id>_<goos>_<goarch>.tar.gz for every platform and dist/checksums.txt. The version
you pass must match manifest.json. lich extension check runs lich's install checks on an archive or a folder
and names what fails; run it on each archive.
Commit, and push a tag: git tag v0.1.0 && git push origin v0.1.0.
.github/workflows/release.yml runs release.sh and publishes the release. Anyone can then install it from
lich's Settings › Extensions › From GitHub.
listing/listing.json says what the catalog shows beside the manifest: one or two categories, and optionally a
cover and screenshots. Then open a pull request on
lichdotdev/extensions adding "<owner>/<repo>" to
extensions.json. Its checks run on your latest release and say what fails.