CLI reference

Installation

npm install -g @promptlayer-hub/cli
# or
brew install promptlayer-hub

Authentication

plh auth login
# Opens browser, asks for API key

Commands

plh prompts list

List prompts in workspace.

plh prompts get <name>

Print prompt definition.

plh prompts create --file prompt.yaml

Create from YAML file:

name: support/greeting
template: "Hello {{ name }}..."
model: claude-3-sonnet
parameters:
  temperature: 0.7

plh run <name> --var name=Alice

Execute a prompt inline.

plh eval start <prompt> --rubric "Polite, under 100 words"

Start evaluation run.

plh eval results <eval-id>

Show evaluation scores and examples.

plh logs --follow

Tail execution logs (useful for debugging).