|
| 1 | +# src prompts list |
| 2 | + |
| 3 | +List all prompts in your Sourcegraph instance. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +```bash |
| 8 | +src prompts list [flags] |
| 9 | +``` |
| 10 | + |
| 11 | +## Examples |
| 12 | + |
| 13 | +```bash |
| 14 | +# List all prompts |
| 15 | +src prompts list |
| 16 | + |
| 17 | +# Search prompts by name, description, or content |
| 18 | +src prompts list -query="error handling" |
| 19 | + |
| 20 | +# Filter prompts by tag IDs |
| 21 | +src prompts list -tags="UHJvbXB0VGFnOjE=,UHJvbXB0VGFnOjI=" |
| 22 | + |
| 23 | +# List prompts for a specific owner |
| 24 | +src prompts list -owner="VXNlcjox" |
| 25 | + |
| 26 | +# List only recommended prompts |
| 27 | +src prompts list -recommended-only |
| 28 | + |
| 29 | +# List built-in prompts only |
| 30 | +src prompts list -builtin-only |
| 31 | + |
| 32 | +# Include built-in prompts with user prompts |
| 33 | +src prompts list -include-builtin |
| 34 | + |
| 35 | +# Exclude draft prompts |
| 36 | +src prompts list -include-drafts=false |
| 37 | + |
| 38 | +# List prompts owned by viewer or their organizations |
| 39 | +src prompts list -affiliated |
| 40 | + |
| 41 | +# Paginate through results |
| 42 | +src prompts list -limit=10 -after="cursor" |
| 43 | + |
| 44 | +# Select specific columns to display |
| 45 | +src prompts list -c id,name,description,visibility |
| 46 | + |
| 47 | +# Output results as JSON |
| 48 | +src prompts list -json |
| 49 | + |
| 50 | +# Complex filtering example |
| 51 | +src prompts list -query="Go" -recommended-only -include-drafts=false -json |
| 52 | +``` |
| 53 | + |
| 54 | +## Flags |
| 55 | + |
| 56 | +| Flag | Description | |
| 57 | +|------|-------------| |
| 58 | +| `-query` | Search prompts by name, description, or content | |
| 59 | +| `-owner` | Filter by prompt owner (a namespace, either a user or organization) | |
| 60 | +| `-tags` | Comma-separated list of tag IDs to filter by | |
| 61 | +| `-affiliated` | Filter to only prompts owned by the viewer or viewer's organizations | |
| 62 | +| `-recommended-only` | Whether to include only recommended prompts | |
| 63 | +| `-builtin-only` | Whether to include only builtin prompts | |
| 64 | +| `-include-builtin` | Whether to include builtin prompts | |
| 65 | +| `-include-drafts` | Whether to include draft prompts (default: true) | |
| 66 | +| `-limit` | Maximum number of prompts to list (default: 100) | |
| 67 | +| `-after` | Cursor for pagination (from previous page's endCursor) | |
| 68 | +| `-c` | Comma-separated list of columns to display. Available: id,name,description,draft,visibility,mode,tags (default: "id,name,visibility,tags") | |
| 69 | +| `-json` | Output results as JSON for programmatic access | |
| 70 | + |
| 71 | +### API flags |
| 72 | + |
| 73 | +| Flag | Description | |
| 74 | +|------|-------------| |
| 75 | +| `-dump-requests` | Log GraphQL requests and responses to stdout | |
| 76 | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | |
| 77 | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | |
| 78 | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | |
| 79 | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | |
0 commit comments