Guide for running inline TypeScript scripts with Bun. Use this when the user says "use inline typescript".
bun run --install=fallback - < <(cat <<'EOF'
import { z } from 'zod'
console.log(z.coerce.number().parse('5'))
EOF
)
Bun.spawn() - Process spawning and managementBun.file() - File system operations and readingBun.write() - File writing operationsfetch() - HTTP requests (Web API standard)Bun.preconnect() - URL preconnection for performanceBun.file(path) - Create file handle for reading/writingawait Bun.file(path).text() - Read file as textawait Bun.file(path).json() - Read file as JSONawait Bun.file(path).arrayBuffer() - Read file as ArrayBufferawait Bun.write(path, data) - Write data to fileimport { $ } from "bun"
await $`command` // Execute shell commands with template literals
const result = await $`ls -la` // Capture command output
Bun.gzipSync() - Synchronous gzip compressionBun.gunzipSync() - Synchronous gzip decompressionBun.inflateSync() - Synchronous deflate decompressionimport { Database } from "bun:sqlite"
// Database operations and SQL execution
import { dlopen, CString } from "bun:ffi"
// Native library interaction
Bun.escapeHTML() - HTML escapingBun.hash() - Hashing functionsBun.password.hash() - Password hashingBun.password.verify() - Password verificationnode: importsimport { createRequire } from 'node:module'Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer