Prerequisites
- A GitHub or Google account for authentication
- The Prompts CLI installed on your machine
Installation
Install the Prompts CLI using your preferred package manager:Authenticate with Prompts.dev
Login using GitHub or Google OAuth:This will open your browser to complete the OAuth flow. By default, GitHub is used as the provider.To use Google instead:Expected output:Your JWT token is securely stored in
The CLI starts a local server on port 9876 to receive the OAuth callback. You’ll see “Login successful. You can close this tab.” in your browser when complete.
~/.prompts/config.json.Create your first prompt package
Initialize a new prompt package:This scaffolds a new prompt package with the following structure:Expected output:
Configure your prompt
Navigate to your prompt directory and edit the Here’s what the default manifest looks like:Update the manifest with your information:
prompt.yaml manifest:prompt.yaml
name: Unique identifier for your promptdescription: What your prompt doesversion: Semantic version (e.g., 1.0.0, 1.1.0)author: Your usernameinputs: Variables your prompt acceptstags: Categories for discoverability
prompt.md file to define your prompt template:prompt.md
Use
{{variable_name}} syntax to define template variables that match the inputs in your prompt.yaml.Publish your prompt
Publish your prompt to the Prompts.dev registry:The CLI will:
- Load and validate your
prompt.yamlmanifest - Create a tarball of your prompt package
- Upload it to the registry
Next steps
Authentication
Learn about OAuth flows and token management
Prompt Packages
Deep dive into prompt package structure
CLI Workflow
Master the complete CLI workflow
API Reference
Explore the REST API endpoints
Troubleshooting
Login timeout
If login times out after 2 minutes, ensure:- Port 9876 is not blocked by a firewall
- Your browser can reach
localhost:9876 - You completed the OAuth flow in the browser
Missing required variables
If you see an error likemissing required --var product, ensure all required inputs from prompt.yaml are provided with the --var flag.
Unauthenticated errors
If API calls fail with authentication errors:- Verify your token exists:
cat ~/.prompts/config.json - Re-authenticate:
prompt login - Check the API endpoint: ensure
PROMPTS_API_URLenvironment variable is set correctly (defaults tohttps://api.prompts.dev/v1)