What Are Extensions?
Extensions are packages that enhance Glass with additional features. They can provide:Language Support
Add syntax highlighting, code intelligence, and language servers for programming languages
Themes
Customize the editor’s appearance with color themes and icon themes
Slash Commands
Extend the assistant with custom slash commands for specialized tasks
Debug Adapters
Add debugging capabilities for different programming languages and platforms
Context Servers
Integrate Model Context Protocol (MCP) servers for AI capabilities
Snippets
Add code snippets for faster development
Extension Architecture
Glass’s extension system is built on WebAssembly (WASM) for security and performance. Extensions run in isolated sandboxes and communicate with the editor through a well-defined API.Extension Types
Published Extensions Published extensions are distributed through the Glass extension registry. They are:- Downloaded and installed automatically
- Verified and sandboxed for security
- Easy to install and update
- Available to all Glass users
- Run from a local directory
- Support hot-reloading during development
- Can override published extensions with the same ID
- Require compilation before installation
When you install a dev extension with the same ID as a published extension, the dev version takes precedence.
Extension Capabilities
Extensions declare their capabilities in anextension.toml manifest file. This includes:
Languages and Grammars
Extensions can add support for new programming languages by providing:- Language configuration (file extensions, comment syntax, etc.)
- Tree-sitter grammars for syntax highlighting
- Language server integration for code intelligence
Themes and Icons
Customize Glass’s appearance:- Color themes control editor colors, syntax highlighting, and UI elements
- Icon themes provide custom file and folder icons
Slash Commands
Extend the AI assistant with custom commands. For example:/docs- Search and insert documentation/explain- Explain code in context- Custom commands for your workflow
Debug Adapters
Extensions can add debugging support through the Debug Adapter Protocol (DAP):- Set breakpoints
- Step through code
- Inspect variables
- View call stacks
Context Servers (MCP)
Model Context Protocol servers provide AI models with external context:- File system access
- Database connections
- API integrations
- Custom data sources
Extension Lifecycle
Glass manages extensions automatically:Installation
Extensions are downloaded, verified, and installed to
~/.config/glass/extensions/installed/Extension Storage
Extensions are stored in specific directories:Extension Settings
You can configure extension behavior in your Glass settings:Auto-Installation
Glass can automatically install essential extensions on first launch. This provides out-of-the-box support for common languages and features.Auto-Updates
By default, Glass automatically checks for and installs extension updates. You can disable this per-extension or globally.Schema Versions
Extensions declare a schema version in their manifest. Glass supports:- Schema version 0: Legacy extensions (deprecated)
- Schema version 1: Current extension format
Next Steps
Installing Extensions
Learn how to discover and install extensions
Managing Extensions
Manage, update, and configure your installed extensions
Building Extensions
Create your own extensions for Glass
Extension API
Explore the extension API reference