Skip to content

Commands Overview

PUPT provides a comprehensive set of commands to manage your AI prompts efficiently. All commands are accessed through the pt command-line interface.

Command Structure

bash
pt [command] [options] [arguments]
  • command: The specific action to perform (optional - defaults to interactive prompt selection)
  • options: Command-specific flags and modifiers
  • arguments: Additional parameters required by the command

Available Commands

CommandPurposeQuick Example
ptInteractive prompt selection and generationpt
pt initInitialize PUPT configurationpt init
pt addCreate a new prompt filept add my-prompt.md
pt editEdit existing promptspt edit
pt runExecute prompts with AI toolspt run claude
pt historyView prompt execution historypt history -l 10
pt annotateAdd notes to history entriespt annotate 42
pt installInstall prompts from external sourcespt install user/repo
pt reviewAnalyze prompt usage patternspt review -d 7
pt helpDisplay help informationpt help run

Common Patterns

Interactive Mode

Most commands support interactive mode when run without arguments:

bash
pt         # Interactive prompt selection
pt edit    # Interactive prompt editing
pt annotate # Annotate last execution

Direct Execution

Provide arguments to skip interactive prompts:

bash
pt run claude                    # Run with specific tool
pt add api-client.md             # Create named prompt
pt history 15                    # View specific entry

Piping and Redirection

Commands support standard Unix pipes:

bash
pt | tee output.txt              # Save generated prompt
pt run | grep ERROR              # Filter output
pt history -f json | jq '.[]'    # Process with jq

Global Options

These options work with all commands:

  • --help, -h: Show help for any command
  • --version, -v: Display PUPT version
  • --debug: Enable debug logging
  • --quiet, -q: Suppress non-essential output
  • --config <path>: Use specific configuration file

Exit Codes

PUPT uses standard exit codes for scripting:

  • 0: Success
  • 1: General error
  • 2: Command line usage error
  • 3: Configuration error
  • 4: File not found
  • 5: Permission error

Getting Help

For detailed information about any command:

bash
pt help [command]
pt [command] --help

Next Steps

  • Learn about the default pt command for interactive prompt selection
  • Set up your environment with pt init
  • Create your first prompt with pt add
  • Explore advanced features in individual command documentation

Released under the MIT License.