# Addon repositories

> The addon repository system: spec, JSON schema, and client design docs.

URL: https://wmkeyboard.pages.dev/development/addon-repos/
Section: Development

The format WM Keyboard uses to install themes, layouts, dictionaries, emoji keyword packs,
snippets, Espanso packs, sticker packs, icon packs, fonts, emoji fonts, key sounds, sound packs,
plugins and vocabulary packs from a URL the user pastes in.

	Repository format — The published spec: what a repository author writes. — /development/addon-repos/repo-format/
	JSON Schema — Draft 2020-12 schema for wmkeyboard-repo.json. Point $schema at it for IDE validation. — /schemas/wmkeyboard-repo.schema.json
	Client design — How this app fetches, verifies and installs an addon, on the client side. — /development/addon-repos/client-design/

For the user-facing view of the same system, see the
[Addons section](https://wmkeyboard.pages.dev/addons/overview/).

## Where the canonical copies live

The spec and schema are mirrored from the
[sample repository](https://github.com/wasi-master/wmkeyboard-addon-repository),
under its own `docs/addons/`.

That copy is canonical, because the schema's `$id` and the `"$schema"` key in every published
manifest already point at its `raw.githubusercontent.com` URL. Repointing them would break
manifests in the wild. Edit there first, then port the change here.

The pages in this section are the Starlight presentation of the upstream
Markdown (frontmatter, components, site links). When upstream changes, port the
*content* of the diff by hand rather than copying files over these. The schema
itself is still a straight copy:

```bash
cp ~/Work/wmkeyboard-addon-repository/docs/addons/wmkeyboard-repo.schema.json docs/public/schemas/
```

The mirror exists so the spec is readable alongside the code that implements it
(`core/addons/`), and so a change to the client and a change to the spec can land in one commit.

## Implementation

Client code lives in [`:core:addons`](https://github.com/wasi-master/wmkeyboard/tree/main/core/addons) (data layer) and [`:feature:addons`](https://github.com/wasi-master/wmkeyboard/tree/main/feature/addons) (install/reconcile/download).
The install dispatch table in [Client design §5](https://wmkeyboard.pages.dev/development/addon-repos/client-design/) maps each addon type to the importer that
handles it. Most of those importers already existed for local file import.
