API Structure
The Glide Browser API is exposed through the globalglide object, which provides programmatic access to browser functionality through TypeScript. The API is organized into logical namespaces for different browser features.
Core Namespaces
glide.keymaps
Define and manage keyboard mappings across different modes
glide.excmds
Execute and create custom ex-commands
glide.autocmds
Create event-driven automation with autocmds
glide.tabs
Query and manage browser tabs
glide.hints
Show and customize hint-based navigation
glide.commandline
Control the command-line interface
glide.findbar
Interact with the native find-in-page UI
glide.styles
Add and manage custom CSS for the browser UI
System Integration
glide.process
Spawn and manage system processes
glide.fs
Read and write files to the filesystem
glide.path
Work with file system paths
glide.env
Get and set environment variables
glide.prefs
Manage Firefox preferences
Content & Communication
glide.content
Execute code in the content process
glide.messengers
Create type-safe IPC messengers
glide.keys
Send and capture keyboard events
Extensions & Customization
glide.addons
Install and manage browser extensions
glide.search_engines
Add and configure search engines
glide.modes
Register custom modes
Configuration
Options (glide.o)
Theglide.o object contains browser-wide configuration options:
Buffer Options (glide.bo)
Buffer-specific options that reset when navigating to a new page:Globals (glide.g)
Store arbitrary data and configure global settings:Context (glide.ctx)
Access runtime information about the current state:Buffer-Scoped APIs
Theglide.buf namespace provides buffer-scoped versions of certain APIs:
- glide.buf.keymaps - Set keymaps that only apply to the current buffer
- glide.buf.prefs - Set preferences that reset when leaving the buffer
Utility Functions
glide.include()
Include another TypeScript config file:glide.options.get()
Get an option value, checking buffer-specific options first:Type Safety
The Glide API is fully typed with TypeScript. You can extend types using declaration merging:Next Steps
Getting Started
Write your first Glide configuration
Examples
Browse example configurations and patterns