Skip to main content

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:
With --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:
Output:
List all versions:
Output:

Notes

  • If the prompts directory does not exist, a warning is displayed.
  • If no prompts are found, an informational message is shown.
  • Descriptions come from the prompt’s root metadata.json, and a version may override the shared description in its own metadata.json.

prompt:activate

Activate a specific version of a prompt.

Arguments

Examples

Output:

How it works

  • With database tracking enabled: Updates the prompt_versions table — sets is_active = false on all versions for that prompt, then is_active = true on the specified version.
  • Without tracking: Writes the active_version key to the prompt’s root metadata.json file.

Error handling

If the prompt or version does not exist, an error message is displayed:

prompt:diff

Show differences between two prompt versions using unified diff output.

Arguments

Options

Examples

Compare all role files between v1 and v2:
Output:
Compare only system prompts:
Compare only user prompts:

Notes

  • Both --v1 and --v2 are 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/diff for 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:
Output:
Test a specific version with variables:
Output:
Test with custom input:

Notes

  • The --variables option expects valid JSON. Invalid JSON produces an error: Invalid JSON for --variables.
  • Expected variables (from metadata.json) are displayed as a hint, if available.
  • Both the rendered system and user prompts are displayed.
  • Unmatched variables remain as placeholders in the output, making it easy to spot missing values.