raysurfer) is a standalone Python tool for interacting with the code cache. Use it in scripts, CI pipelines, or directly from your terminal.
Installation
Setup
Commands
Search
Find cached code matching a task description:| Flag | Description | Default |
|---|---|---|
--top-k, -k | Maximum results | 5 |
--min-score, -s | Minimum verdict score (0-1) | 0.3 |
--public, -p | Include community public snippets | off |
--show-code, -c | Display source from top match | off |
--json, -j | Output as JSON | off |
Upload
Upload code files to the cache after a successful execution:| Flag | Description | Default |
|---|---|---|
--file, -f | File to upload (repeatable) | required |
--succeeded/--failed | Whether the execution succeeded | succeeded |
--no-auto-vote | Disable automatic upvote on upload | off |
Vote
Provide feedback on cached code quality:| Flag | Description | Default |
|---|---|---|
--up/--down | Upvote or downvote | up |
--task, -t | Original task description | none |
Patterns
Get proven task-to-code mappings:Examples
Get few-shot examples for prompting:Version
Python Library
The CLI also exports sync and async clients for use in your own code:Configuration
| Environment Variable | Description | Default |
|---|---|---|
RAYSURFER_API_KEY | API key (required) | none |
RAYSURFER_BASE_URL | API base URL | https://api.raysurfer.com |
RAYSURFER_TIMEOUT | Request timeout in seconds | 30 |
