src prompts create

Create a new prompt in your Sourcegraph instance.

Usage

BASH
src 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

FlagDescription
-nameThe prompt name (required)
-descriptionDescription of the prompt (required)
-contentThe prompt template text content (required)
-ownerThe ID of the owner (user or organization) (optional, defaults to current user)
-tagsComma-separated list of tag IDs
-draftWhether the prompt is a draft (default: false)
-visibilityVisibility of the prompt: PUBLIC or SECRET (default: "PUBLIC")
-auto-submitWhether the prompt should be automatically executed in one click (default: false)
-modeMode to execute prompt: CHAT, EDIT, or INSERT (default: "CHAT")
-recommendedWhether the prompt is recommended (default: false)

API flags

FlagDescription
-dump-requestsLog GraphQL requests and responses to stdout
-get-curlPrint the curl command for executing this query and exit (WARNING: includes printing your access token!)
-insecure-skip-verifySkip validation of TLS certificates against trusted chains
-traceLog the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetryInclude the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true)