CLI Reference¶
PromptFrame ships with a command-line tool for managing prompts and skills without writing Python. It uses Rich for formatted, colourised output.
Commands are split into two groups — prompt commands (top-level) and skill subcommands (under skill).
Prompt commands¶
init — scaffold a prompt file¶
Create a new YAML prompt file from a template.
| Argument | Description |
|---|---|
template |
regular or model |
output |
Destination file path |
-f, --force |
Overwrite if the file already exists |
list — list prompt files¶
List all YAML prompt files in a directory.
path defaults to . (current directory).
inspect — inspect a prompt file¶
Show metadata and a summary of all prompts in a file.
Prints a metadata table (version, type, name, project, prompt count) followed by a table of all prompt IDs and their descriptions.
render — render a single prompt¶
Print a specific prompt's text to the terminal with syntax highlighting.
Renders output_instruction for model prompts when no prompt field is present.
validate — validate prompt files¶
Check all YAML files in a directory for required fields (version, metadata, prompts, and pid on each prompt).
Prints VALID or INVALID per file, then a summary panel showing passed/failed counts.
lint — lint prompt files¶
Check for quality issues beyond structural validity. Currently flags prompts that are missing a description.
Tip
Run validate first (structure), then lint (quality). They serve different purposes.
diff — compare two prompt files¶
Show which prompts were added, removed, or modified between two versions of a prompt file. Modified prompts get a unified diff.
Useful when reviewing changes before a deploy or when auditing prompt history in git.
export — export a prompt file¶
Export a YAML prompt file to another format.
| Argument | Description |
|---|---|
file |
Path to the YAML prompt file |
--format |
Output format. Currently json only (default: json) |
-o, --output |
Write to a file instead of printing to stdout |
# Print JSON to terminal
promptframe export prompts/invoice.yaml
# Write to a file
promptframe export prompts/invoice.yaml -o invoice.json
scaffold — scaffold an environment directory structure¶
Create a standard dev / test / prod / common folder structure for environment-aware prompt management.
| Argument | Default | Description |
|---|---|---|
path |
prompts |
Base directory to scaffold into |
--example |
off | Create an example prompt file in common/ |
-f, --force |
off | Allow scaffolding into a non-empty directory |
# Default: creates prompts/dev, prompts/test, prompts/prod, prompts/common
promptframe scaffold
# Custom path with an example file
promptframe scaffold my_prompts/ --example
Resulting structure:
Each folder gets a .gitkeep so it's tracked by git even when empty. See Environments for how to load from this structure.
version — show version¶
Skill commands¶
All skill commands live under the skill subcommand:
skill init — create a new skill¶
Create a SKILL.md template inside a named folder.
| Argument | Default | Description |
|---|---|---|
name |
required | Skill folder name (e.g. code-review) |
--path |
skills |
Parent directory to create the skill folder inside |
-f, --force |
off | Overwrite if SKILL.md already exists |
promptframe skill init code-review
# Creates: skills/code-review/SKILL.md
promptframe skill init data-analysis --path my_skills/
# Creates: my_skills/data-analysis/SKILL.md
skill list — list skills¶
Show all skills in a directory in a formatted table (key, name, description, tags).
path defaults to skills.
skill inspect — inspect a skill¶
Show metadata and section headings for a single skill.
Prints a metadata table (name, description, version, tags, source path) followed by a table of all section headings.
skill render — render a skill¶
Print a skill's content to the terminal with syntax highlighting.
| Argument | Default | Description |
|---|---|---|
key |
required | Skill key (folder name or file stem) |
--path |
skills |
Skills directory |
--section |
all | Section heading to include. Repeatable |
--no-name |
off | Omit the skill name heading |
# Render full skill
promptframe skill render code-review
# Render one section
promptframe skill render code-review --section Security
# Render multiple sections
promptframe skill render code-review --section Security --section Correctness
# Without the name heading
promptframe skill render code-review --no-name
skill validate — validate skills¶
Check all skill files in a directory for required content (name present, non-empty content).
path defaults to skills.
Prints VALID or INVALID per file with a summary panel.
skill lint — lint skills¶
Check skill files for quality issues — flags skills missing a description or tags.
skill diff — compare two skill files¶
Show a unified diff between two SKILL.md files.
skill search — search skills¶
Search across skill keys, names, descriptions, and tags.
Returns a table of matching skills. Matching is case-insensitive substring search across all metadata fields.
Typical workflows¶
Starting a new project:
# Scaffold environment folders
promptframe scaffold prompts/ --example
# Add your first prompt file
promptframe init regular prompts/common/my_prompts.yaml
# Validate everything is correct
promptframe validate prompts/
# Lint for quality
promptframe lint prompts/
Working with skills:
# Create a skill
promptframe skill init code-review
# Edit skills/code-review/SKILL.md in your editor
# Check it's valid
promptframe skill validate
# Preview a section before using it in a prompt
promptframe skill render code-review --section Security
Reviewing changes before a deploy: