Skip to content

Add structkit sources command to manage custom structure sources #139

@httpdss

Description

@httpdss

Summary

Add a structkit sources command group for managing named custom structure sources.

Motivation

StructKit currently supports custom structures through STRUCTKIT_STRUCTURES_PATH and command flags. A source-management command would make custom template locations easier to configure, inspect, share, and use consistently.

Proposed behavior

Add a command group with subcommands such as:

  • structkit sources list
  • structkit sources add <name> <path-or-url>
  • structkit sources remove <name>
  • structkit sources show <name>
  • structkit sources validate <name>

Sources could initially support local filesystem paths, with remote source support considered later.

Configuration considerations

  • Store source configuration in a user-level StructKit config file.
  • Preserve compatibility with STRUCTKIT_STRUCTURES_PATH.
  • Define clear precedence when both named sources and --structures-path are used.
  • Avoid changing existing generate, list, search, and info behavior unless a source is explicitly selected.

Example usage

  • structkit sources add company ./templates
  • structkit sources list
  • structkit list --source company
  • structkit generate company/project/python ./app

Acceptance criteria

  • Command group is registered in the CLI.
  • Users can add, list, show, validate, and remove local sources.
  • Existing structures-path behavior remains compatible.
  • Tests cover source config read/write, invalid paths, missing sources, and precedence behavior.
  • Documentation explains how sources relate to STRUCTKIT_STRUCTURES_PATH.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions