flyio-sdk-patterns

Featured

Apply production-ready Fly.io Machines API patterns for TypeScript with typed clients, machine lifecycle management, and multi-region orchestration. Trigger: "fly.io Machines API", "fly.io SDK patterns", "fly.io API client".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Fly.io SDK Patterns ## Overview Production-ready patterns for the Fly.io Machines REST API at `https://api.machines.dev`. Fly.io exposes both GraphQL (organization queries) and REST (machine lifecycle) APIs. The Machines REST API is the primary integration surface for creating, starting, stopping, and destroying VMs across 30+ global regions. A structured client ensures consistent auth, typed machine states, and reliable wait-for-state polling. ## Singleton Client ```typescript const FLY_API = 'https://api.machines.dev'; let _client: FlyClient | null = null; export function getClient(appName: string): FlyClient { if (!_client) { const token = process.env.FLY_API_TOKEN; if (!token) throw new Error('FLY_API_TOKEN must be set'); _client = new FlyClient(appName, token); } return _client; } class FlyClient { private h: Record<string, string>; constructor(private app: string, token: string) { this.h = { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }; } async listMachines(): Promise<FlyMachine[]> { const r = await fetch(`${FLY_API}/v1/apps/${this.app}/machines`, { headers: this.h }); if (!r.ok) throw new FlyError(r.status, await r.text()); return r.json(); } async createMachine(config: MachineConfig, region: string): Promise<FlyMachine> { const r = await fetch(`${FLY_API}/v1/apps/${this.app}/machines`, { method: 'POST', headers: this.h, body: JSON.stringify({ region, config }) }); if (!r.ok) throw ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

fireflies-sdk-patterns

Apply production-ready Fireflies.ai GraphQL client patterns for TypeScript and Python. Use when implementing Fireflies.ai integrations, building typed clients, or establishing team coding standards for the GraphQL API. Trigger with phrases like "fireflies SDK patterns", "fireflies best practices", "fireflies client", "fireflies GraphQL wrapper", "typed fireflies".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apify-sdk-patterns

Production-ready patterns for Apify SDK and apify-client in TypeScript. Use when building Actors with Crawlee, managing datasets/KV stores, or implementing robust client wrappers with retry and validation. Trigger: "apify SDK patterns", "apify best practices", "apify client wrapper", "crawlee patterns", "idiomatic apify".

2,266 Updated today
jeremylongshore
AI & Automation Featured

figma-sdk-patterns

Production-ready patterns for the Figma REST API and Plugin API. Use when building reusable Figma client wrappers, extracting design tokens, traversing node trees, or creating typed API helpers. Trigger with phrases like "figma patterns", "figma best practices", "figma client wrapper", "figma typed API".

2,266 Updated today
jeremylongshore
AI & Automation Featured

attio-sdk-patterns

Production-ready patterns for the Attio REST API: typed client, retry with backoff, pagination iterators, and multi-tenant factory. Trigger: "attio SDK patterns", "attio best practices", "attio client wrapper", "idiomatic attio", "attio TypeScript patterns".

2,266 Updated today
jeremylongshore
AI & Automation Featured

customerio-sdk-patterns

Apply production-ready Customer.io SDK patterns. Use when implementing typed clients, retry logic, event batching, or singleton management for customerio-node. Trigger: "customer.io best practices", "customer.io patterns", "production customer.io", "customer.io architecture", "customer.io singleton".

2,266 Updated today
jeremylongshore