Appearance
Quick Start
Create a plugin in 30 seconds.
Create a Plugin
Option 1: From GemShell UI
- Open GemShell
- Click Manage Plugins
- Click New Plugin
- A new plugin folder opens in your file manager
Option 2: Manually
Create a folder in ~/.gemshell/plugins/:
~/.gemshell/plugins/my-plugin/
├── plugin.js
├── style.css
├── template.html
└── script.jsThe Files
plugin.js (Required)
The manifest file declares your plugin's metadata and settings:
javascript
module.exports = {
name: 'My Plugin',
version: '1.0.0',
author: 'Your Name',
description: 'What your plugin does',
// Files to inject (order: CSS, HTML, JS)
inject: ['style.css', 'template.html', 'script.js'],
// Settings shown in GemShell UI
settings: [
{ id: 'enabled', type: 'checkbox', label: 'Enable', default: true },
{ id: 'message', type: 'text', label: 'Message', default: 'Hello!' }
]
};style.css
Your styles, injected into <head>:
css
.my-plugin-panel {
position: fixed;
bottom: 10px;
right: 10px;
padding: 10px;
background: rgba(0, 0, 0, 0.8);
color: white;
border-radius: 4px;
font-family: sans-serif;
z-index: 99999;
}template.html
HTML template with conditionals:
html
{{#if enabled}}
<div class="my-plugin-panel" id="my-panel">
{{message}}
</div>
{{/if}}script.js
JavaScript logic:
javascript
// GEMSHELL_SETTINGS is auto-injected
const { enabled, message } = GEMSHELL_SETTINGS;
if (!enabled) return;
// Your element is already in the DOM from template.html
const panel = document.getElementById('my-panel');
console.log('Plugin loaded:', message);Enable Your Plugin
- Open GemShell
- Go to Manage Plugins
- Enable your plugin globally (makes it available)
- In Game Settings, enable it for each game
Build
Build your game and the plugin files are automatically injected.
Injection Order
Files are injected in this order:
- CSS - into
<head>(styles load first) - HTML - into
<body>(DOM elements available) - JS - into
<body>(can access DOM from template)
This means your JavaScript can immediately access elements from your HTML template.
Next Steps
- Plugin Structure - Detailed file reference
- Settings - All setting types
- HTML Templates - Template syntax
