src prompts create
Create a new prompt in your Sourcegraph instance.
Usage
BASHsrc prompts create [flags]
Examples
BASH# Create a basic prompt (uses current user as owner) src prompts create \ -name="go-error-handling" \ -description="Best practices for Go error handling" \ -content="Write a Go function that properly handles errors..." # Create a prompt with tags src prompts create \ -name="python-optimization" \ -description="Python performance optimization tips" \ -content="Optimize this Python code for better performance..." \ -tags="UHJvbXB0VGFnOjE=,UHJvbXB0VGFnOjI=" # Create a draft prompt src prompts create \ -name="draft-prompt" \ -description="Work in progress prompt" \ -content="This prompt is still being developed..." \ -draft # Create a recommended prompt with auto-submit src prompts create \ -name="recommended-prompt" \ -description="A recommended prompt for common use" \ -content="This is a recommended prompt..." \ -recommended \ -auto-submit # Create a secret prompt for INSERT mode src prompts create \ -name="secret-insert-prompt" \ -description="Secret prompt for code insertion" \ -content="Insert code here..." \ -visibility="SECRET" \ -mode="INSERT" # Create a prompt with explicit owner (optional) src prompts create \ -name="team-shared-prompt" \ -description="A prompt shared with a specific owner" \ -content="This prompt has an explicit owner..." \ -owner="VXNlcjox"
Flags
| Flag | Description | 
|---|---|
| -name | The prompt name (required) | 
| -description | Description of the prompt (required) | 
| -content | The prompt template text content (required) | 
| -owner | The ID of the owner (user or organization) (optional, defaults to current user) | 
| -tags | Comma-separated list of tag IDs | 
| -draft | Whether the prompt is a draft (default: false) | 
| -visibility | Visibility of the prompt: PUBLIC or SECRET (default: "PUBLIC") | 
| -auto-submit | Whether the prompt should be automatically executed in one click (default: false) | 
| -mode | Mode to execute prompt: CHAT, EDIT, or INSERT (default: "CHAT") | 
| -recommended | Whether the prompt is recommended (default: false) | 
API flags
| Flag | Description | 
|---|---|
| -dump-requests | Log GraphQL requests and responses to stdout | 
| -get-curl | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | 
| -insecure-skip-verify | Skip validation of TLS certificates against trusted chains | 
| -trace | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | 
| -user-agent-telemetry | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) |