-
Notifications
You must be signed in to change notification settings - Fork 235
WIP: Add Plugin Architecture for Extensible CLI #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
eciuca
wants to merge
7
commits into
MrLesk:main
Choose a base branch
from
eciuca:feature/plugin-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add plugin-router for extensible CLI commands - Add plugin system documentation - Enables external plugins like backlog-jira to extend Backlog.md - Zero-impact on core functionality when no plugins are installed
…y generic Enhanced plugin support with zero Jira-specific code in core: TASK-298: Implement plugin routing system - Added PluginRouter integration to CLI - Routes commands to plugins before Commander parsing - Seamless plugin command execution TASK-299: Refactor display code to use adapter pattern - Removed hardcoded Jira metadata display from task viewer - Plugins now handle their own display via 'view' command - Clean separation of concerns TASK-300: Remove Jira-specific code from core types and parser - Changed Task interface to use index signature for dynamic fields - Parser spreads all frontmatter fields instead of hardcoding Jira fields - Allows any plugin to add custom fields without core modifications This achieves true plugin architecture: core has zero knowledge of specific plugins, yet supports unlimited plugin functionality.
Add Plugin Support Infrastructure
Owner
|
Hi @eciuca |
17 tasks
Author
|
I updated as WIP as I need to make sure it integrates correctly with plugin commands. And to test it some more on the projects I work on |
# Conflicts: # src/cli.ts
…r initialization…
2833127 to
f7c16d2
Compare
|
Any update on this one? Was looking to create a plugin to embedded Excalidraw diagrams into docs/tasks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a plugin architecture that allows extending Backlog CLI with additional commands without modifying the core codebase. The implementation follows the git plugin pattern (similar to
git-lfs,git-flow, etc.).What's Changed
Core Changes
src/core/plugin-router.tsto handle plugin discovery and executionsrc/cli.tsto route unknown commands to pluginsTasktype with index signature to allow plugins to add custom fieldsDocumentation
docs/plugins.mdwith:Task Definitions
Added task documentation for the implementation:
How It Works
backlog <command>, CLI checks if it's a core commandbacklog-<command>executable in PATH or node_modules/.binExample Usage
Design Principles
Example Plugin
A working implementation is available at:
https://github.com/eciuca/Backlog.md-jira-plugin
This Jira integration plugin demonstrates:
Benefits
Testing
The plugin architecture has been tested with the Jira plugin implementation, including:
Related