Quick Start
Get up and running with PromptOps in under 5 minutes. This guide will walk you through installing the CLI, initializing your project, and registering your first prompt.
1. Install the CLI
Install the PromptOps CLI globally via npm. Requires Node.js 18 or later.
npm install -g @promptops/cli
Verify the installation by running promptops --version
2. Initialize your project
Navigate to your project directory and run the init command. This creates a promptops.config.ts and a /prompts directory.
cd my-ai-app promptops init # The wizard will ask: # ? Project name: my-ai-app # ? Default model: claude-sonnet # ? Enable auto-optimization: yes
3. Register your first prompt
Use the SDK to register a prompt. Once registered, it's version-controlled and ready for optimization.
import { promptops } from "@promptops/sdk";
const prompt = await promptops.register({
name: "support-agent",
model: "claude-sonnet",
prompt: `You are a helpful customer support agent.
Answer questions clearly and concisely.`,
tags: ["support", "production"]
});
console.log(prompt.version); // "v1.0"4. Optimize (optional)
Run auto-optimization to improve your prompt's accuracy against a dataset.
const result = await promptops.optimize({
prompt: "support-agent",
dataset: "customer-tickets-q4",
objective: "accuracy",
iterations: 25
});
// Result: accuracy 0.73 → 0.89Next steps
- Read Concepts to understand the operations pipeline
- Set up Configuration for your team
- Browse Examples for real-world use cases