Expand description
Prompter: A CLI tool for composing reusable prompt snippets.
This library provides functionality for managing and rendering prompt snippets from a structured library using TOML configuration files. It supports recursive profile dependencies, file deduplication, and customizable output formatting.
Modules§
- completions
- Shell completion generation with dynamic profile suggestions.
Structs§
- Cli
- Command-line interface structure for the prompter tool.
- Config
- Configuration structure holding profile definitions and their dependencies.
- Tree
Node - Tree node representing a profile or fragment in the dependency tree
- Tree
Output - Complete tree structure for JSON output
Enums§
- AppMode
- Application execution modes after parsing command-line arguments.
- Commands
- Available subcommands for the prompter CLI.
- Resolve
Error - Errors that can occur during profile resolution.
- Tree
Node Type - Node type in the dependency tree
Functions§
- available_
profiles - List available profile names.
- init_
scaffold - Initialize default configuration and library structure.
- list_
profiles - List all available profiles to a writer.
- parse_
args_ from - Parse command-line arguments and return the resolved application mode.
- parse_
config_ toml - Parse TOML configuration into a Config structure.
- render_
to_ vec - Render composed profiles to a byte vector.
- render_
to_ writer - Render one or more profiles’ content to a writer.
- resolve_
app_ mode - Resolve a parsed
Clivalue into the executableAppMode. - resolve_
profile - Recursively resolve a profile’s dependencies into a list of file paths.
- run_
list_ stdout - List profiles to stdout.
- run_
render_ stdout - Render one or more profiles to stdout.
- run_
tree_ stdout - Show tree structure to stdout
- run_
validate_ stdout - Validate configuration and output results to stdout.
- show_
tree - Show tree structure for all profiles
- unescape
- Unescape special characters in strings.
- validate
- Validate configuration and library file references.