Skip to content
Public template

About

Start a lich extension: one screen, a release workflow and a catalog listing.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

lich extension template

A minimal lich extension: one screen with a button that shows a toast. The full contract is docs/extensions.md.

Make it yours

  1. Set the module path in go.mod to your repository.
  2. In manifest.json, set id (lowercase, and the name of every archive), name, description (one line, at most 160 characters, required for the catalog) and the surface's title and icon. Keep id above surfaces: release.sh reads the first id in the file.
  3. Write the same name and description in locales/en/extension.json, and one folder per language you translate to (locales/pt-br/extension.json, ...).
  4. Rename the binary in .gitignore.
  5. Pick a license and replace LICENSE. The template is 0BSD so it does not choose one for you.

Develop

go build -o hello .
ln -s "$PWD" ~/.config/lich/extensions-dev/hello

Use 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

./release.sh v0.1.0
lich extension check dist/hello_linux_amd64.tar.gz

release.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.

Get listed

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.

About

Start a lich extension: one screen, a release workflow and a catalog listing.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages