Introduction
Deck by PromptPHP registers five Artisan commands for managing your prompts from the command line. All commands are available when running in the console.make:prompt
Create a new prompt structure for your AI agent.Arguments
Options
Examples
Output
Behaviour with existing prompts
When run against a prompt that already exists, the command presents a choice:--force, the latest version is overwritten without prompting.
See Creating prompts for comprehensive documentation.
prompt:list
List all available prompts and their versions.Options
Examples
List active versions only:Notes
- If the prompts directory does not exist, the command displays a warning.
- If the command finds no prompts, it shows an informational message.
- Descriptions come from the prompt’s root
metadata.json, and a version may override the shared description in its ownmetadata.json.
prompt:activate
Activate a specific version of a prompt.Arguments
Examples
How it works
- With database tracking enabled: Updates the
prompt_versionstable. It setsis_active = falseon all versions for that prompt, thenis_active = trueon the specified version. - Without tracking: Writes the
active_versionkey to the prompt’s rootmetadata.jsonfile.
Error handling
If the prompt or version does not exist, the command displays an error message:prompt:diff
Show differences between two prompt versions using unified diff output.Arguments
Options
Examples
Compare all role files between v1 and v2:Notes
- Both
--v1and--v2are required. The command fails with an error if either is missing. - If a role file exists in one version but not the other, the diff shows the full content as added or removed.
- If a role file doesn’t exist in either version, it is silently skipped.
- Uses
sebastian/difffor unified diff output.
prompt:test
Test a prompt with sample input and see the rendered result.Arguments
Options
Examples
Test the active version with defaults:Notes
- The
--variablesoption expects valid JSON. Invalid JSON produces an error:Invalid JSON for --variables. - The command displays expected variables (from
metadata.json) as a hint, if available. - The command displays both the rendered system and user prompts.
- Unmatched variables remain as placeholders in the output, making it easy to spot missing values.