Addon Ecosystem
This page is based on:
keelsource code (cmd/addandinternal/addon/*)ss-keel-addon-templaterepository structure and READMEss-keel-addonsregistry and contribution process
Ecosystem repositories
Section titled “Ecosystem repositories”| Repository | Role in the ecosystem |
|---|---|
keel | Installs addons with keel add, resolves aliases, reads keel-addon.json, and runs integration steps |
ss-keel-addon-template | GitHub template to bootstrap a new addon repository |
ss-keel-addons | Public alias registry used by keel add <alias> |
End-to-end flow
Section titled “End-to-end flow”- Create addon repository from
ss-keel-addon-template. - Implement addon code and define
keel-addon.jsonwith CLI-supported steps. - Publish a public GitHub repository and release a stable version.
- Open PR in
ss-keel-addonsto register alias metadata. - Install in user projects with
keel add <alias>(or direct repo path).
1) Create an addon from the GitHub template
Section titled “1) Create an addon from the GitHub template”Template repository: github.com/slice-soft/ss-keel-addon-template
Recommended path:
- Open template repository.
- Click Use this template.
- Create your addon repository.
- Clone your new repository locally.
Then update module path:
go mod edit -module github.com/your-org/your-addongo mod tidyTemplate note: workflow files are commented by default in .github/workflows/ci.yml and .github/workflows/release.yml. Uncomment them if you want CI/CD enabled.
2) Define keel-addon.json for current CLI behavior
Section titled “2) Define keel-addon.json for current CLI behavior”The CLI expects keel-addon.json at:
https://raw.githubusercontent.com/<owner>/<repo>/main/keel-addon.json
Current repo support is GitHub only.
Minimal practical example:
{ "name": "my-addon", "version": "0.1.0", "description": "Example addon", "repo": "github.com/your-org/your-addon", "depends_on": ["jwt"], "steps": [ { "type": "go_get", "package": "github.com/your-org/your-addon@v0.1.0" }, { "type": "env", "key": "MY_ADDON_ENABLED", "example": "true" }, { "type": "create_provider_file", "filename": "cmd/setup_myaddon.go", "guard": "func setupMyAddon(", "content": "package main\n\n// ..." }, { "type": "main_code", "anchor": "before_modules", "guard": "setupMyAddon(", "code": "setupMyAddon(app, appLogger)" }, { "type": "note", "message": "Next step: wire a protected route or docs hint" } ]}Step types supported by CLI today:
go_getenvmain_importmain_codecreate_provider_filenote
If you use an unknown step type, installation fails.
depends_on
Section titled “depends_on”Optional array of addon aliases that must be installed before this addon works. The CLI checks for missing dependencies and prompts to install them before the target addon, defaulting to yes when the user presses Enter. In automated flows, --yes auto-approves all prompts and --no-input accepts the dependency default without blocking on stdin. Example: ss-keel-oauth declares "depends_on": ["jwt"] because it needs ss-keel-jwt to sign tokens after authentication.
create_provider_file
Section titled “create_provider_file”This step creates a dedicated Go file (e.g. cmd/setup_gorm.go) containing the addon’s initialization function, instead of inserting all the setup code directly into cmd/main.go. A companion main_code step then calls that function.
This keeps each addon isolated and cmd/main.go readable regardless of how many addons are installed. The guard field contains a string that is checked in the target file before creating it — if the string is already present, the file is not overwritten.
3) Install addons in a Keel project
Section titled “3) Install addons in a Keel project”Official alias (registry-backed):
keel add gormkeel add mongoDirect repository path:
keel add github.com/your-org/your-addonRefresh registry cache:
keel add gorm --refreshScripted install with dependency auto-accept:
keel add oauth --yesCLI details:
- Requires
go.mod,cmd/main.go, andinternal/. - Uses
~/.keel/registry.jsoncache (1 hour TTL). - For non-official targets, asks confirmation before install.
--no-inputdisables prompts; dependency prompts accept their default answer, while non-official installs require--yes.
4) Submit addon to official registry (ss-keel-addons)
Section titled “4) Submit addon to official registry (ss-keel-addons)”Registry repository: github.com/slice-soft/ss-keel-addons
Based on ss-keel-addons/CONTRIBUTING.md, submit flow is:
- Ensure addon repository is public.
- Follow template conventions (
ss-keel-addon-template). - Prepare a stable version and test evidence in your addon repository.
- Open PR editing
registry.json. - Include addon repo links, test evidence, and documentation context in PR description.
- Share the PR in Discord for review.
Registry entries include:
aliasrepodescriptionsourcetags
After merge, users can install using alias. If they recently cached the registry, use --refresh to pull the latest alias list immediately.