subl/basis
myBasis Sublime Plugin
Typed Infrastructure for Sublime Plugins
sublime-basis is typed infrastructure for Sublime Text 4 plugin development, with mockable APIs that enable headless testing, CLI tooling, and type-checking without a running editor.
Preview not recorded.
What it shows
What it is and what it demonstrates.
myBasis is typed infrastructure for Sublime Text 4 plugin development, with mockable APIs that enable headless testing, CLI tooling, and type-checking without a running editor. It is the shared foundation that makes the fleet's other Sublime plugins testable and type-safe.
The problem
Sublime's plugin API is untyped, tightly coupled to a running editor process, and has no official mock layer. Plugin authors who want type-checking or headless tests have to build their own stubs, and those stubs drift from the real API with every Sublime release. There was no shared, versioned infrastructure layer that multiple plugins could depend on.
The approach
myBasis provides typed stubs for the Sublime API, a mock layer that fakes view state, settings, and window operations well enough for headless pytest runs, and a small CLI surface for plugin scaffolding and diagnostics. Every other plugin in the fleet imports from myBasis instead of repeating ad-hoc stubs, so a single update to the mock layer fixes every downstream test suite.
What it demonstrates
A published 0.7.0 package with 17 tests, CI, pre-commit hooks, typed source, and 2 documentation pages is modest in raw count but disproportionate in leverage: it is the dependency that makes the other plugins' test surfaces possible at all. Infrastructure for a niche ecosystem, shipped with the same discipline as a library for a mainstream one.
Repository evidence
Observable facts.
- Documentation
- 2 documentation files
- Test surface
- 17 test files
- Continuous integration
- Configured
- Pre-commit hooks
- Configured
- Typed source
- Configured
- Visual evidence
- Preview stub
- Technologies
- sublime