Introduction
Prompt Deck registers five Artisan commands for managing your prompts from the command line. All commands are available when running in the console.| Command | Description |
|---|---|
make:prompt | Create a new prompt structure with versioned role files. |
prompt:list | List all available prompts and their versions. |
prompt:activate | Activate a specific version of a prompt. |
prompt:diff | Show differences between two prompt versions. |
prompt:test | Test a prompt with sample input and see the rendered result. |
make:prompt
Create a new prompt structure for your AI agent.Arguments
| Argument | Required | Description |
|---|---|---|
name | No | The name of the prompt. Omit for interactive mode. Automatically normalised to kebab-case. |
Options
| Option | Shorthand | Description |
|---|---|---|
--from= | Path to a custom stub file to use as the user prompt template. | |
--desc= | A short description stored in metadata.json. | |
--user | -u | Also create a user prompt file alongside the default system prompt. |
--role=* | Additional roles to scaffold. Repeatable (e.g. --role=assistant --role=developer). | |
--interactive | -i | Interactively choose which additional roles to create. |
--force | -f | Overwrite an existing prompt’s latest version without confirmation. |
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
| Option | Description |
|---|---|
--all | Show all versions for each prompt, not just the active one. |
Examples
List active versions only: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 each version’s
metadata.json.
prompt:activate
Activate a specific version of a prompt.Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | The prompt name (e.g. order-summary). |
version | Yes | The version number to activate (e.g. 2). |
Examples
How it works
- With database tracking enabled: Updates the
prompt_versionstable — 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, an error message is displayed:prompt:diff
Show differences between two prompt versions using unified diff output.Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | The prompt name (e.g. order-summary). |
Options
| Option | Required | Description |
|---|---|---|
--v1= | Yes | The first version number to compare. |
--v2= | Yes | The second version number to compare. |
--type= | No | Which role files to compare: system, user, or all (default). |
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
| Argument | Required | Description |
|---|---|---|
name | Yes | The prompt name to test (e.g. order-summary). |
Options
| Option | Description |
|---|---|
--ver= | Specific version to test. Defaults to the active version. |
--input= | Custom input text. Defaults to "Sample user input". |
--variables= | JSON string of variables for interpolation. Defaults to {}. |
Examples
Test the active version with defaults:Notes
- The
--variablesoption 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.