docs/plugin_development/plugin-views.md
!!! warning "Beta Feature" The plugin system is in beta (available in Beekeeper Studio 5.3+). We'd love your feedback!
Plugins can integrate with Beekeeper Studio through different types of views, each designed for specific use cases. Views define where and how your plugin's interface appears within the application.
Tab views appear as tabs in the main workspace area, alongside query tabs and other content.
The base tab will take up the entire tab space for your plugin's interface.
The shell tab contains a result table at the bottom that can be opened and closed.
This layout is ideal for plugins that query or analyze data, as users can interact with your plugin controls at the top and see results in the familiar table format below.
Manifest Example:
{
"capabilities": {
"views": [
{
"id": "data-analyzer",
"name": "Data Analyzer",
"type": "shell-tab",
"entry": "index.html",
}
]
}
}
!!! info "Coming Soon" Sidebar views are planned for future releases.
Sidebar views appear as persistent panels in the application's sidebar, remaining visible while users work with other content.
Manifest Example:
{
"capabilities": {
"views": [
{
"id": "quick-reference",
"name": "SQL Reference",
"type": "secondary-sidebar",
"entry": "sidebar.html",
}
]
}
}
A single plugin can declare multiple views:
{
"capabilities": {
"views": [
{
"id": "main-interface",
"name": "Data Processor",
"type": "shell-tab",
"entry": "main.html",
},
{
"id": "quick-tools",
"name": "Quick Tools",
"type": "secondary-sidebar",
"entry": "tools.html",
}
]
}
}
Each plugin view can store and retrieve its own state using the getViewState and setViewState API methods. This state persists across application restarts.
View state is isolated per view instance. This means:
For example, if the user creates two tabs form AI Shell, each tab will maintain completely separate state data and cannot access the other tab's stored information.
// Save state when user interacts
await setViewState({
conversations: [
"Ai: Hello, how can I help you today?",
"Human: Make a plain sandwich recipe using SQL.",
]
});
// Restore state when view loads
const state = await getViewState();
if (state) {
setConversations(state.conversations);
}