Skip to content

Add structkit vars command to inspect structure variables #135

@httpdss

Description

@httpdss

Summary

Add a structkit vars command that prints variables declared by a structure definition without generating files.

Motivation

Users need to know required inputs before running generate, especially for CI and non-interactive workflows.

Proposed behavior

  • Accept built-in, custom-path, and local YAML structure definitions using the same resolution behavior as generate.
  • Display variable name, type, default value, description/help text, and whether the value is required or optional.
  • Support the existing --structures-path option.
  • Support machine-readable output, e.g. --json.
  • Exit non-zero when the structure cannot be found or the config is invalid.

Example usage

  • structkit vars project/python
  • structkit vars ./my-struct.yaml --json

Acceptance criteria

  • Command is registered in the CLI.
  • Handles structures with variables, structures without variables, custom structures, and local YAML files.
  • Includes tests for text output and JSON output.
  • Documentation includes usage examples.

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