Skip to content

feat: Add plugin architecture for extensibility #18

@anjor

Description

@anjor

Feature Request: Plugin Architecture

Overview

Implement a plugin system that allows third-party developers to extend pltr-cli with custom commands, authentication methods, and data formatters.

Proposed Implementation

  • Plugin Discovery: Automatic discovery of plugins in ~/.config/pltr/plugins/
  • Plugin Types:
    • Command Plugins: Add new command groups (pltr myplugin command)
    • Auth Plugins: Custom authentication methods
    • Formatter Plugins: New output formats beyond table/json/csv
    • Service Plugins: Wrapper for additional Foundry APIs
  • Plugin API: Well-defined interfaces for plugin development
  • Plugin Management: pltr plugin list|install|enable|disable|remove

Plugin Structure

~/.config/pltr/plugins/
├── my_plugin/
│   ├── plugin.json          # Metadata and configuration
│   ├── __init__.py         # Plugin entry point
│   ├── commands.py         # Custom commands
│   ├── auth.py            # Custom auth (optional)
│   └── formatters.py      # Custom formatters (optional)

Plugin API

  • Base Classes: BaseCommand, BaseAuth, BaseFormatter, BaseService
  • Registration: Plugins register via decorators or metadata
  • Lifecycle Hooks: plugin_init, plugin_activate, plugin_deactivate
  • Configuration: Access to pltr config and profiles
  • Error Handling: Isolated plugin failures don't crash CLI

Use Cases

  • Custom Data Sources: Plugins for non-Foundry APIs
  • Specialized Formatters: Export to Excel, PowerBI, Tableau formats
  • Domain-Specific Commands: Industry-specific data operations
  • Integration Tools: Slack/Teams notifications, Jira integration
  • Development Tools: Test data generation, mock services

Technical Requirements

  • Plugin isolation and sandboxing
  • Version compatibility checking
  • Plugin dependency management
  • Security review process for official plugins
  • Comprehensive plugin development documentation

Acceptance Criteria

  • Plugin discovery and loading system functional
  • Example plugins demonstrating each plugin type
  • Plugin management commands operational
  • Plugin development documentation complete
  • Security isolation prevents malicious plugins
  • Plugin API stability guarantees established
  • Comprehensive test coverage including plugin system

Priority: Low
Labels: enhancement, architecture, Phase-8
Effort: Large

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions