create-plugin

Featured

Create new sidecar plugins implementing the plugin.Plugin interface, rendering views with Bubble Tea, handling keyboard input via keymap contexts, and integrating with the app shell (footer hints, event bus, adapters). Use when creating a new plugin, modifying plugin architecture, or debugging plugin rendering/lifecycle issues. See references/ for sidebar list and fixed footer layout details.

AI & Automation 1,079 stars 83 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Create Plugin ## Architecture Overview - **Bubble Tea model**: `internal/app/model.go` owns the active plugin index, dispatches key events, renders plugin views. - **Registry**: `internal/plugin/registry.go` stores plugins, handles lifecycle with panic protection, keeps an `unavailable` map when `Init` fails (silent degradation). - **Plugin contract**: `internal/plugin/plugin.go` defines the interface every plugin must satisfy. - **Context**: `internal/plugin/context.go` provides `WorkDir`, `ConfigDir`, `Adapters`, `EventBus`, `Logger`, `Epoch`, and `Keymap`. - **Keymap**: `internal/keymap` maps keys to command IDs. Footer/help reads bindings by context using `Plugin.Commands()` + `Plugin.FocusContext()`. ## Plugin Interface Every plugin must implement all of these methods: ```go ID() string // Stable kebab-case identifier Name() string // Short human label for headers/help Icon() string // Single-character glyph for tab strip Init(ctx *Context) error // Lightweight setup; return error to degrade gracefully Start() tea.Cmd // Kick off async work (non-blocking) Update(msg tea.Msg) (Plugin, tea.Cmd) // Pure state transition View(width, height int) string // Render within provided dimensions IsFocused() bool // Check focus state SetFocused(bool) // App calls this on tab switch Commands() []plugin.Command // Footer hints per context FocusContext() string // Current context name for keymap Stop(...

Details

Author
marcus
Repository
marcus/sidecar
Created
9 months ago
Last Updated
3 days ago
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Featured

bb-plugin-authoring

Create or change BB plugins and Plugin SDK extensions, including CLI commands, agent tools, providers, and UI surfaces.

3,934 Updated today
get-bb
AI & Automation Listed

create-codevisor-plugin

Create, install, and iterate on a Codevisor plugin — a local HTTP server whose panes render inside Codevisor on every connected device. Use when the user asks for a new pane, panel, viewer, dashboard, or tool inside Codevisor (e.g. "make me a pane that shows X"), or asks to build or modify a Codevisor plugin.

15 Updated today
851-labs
AI & Automation Listed

bubbletea

Use this skill when building a terminal UI (TUI) in Go with Bubble Tea and the Charm stack: the Elm Architecture / MVU pattern (`tea.Model` with `Init`/`Update`/`View`), `Cmd`/`Msg` event flow, Lip Gloss styling and layout, Bubbles components (`viewport`, `list`, `table`, `textinput`, `textarea`, `spinner`, `progress`), Glamour markdown rendering, and teatest for testing. Especially apt for streaming tokens from an LLM/agent into a terminal (goroutine → `p.Send` → `Update` → `viewport`), an agentic CLI, or any interactive full-screen or inline terminal app in Go. Targets v2 on the `charm.land/*/v2` import paths (Go 1.25+); writes current-version-correct code and avoids v1/beta patterns. Not for: Rust TUIs (→ Ratatui sibling), Python TUIs (→ Textual sibling), plain non-interactive CLI output (use `fmt`/`cobra`/standalone `lipgloss`), web/GUI UIs, or agent session orchestration / tmux / process multiplexing.

1 Updated 2 months ago
vinsonconsulting