Open mattjoyce opened 1 day ago
Changes term to be be 'extension'. Template extension. Extends the templating system.
@eugeis I started looking at this
propose plugin/template/extension.go plugin/template/extension_reg.go plugin/template/extension_exec.go plugin/template/hash.go (there is no global utils package)
What do you need?
External Template Extensions Proposal
Overview
Propose adding an external extension system to Fabric that allows users to extend functionality through custom executables while maintaining security through configuration-based verification.
Goals
Benefits
For Project
Architecture Evolution: Enables moving all extensions external, including current hard-coded features (if desirable), supporting better modularity Independent Development: Teams can maintain their own extensions without coordinating with core Fabric development Rapid Integration: Add new capabilities without modifying Fabric core Extensible Framework: Opens path for new extension types (e.g., output plugins for Obsidian integration) Separation of Concerns: Cleaner core codebase focused on essential functionality
For Users
Private Customization: Create personal extensions without requiring dev team oversight or sharing Technology Choice: Write extensions in any programming language, using familiar tools and libraries Direct Control: Implement custom integrations for personal or organization-specific needs
Extensions System Design
Template Syntax
Extension Definition (YAML)
Security Model
Extension Registration
Configuration in ~/.config/fabric/extensions.yaml
Extension Registration
Integrity Verification
Extension Management
List registered extensions
fabric --listextensions
Remove extensions
fabric --rmextensions mysql-extension
{{ext:database:query|SELECT metrics FROM systems}} {{ext:api:fetch|/endpoint/data}}
{{ext:git:diff|main}} {{ext:docker:status}}
{{ext:fabric:analyze|{{input}}}} {{ext:fabric:summarize|{{output}}}}