mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-06 12:37:37 +00:00
config(git,claude,ssh): templated gitconfig; claude settings/commands/hooks/skills; ssh config
gitconfig: name/email from chezmoi data, gh credential helper by PATH lookup (portable to darwin). claude: no credentials, history, projects, sessions, or plugin caches. ssh config as private_ (0600). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3c691e8dc5
commit
20891f3910
476 files changed
+59086
-7
No files matched your search
@@ -0,0 +1,49 @@
|
||||
# Sandbox SDK Examples
|
||||
|
||||
All examples: https://github.com/cloudflare/sandbox-sdk/tree/main/examples
|
||||
|
||||
## Example Index
|
||||
|
||||
| Example | Use Case | Key File |
|
||||
|---------|----------|----------|
|
||||
| `minimal` | Basic setup, exec, file ops | `src/index.ts` |
|
||||
| `code-interpreter` | AI code execution with Workers AI | `src/index.ts` |
|
||||
| `openai-agents` | OpenAI Agents SDK integration | `src/index.ts` |
|
||||
| `opencode` | OpenCode agent integration | `src/index.ts` |
|
||||
| `claude-code` | Claude Code agent integration | `src/index.ts` |
|
||||
| `typescript-validator` | TypeScript compilation/validation | `src/index.ts` |
|
||||
| `authentication` | Auth patterns for sandboxes | `src/index.ts` |
|
||||
|
||||
## When to Use Which Example
|
||||
|
||||
| Building | Start With |
|
||||
|----------|------------|
|
||||
| AI code execution | `code-interpreter` |
|
||||
| Agent with shell + file editing | `openai-agents` |
|
||||
| Basic command execution | `minimal` |
|
||||
| Code validation service | `typescript-validator` |
|
||||
| Multi-user sandboxes | `authentication` |
|
||||
|
||||
## Common Patterns from Examples
|
||||
|
||||
**Sandbox per user/session** (from `openai-agents`):
|
||||
```typescript
|
||||
const sandbox = getSandbox(env.Sandbox, `session-${sessionId}`);
|
||||
```
|
||||
|
||||
**Code context reuse** (from `code-interpreter`):
|
||||
```typescript
|
||||
const pythonCtx = await sandbox.createCodeContext({ language: 'python' });
|
||||
const result = await sandbox.runCode(code, { context: pythonCtx });
|
||||
```
|
||||
|
||||
**Resource cleanup** (from `code-interpreter`):
|
||||
```typescript
|
||||
try {
|
||||
// ... use sandbox
|
||||
} finally {
|
||||
await sandbox.destroy();
|
||||
}
|
||||
```
|
||||
|
||||
Fetch the full example source when implementing similar patterns.
|
||||
Reference in new issue
Block a user