Skip to content

[feature] Add --with-prefix flag to namespace installed plugins #29

@juancarlosm

Description

@juancarlosm

To prevent filename collisions and improve organization in the .config/opencode/ directory, I propose adding a --with-prefix flag. This will ensure that all files (agents, commands, and skills) belonging to a plugin are namespaced with the plugin's name.

The Problem:

Currently, if two plugins contain a file with the same name (e.g., onboard.md or code-reviewer.md), the installation process leads to file overwrites. Additionally, it's difficult to track which plugin provided which command once they are all mixed in the destination folders.

Proposed Feature:

Add a --with-prefix flag that prepends the plugin name followed by a hyphen to every file and skill folder being installed.

Example Usage:

opkg install github:wshobson/agents --plugins git-pr-workflows --with-prefix

Expected Output:

  • Commands: .config/opencode/commands/git-pr-workflows-onboard.md
  • Agents: .config/opencode/agents/git-pr-workflows-code-reviewer.md
  • Skills: .config/opencode/skills/kubernetes-operations-gitops-workflow/

Benefits:

  • Conflict Resolution: Safely install multiple plugins that share common naming conventions for commands or agents.
  • Traceability: Users can instantly identify which plugin "owns" a specific configuration file.
  • Predictability: Using a standard hyphen (-) ensures compatibility across all operating systems and shells.

PR:

Working on it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions