lifei/tabby-settings-override

★ 1Forks 0TypeScriptGitHub ↗Compare

README

tabby-settings-override

A Tabby plugin that reads config.local.yaml and overrides the default config.yaml values, allowing you to maintain local configuration overrides without modifying the shared config file.

How It Works

When Tabby starts, the plugin:

  1. Locates the Tabby config directory (same directory as config.yaml)
  2. Reads and parses config.local.yaml
  3. Merges the local config over the active config using Tabby's built-in configMerge
  4. Patches the config save mechanism so that local overrides are stripped before saving and re-applied after saving

This means your config.local.yaml overrides are always applied at runtime, but never leak into config.yaml on disk.

Installation

# npm
npm install git+https://github.com/lifei/tabby-settings-override.git

# yarn
yarn add git+https://github.com/lifei/tabby-settings-override.git

# bun
bun add git+https://github.com/lifei/tabby-settings-override.git

You can also specify a branch or tag:

npm install git+https://github.com/lifei/tabby-settings-override.git#main
npm install git+https://github.com/lifei/tabby-settings-override.git#v1.0.0

Restart Tabby after installation.

Usage

Create a config.local.yaml file in the same directory as your Tabby config.yaml:

# config.local.yaml
terminal:
  foregroundColor: "#00ff00"
  font: "Fira Code"

hotkeys:
  profile:
    new-window:
      - "Cmd-Shift-N"

The values in config.local.yaml will override the corresponding values in config.yaml at runtime. Any keys not specified in config.local.yaml remain unchanged.

Build

yarn build        # production build
yarn watch        # watch mode for development

How It Works (Technical Details)

  • SettingsOverrideService — An Angular @Injectable() service that hooks into Tabby's ConfigService
  • On ConfigService.ready$, it reads config.local.yaml and merges it into the internal config store
  • It patches ConfigService.save() to temporarily strip override values before writing to disk, then re-applies them after saving
  • It subscribes to ConfigService.changed$ to re-apply overrides whenever the config changes (e.g., via the settings UI)
  • The stripOverridesRecursive method walks the local config structure and restores the base values, ensuring overrides are not persisted to config.yaml

Requirements

  • Tabby with tabby-core support
  • Angular 15+
  • Node.js (for building)

License

MIT

Contributors

lifei

Issues