code
search code…
Corgi
A plugin system and theming engine for Kagi Search.
Warning
Corgi is in heavy development. Things will break, APIs will change, and dragons roam freely. If you hit a bug, please open an issue.
Corgi hooks into Kagi's page, patches its runtime, and gives you a plugin API to extend everything. Settings live inside Kagi's own settings page at /settings/corgi, so the whole experience feels native.
It ships with 29 built-in plugins across three categories: 12 visual polish, 4 customization, and 13 utilities. See the full plugin list in the docs.
Build Requirements
- OS: macOS, Linux, or Windows
- Node.js: v20 or later — install
- pnpm: v9.15.4 — install with
corepack enable && corepack prepare [email protected] --activate, ornpm install -g [email protected]
Build from Source
Firefox
git clone https://github.com/aluminyoom/corgi.git
cd corgi
pnpm install
pnpm --filter @corgi/extension build:firefox
The built extension is in extension/.output/firefox-mv2/.
To produce a zip for upload to addons.mozilla.org:
pnpm --filter @corgi/extension zip:firefox
Output: extension/.output/corgiextension-1.0.1-firefox.zip
Chrome
git clone https://github.com/aluminyoom/corgi.git
cd corgi
pnpm install
pnpm --filter @corgi/extension build
Then load extension/.output/chrome-mv3 as an unpacked extension in chrome://extensions with Developer Mode enabled.
Build Tools
This extension uses the following tools that process source code into the final output:
- WXT v0.20 — browser extension framework (build orchestration)
- Vite v7 — bundler (combines and minifies modules)
- Svelte v5 — UI compiler (compiles
.sveltecomponents to JS) - TypeScript v5.7 — transpiles
.tsto JS
All dependencies and their exact versions are pinned in pnpm-lock.yaml.
Development
cd extension
pnpm dev # hot reload (Chrome)
pnpm dev:firefox # hot reload (Firefox)
pnpm build # production (Chrome)
pnpm build:firefox # production (Firefox)
pnpm zip # package for Chrome distribution
pnpm zip:firefox # package for Firefox distribution
To create a plugin, drop a .ts file in extension/src/plugins/builtins/ and auto-discovery handles the rest:
import { definePlugin } from "@/plugins/api";
export const myPlugin = definePlugin({
name: "my-plugin",
displayName: "My Plugin",
version: "0.1.0",
authors: ["your-name"],
description: "Does something cool",
onStart(api) {
// Your code here
},
});
See Creating Plugins for the full API reference.
Docs
VitePress docs live in docs/ and can be run locally:
cd docs && pnpm install && pnpm dev
License
MIT. Made by aluminyoom.
Not affiliated with Kagi Inc. Do not contact Kagi support for Corgi issues.
