How-to

Practical guides for working with APIs

One problem per page: the shortest answer that works, the approaches compared side by side, and what goes wrong. Every output block on every page is the real stdout of the command above it.

Browse the 17 sections

313 guides in 17 sections, with code in bash, Go, Java, JavaScript, PHP, Python, Ruby, Rust, TypeScript and YAML. Each section splits into topics, and each topic holds the guides.

13 guides in 4 topics

Get a valid credential onto every request and keep it valid: keys, tokens, OAuth and OIDC flows, signatures and mTLS, from both the client and the producer side.

Send API keys and bearer tokens 8 guides

Static credentials and short-lived tokens on plain HTTP from the client side: header versus query placement, key rotation without dropped requests, per-environment keys, token refresh without a race, scoping to least privilege, detecting leaked keys.

TypeScript, JavaScript · Beginner

Add a bearer token to fetch without a client library

Wrap fetch in one function that sets Authorization for a single API origin, so no call site forgets the token and no redirect carries it to another host.

AuthenticationAPI keysSecurity

PHP · Intermediate

Add an API key with Guzzle middleware in PHP

Add an X-API-Key header to every Guzzle request for one API origin with a `mapRequest` middleware, keep it off redirects to other hosts, and test it offline.

API keysAuthenticationSecurityTesting

TypeScript · Intermediate

Call a keyed API from a browser without shipping the key

Put the provider's key on a route you control, refuse that route to other sites, and search the bundle for the secret before every release.

API keysCredentials and secretsSecurityEdge and serverless

TypeScript, JavaScript · Beginner

Catch a leaked API key before it reaches the repository

Layer a gitleaks hook, GitHub push protection, a TruffleHog scan in CI, and a Thinkst canary key, then plant a key to prove which layer catches it and when.

Credentials and secretsAPI keysSecurityGit and repositoriesCI and automation

TypeScript, JavaScript · Beginner

Choose between header and query placement for an API key

Pick where an API key travels, header, query string, or cookie, by sending each form through a logging proxy and reading back which records keep the key.

API keysAuthenticationSecurityCaching

TypeScript, JavaScript · Intermediate

Diagnose a 401 or a 403 from a credential

Read the WWW-Authenticate challenge rather than the status code, so a client can tell the credential failures apart and take the action that fixes each.

AuthenticationDebuggingError handlingOAuth and OIDC

TypeScript, JavaScript · Beginner

Keep test and live API keys from crossing environments

Put the environment in the key itself and check it at process start, so a staging deployment holding a production credential refuses to run.

API keysCredentials and secretsConfigurationSecurity

TypeScript, JavaScript · Advanced

Refresh an access token once under concurrent requests

Hold the refresh in a single promise so concurrent callers await the same request, and callers that all see an expired token make one call to the token endpoint.

AuthenticationOAuth and OIDCCredentials and secrets

Run OAuth 2.1 and OIDC flows 3 guides

Choosing and implementing the flow from the client side: authorization code with PKCE, client credentials, device code, refresh-token rotation, token introspection, OIDC discovery, and why the implicit and password grants are gone.

Go, Python · Beginner

Get a client credentials token for calls between services

Get a machine token with grant_type=client_credentials, name the API by audience or scope, cache it until it nears expiry, and prove it by counting token requests.

OAuth and OIDCAuthenticationRate limitsSecurity

TypeScript · Intermediate

Run authorization code with PKCE in a single-page app

Log a user into a browser-only app with PKCE, keep the tokens in memory, renew them silently after a reload, and prove nothing is ever written to local storage.

OAuth and OIDCAuthenticationSecurity

TypeScript, JavaScript, Go · Advanced

Run the client credentials flow inside a generated SDK

Make the generated client fetch and renew its own machine token, through a generator setting or a feature you write, and prove that one token serves many calls.

OAuth and OIDCAuthenticationSDK generationCustomization

Design an authentication scheme for your API 1 guide

The producer side: API keys versus OAuth 2.1 versus OIDC, scope design that limits blast radius without blocking common tasks, key formats and prefixes for secret scanning, token lifetimes, revocation, service accounts, per-customer keys, and the resource-server rules that let MCP clients and agents authenticate.

TypeScript, JavaScript · Advanced

Enforce scopes at the resource server, not in the client

Turn the scope table in your OpenAPI document into checks on every request, prove them with a negative test suite, and answer refusals as 403 problems.

AuthorizationOAuth and OIDCSecurityAPI design

Sign requests and use mTLS 1 guide

Proving who sent the request: HMAC signatures in the AWS SigV4 style, HTTP Message Signatures (RFC 9421), JWT client assertions, and mutual TLS with certificate rotation, on both sides.

TypeScript, JavaScript, Python, Go · Intermediate

Authenticate to the token endpoint with a client assertion

Build a short-lived, single-use JWT, sign it with the client's private key, post it as client_assertion in place of a secret, and watch a reused one be refused.

OAuth and OIDCAuthenticationSecurityCredentials and secrets

21 guides in 5 topics

Timeouts, retries, backoff, rate limits, idempotency, caching and error handling, on the client and server side of any API.

Set retries and timeouts 5 guides

Deadline and retry policy for outbound calls: connect versus read timeouts, exponential backoff with jitter, retry budgets, which status codes and transport errors are retryable, retrying streaming and non-idempotent calls, circuit breakers, and adding the behavior to an SDK you ship.

TypeScript, JavaScript · Intermediate

Add a circuit breaker to an outbound HTTP client

Stop calling a failing dependency, try one request after a cool-off, and close the circuit only if it succeeds, so an outage costs one timeout not thousands.

Resilience patternsRetries and backoffTimeoutsError handling

TypeScript, JavaScript · Intermediate

Enforce one total deadline across all retry attempts

Create the deadline once before the first attempt and compose it with each per-attempt timeout, so retries and their waits come out of one budget.

TimeoutsRetries and backoff

TypeScript, JavaScript · Beginner

Retry fetch calls with exponential backoff in Node.js

Retry only the statuses the server meant as temporary, back off with full jitter, and honor Retry-After, so a shared outage does not become a stampede.

Retries and backoffRate limitsError handling

TypeScript, JavaScript · Intermediate

Time out fetch calls with AbortSignal in Node.js

Put a hard deadline on every fetch call with AbortSignal.timeout, merge it with a caller's own signal, and tell a deadline apart from a cancellation.

TimeoutsError handling

Set and respect rate limits 3 guides

Both sides of a quota: publishing RateLimit header fields (IETF draft) and Retry-After, 429 versus 503, per-key and per-tenant limits, burst allowances; and on the client, reading the headers, client-side token buckets, shared limiters in Redis for many workers, concurrency limits, queueing for bursty agent traffic.

TypeScript · Beginner

Choose between 429 and 503 when you throttle a request

Return 429 when one caller has spent its quota and 503 when the server is out of capacity, each with Retry-After and a body that names the policy.

Rate limitsError handlingResilience patternsAPI design

TypeScript, JavaScript · Intermediate

Rate limit by API key and tenant, not client IP

Enforce one limit per API key and a larger one per tenant, so a noisy key cannot spend a customer's whole allowance and one customer cannot spend yours.

Rate limitsAPI keysAuthentication

TypeScript, JavaScript · Intermediate

Read RateLimit headers and slow down before you get a 429

Read the remaining quota and the reset time from each successful response and space the requests so the window runs out as it ends, with no 429 halfway through.

Rate limitsResilience patterns

Make writes safe to retry 1 guide

Making a retried write safe on both sides: the Idempotency-Key header (IETF draft), key generation and storage, fingerprinting request bodies, server-side replay windows, conflicts on mismatched payloads, and at-least-once delivery semantics.

TypeScript, JavaScript · Intermediate

Make queue consumer writes safe under redelivery

Derive an idempotency key from the message rather than from the attempt, so a broker that delivers at least once cannot charge a customer twice.

IdempotencyEvents and messaging

Cache API responses 4 guides

Client and server caching: ETag and If-None-Match, Cache-Control, stale-while-revalidate, TTL caches, cache keys that include auth, invalidation on write, CDN caching of API responses.

TypeScript, Python · Intermediate

Share an API response cache across many workers with Redis

Move a per-process response cache into Redis so forty workers pay one miss per key, with a lock on the miss and a policy that keeps cookies out of the shared store.

CachingServices and architecture

Handle and design API errors 8 guides

Errors a client and an agent can act on, from both sides: RFC 9457 problem details, stable error codes, field-level validation errors, retryable versus terminal taxonomies, partial failures in batches, mapping HTTP status to typed errors per language, and fail-safe semantics for autonomous callers (no vague 500s, 429 always with Retry-After).

PHP · Intermediate

Design an exception hierarchy for a PHP API client

Give a PHP API client one marker interface and a small exception tree, so callers catch everything from your package in one clause, or one failure class at a time.

Error handlingSDK design

Advanced

Design error responses an autonomous agent can act on

Give an LLM caller a stable code, the parameter at fault, a next step, and a structured delay, so it fixes, waits, or stops instead of retrying a 500 forever.

Error handlingAPI designRetries and backoff

Advanced

Evolve an error contract without breaking clients

Add codes, retire codes and reword messages while clients in production keep working, with a catalog diff that fails the build on the changes that break them.

Error handlingVersioning and deprecationCI and automation

Rust · Intermediate

Model API errors in Rust with thiserror and Result

Give a Rust API client one error enum with a variant per failure class, derived with thiserror and returned from every method, so callers match on what went wrong.

Error handlingSDK design

Intermediate

Report partial failure in a batch endpoint

Return one outcome per item when a batch of writes half succeeds, name each failed item by the id the client sent, and never answer 200 when nothing was written.

Error handlingAPI design

TypeScript, JavaScript · Intermediate

Return validation errors a client can map to a form

Answer a bad request with an RFC 9457 problem document carrying one JSON Pointer entry per failing field, so a client can attach each message to an input.

Error handlingValidationAPI design

Advanced

Translate upstream API errors behind your own API

Decide what your API returns when a provider it depends on fails, without leaking the provider's status codes, messages, or credential problems to callers.

Error handlingAPI designSecurity

TypeScript, JavaScript · Intermediate

Verify every error response matches one schema

Prove that no endpoint can return an error body outside your problem schema, using a lint over the description and a runtime check against the running service.

Error handlingLinting and governanceTestingOpenAPI

18 guides in 4 topics

Reading collections page by page, streaming, bulk jobs, file transfer, loading API data into notebooks, and scheduled pipelines that keep a copy in sync.

Paginate collections 9 guides

Cursor versus offset versus keyset versus Link header (RFC 8288) pagination, on both sides: designing a list endpoint that survives inserts and deletes, page-size negotiation, stable ordering, total counts, backwards paging; and on the client, auto-pagination iterators, parallel page fetching with backpressure, paging over GraphQL connections.

TypeScript, JavaScript · Beginner

Advertise next and previous pages with Link headers

Send the next, previous, first and last page URLs in a Link header, so clients follow links you build rather than assembling query strings themselves.

PaginationAPI design

TypeScript, JavaScript · Beginner

Choose a pagination style for a list endpoint

Compare the four ways to page a list on what decides it: whether a caller can miss a row when the data shifts, and what the query costs at page 900.

PaginationAPI design

TypeScript, JavaScript · Intermediate

Describe pagination so generators can follow it

Put enough in the OpenAPI document that a generated client can walk a collection by itself, instead of handing every consumer a single-page call.

PaginationOpenAPISDK generation

TypeScript, JavaScript · Intermediate

Encode and sign opaque pagination cursors

Encode the page position as base64url JSON and sign it with HMAC, so callers carry a cursor without reading it and a tampered one never reaches your query.

PaginationRequest signingSecurity

TypeScript, JavaScript · Beginner

Loop over every page of a REST collection

Walk a paginated list endpoint to the end, read the three stop signals APIs actually send, and refuse to loop forever when a server repeats its cursor.

PaginationSDK design

TypeScript, JavaScript · Intermediate

Migrate an API from offset to cursor pagination

Move a list endpoint from offset to cursor pagination without breaking the clients still sending an offset, and show why the change is worth making.

PaginationVersioning and deprecationAPI design

TypeScript, JavaScript · Beginner

Negotiate page size between an API and its clients

Clamp an over-large page size to your ceiling rather than rejecting it, say in the response what was served, and refuse only values that are not sizes.

PaginationAPI design

Ruby · Intermediate

Paginate an API with a Ruby enumerator

Wrap a paged list in an Enumerator that fetches pages as rows are pulled, so first(50) stays cheap, lazy.select stops early, and a 503 surfaces where you iterate.

PaginationSDK design

PHP · Intermediate

Paginate an API with PHP generators

Walk a paginated collection with a generator, so a caller writes one foreach, pages are fetched only as they are consumed, and an early break costs nothing.

PaginationSDK design

Stream responses and subscriptions 3 guides

Server-Sent Events, WebSockets, chunked and NDJSON responses, long polling, resumable streams with last-event ids, backpressure, reconnection, and streaming LLM tokens to a client, from both the producer and consumer side.

TypeScript, JavaScript · Advanced

Add backpressure to a WebSocket consumer

Keep a slow sink from being overrun by a fast WebSocket feed: pause the socket in Node, read a WebSocketStream where it exists, or window acknowledgements.

StreamingResilience patterns

TypeScript, JavaScript · Intermediate

Consume Server-Sent Events with fetch and custom headers

Read an SSE endpoint that needs a bearer token or a POST body, which EventSource cannot send, and own reconnection, the retry field and Last-Event-ID yourself.

StreamingAuthenticationRetries and backoff

Run bulk jobs and move files 4 guides

Bulk import and export, batch endpoints, async jobs with status polling, multipart and resumable uploads (tus, S3 multipart), presigned URLs, and large downloads.

TypeScript, JavaScript · Intermediate

Batch writes without losing per-item error detail

Answer a batch write with one result per input, keyed by the client's id, under an errors flag, so a client retries only what did not land.

API designError handlingRetries and backoff

Python · Intermediate

Import a CSV file through a bulk ingest job from a script

Normalize an exported CSV, run it through a Bulk API 2.0 ingest job, then download the failed and unprocessed rows and prove every row has exactly one result.

File transferLong-running jobsError handling

Python · Beginner

Poll a job status endpoint with backoff

Poll a job until it reaches a terminal state: honor Retry-After, back off with jitter when the server sends none, and stop at a deadline with the job id in hand.

Long-running jobsRetries and backoffTimeouts

TypeScript, Python · Intermediate

Upload a large file with resumable chunks

Resume an upload from the last byte the server confirmed after a dropped connection or a closed tab, with tus, S3 multipart, Google resumable uploads, or your own.

File transferResilience patterns

Load API data into notebooks and DataFrames 2 guides

For analysts: paginated endpoints into pandas and Polars DataFrames, DuckDB httpfs and JSON functions over API responses, caching responses on disk while exploring, rate limits inside a notebook, flattening nested JSON into columns (pandas.json_normalize, jq, struct), Observable and Deno notebooks for JavaScript.

JavaScript · Intermediate

Load API data into Observable Framework with a data loader

Write a data loader that fetches a paginated API under Node at build time with a key from the environment, and read its JSON on the page with FileAttachment.

Credentials and secretsPaginationPublishing and releases

Python · Intermediate

Ship a DataFrame-first Python client for your analysts

Generate a package where one call drains a paginated endpoint into a typed pandas frame, against a helper over `openapi-python-client` and a dlt source.

SDK generationData transformationPaginationOpenAPI

11 guides in 4 topics

GraphQL, gRPC and protobuf, webhooks, and event streams, alongside or instead of REST, from both the producer and consumer side.

Integrate with GraphQL 2 guides

Consuming and exposing GraphQL: typed clients (graphql-codegen, Apollo, urql, graphql-request, gqlgen, Ariadne, Strawberry), persisted queries, connections pagination, batching and the N+1 problem, federation, REST-to-GraphQL gateways, and when to add a GraphQL layer at all.

TypeScript, JavaScript · Intermediate

Implement Relay connections in a GraphQL schema

Build the edges, cursors, and pageInfo a Relay-style connection promises, and get the page flags right rather than guessing them.

GraphQLPagination

Intermediate

Retire a GraphQL field without versioning the schema

Deprecate the field with a reason naming its replacement, count per-client usage over a release cycle, and let a CI gate hold the removal until the window passes.

GraphQLVersioning and deprecationCI and automation

Integrate with gRPC and protobuf 1 guide

Protobuf IDL, buf and protoc codegen, gRPC-Web and Connect, grpc-gateway REST transcoding, streaming RPCs, deadlines and metadata, buf breaking for .proto versioning.

Beginner

Define a gRPC service in a proto3 file

Write a proto3 file with a versioned package, two messages, a unary service, and reserved numbers, then compile it with buf and lint it two ways.

gRPC and protobufLinting and governanceVersioning and deprecation

Receive and send webhooks 6 guides

Both sides of a webhook: signature verification (Standard Webhooks, Stripe, GitHub, Slack), replay protection, queue-first ingestion, idempotent handlers, retries with backoff and dead-letter queues, ordering, fan-out, describing webhooks in OpenAPI 3.1, local tunnels (ngrok, cloudflared), and testing (Svix Play, Hookdeck, recorded payloads).

TypeScript · Intermediate

Acknowledge a webhook fast and process it from a queue

Verify the signature, commit the delivery to durable storage, answer 200, and leave the slow work to a worker, so a sender's timeout cannot multiply one event.

WebhooksEvents and messagingIdempotencyResilience patterns

TypeScript · Intermediate

Build a queue-backed webhook sender on BullMQ

Record each event and one delivery per endpoint, queue a BullMQ job per delivery, and let workers POST with a timeout and log every attempt, one queue per endpoint.

WebhooksEvents and messagingRetries and backoffResilience patterns

Beginner

Expose a local webhook receiver with a tunnel

Get real deliveries from Stripe, GitHub, or Slack into a handler on localhost through a tunnel or a provider's forwarder, and what breaks when its URL changes.

WebhooksTestingDebugging

TypeScript · Advanced

Handle webhooks that arrive out of order

Reach the sender's current state when an update beats its create and a retry lands days late: fetch the object, compare a version, or serialize per object.

WebhooksEvents and messagingIdempotencyResilience patterns

TypeScript, JavaScript · Intermediate

Validate a webhook payload's shape before handling it

Check that a verified delivery carries the fields your handler reads, with Zod, Ajv, or shape, and park a failing delivery instead of letting the sender retry it.

WebhooksValidationResilience patterns

PHP · Intermediate

Verify a Standard Webhooks signature in PHP

Check the signature, the timestamp and the raw body of an incoming webhook in PHP, and keep two secrets valid so a rotation costs nobody a delivery.

WebhooksRequest signingCredentials and secrets

Consume and publish events 2 guides

Event-driven integration: AsyncAPI descriptions, Kafka, NATS, SQS and SNS, CloudEvents, the outbox pattern, consumer groups, schema registries, at-least-once versus exactly-once.

Beginner

Describe a Kafka topic with AsyncAPI

Describe one Kafka topic in AsyncAPI 3.0, from the SASL server to the keyed message, then validate it, lint it and pin which way each application faces.

Events and messagingAPI designLinting and governance

TypeScript, JavaScript · Intermediate

Evolve an Avro event schema without breaking consumers

Register an Avro schema for a topic, set BACKWARD compatibility, and ship a field with a default that consumers you have not redeployed keep reading.

Events and messagingVersioning and deprecationAPI design

Section 5

Describe your API

23 guides in 7 topics

Authoring, linting, modelling and versioning the description that SDKs, docs and agent surfaces are generated from, including letting a coding agent draft or repair it.

Write an OpenAPI description 7 guides

Writing OpenAPI 3.1 that tools can use: operationIds (snake_case, unique, verb plus noun, chosen to generate clean SDK method names), tags, components and $ref reuse, discriminators, nullable versus unions, examples, security schemes, servers, webhooks and callbacks, uploads, bundling and splitting, Swagger 2 to 3.1 migration, design-first versus code-first (FastAPI, NestJS Swagger, springdoc, swag, zod-openapi, Huma, tsoa).

TypeScript, JavaScript · Intermediate

Model a polymorphic response with a discriminator

Describe a response that comes in several shapes so a generator emits a tagged union rather than a bag of optional fields, using oneOf with a discriminator.

OpenAPIValidationSDK generation

Advanced

Publish an OpenAPI 3.0 copy beside your 3.1 document

Keep OpenAPI 3.1 as the source of truth and build a 3.0 copy for older generators, with a guard that fails when the conversion loses or mangles anything.

OpenAPICode generationVersioning and deprecationCI and automation

Intermediate

Split and bundle a large OpenAPI document

Break a multi-thousand-line description into per-resource files, then produce the single bundled document most generators expect, without losing component names.

OpenAPICI and automation

Intermediate

Write operationIds that generate clean SDK method names

Name every operation with a unique lowercase verb-plus-noun id, audit the ids in CI, rename the bad ones with an overlay, and diff the methods two generators make.

OpenAPISDK generationAPI designLinting and governance

Author or repair a spec with a coding agent 3 guides

The spec as an output of AI, not only an input: drafting an OpenAPI description with Claude Code, Cursor or Copilot from route handlers, from HAR captures, from prose docs or a Postman collection; filling missing schemas and examples; repairing a spec that a generator rejects; validating the result with Spectral, Schemathesis and a mock server; keeping the agent-written spec in sync with code in CI.

Intermediate

Fill missing schemas and examples with a coding agent

List every response with no schema or example with two Spectral rules, hand the gaps and fixtures to a coding agent, and validate every example after every batch.

OpenAPICoding agentsLinting and governance

Lint and govern API specs 3 guides

Style rules and governance: Spectral rulesets and custom functions, Redocly lint, Stoplight style guides, vacuum, CI gates, checks that generated SDKs will be usable (every operation has an id, every response has a schema), conventions across many services.

Advanced

Enforce a naming convention across 40 microservice specs

Run one naming ruleset in every repository, then compare terms across specs, because no per-document linter sees that billing says customer and CRM says client.

Linting and governanceOpenAPISemantic modelAPI design

Intermediate

Gate a pull request on OpenAPI lint results

Make Spectral a required check that fails on errors and annotates warnings, and lint the whole document so an edit to a shared component cannot merge unseen.

Linting and governanceCI and automationOpenAPI

Advanced

Vet an aontu model for contradictions before you generate

Run aontu vet over every environment overlay in CI, so two files that disagree fail in seconds with both lines named, and refuse a release that rests on defaults.

Linting and governanceValidationConfigurationCI and automation

Model resources, relations and actions 5 guides

Designing the resource model before or beside the spec: resource naming, id formats, sub-resources versus links, non-CRUD actions such as cancel or approve, filtering and sorting, field selection, relationships, deciding when an endpoint is an entity operation and when it is a standalone action.

Intermediate

Add field selection to resource responses

Add a fields parameter that returns a subset on request and the full object otherwise, refuse unknown names with an RFC 9457 problem, and check the mock agrees.

API designOpenAPIMocking

Extract a semantic model from a spec 2 guides

Turning endpoints into entities, attributes and operations: classification heuristics (which path is a list, load, create, update or remove), handling endpoints that map to no entity (direct and prepare escape hatches), flows, inconsistent specs, diffing two models from successive spec versions, publishing the model as JSON beside OpenAPI, and verifying that SDK, CLI and MCP server were generated from the same model version.

TypeScript, JavaScript · Intermediate

Diff two semantic models from successive spec versions

Extract a model from each spec version, diff the two model files, and read the result beside what oasdiff and openapi-diff report about the same release.

Semantic modelVersioning and deprecationOpenAPI

Describe an API without OpenAPI 1 guide

When OpenAPI is the wrong tool: TypeSpec, Smithy, AsyncAPI, GraphQL SDL, protobuf, Arazzo workflows, JSON Schema alone, and converting legacy RAML and API Blueprint.

TypeScript, Python · Intermediate

Describe payloads in JSON Schema alone and generate types

Publish standalone JSON Schema 2020-12 files, bundle them offline, generate TypeScript and Python types, and wrap them in an OpenAPI 3.1 shell when a tool insists.

API designCode generationValidation

Version and retire APIs 2 guides

Versioning strategies (path, header, date-based as Stripe does), additive change rules, breaking-change detection in CI (oasdiff, openapi-diff, Optic, and aontu breaking and subsume as one option for model files), Sunset and Deprecation headers, deprecation calendars, compatibility tests, and tying SDK versions to API versions (the sdkgen api-versioning design note as one approach beside Stainless and Speakeasy).

TypeScript, JavaScript · Intermediate

Pin an API version from a client

Send the API version you were built against on every request, and refuse a response that came back under a different one.

Versioning and deprecationSDK design

Section 6

Ship an SDK

23 guides in 6 topics

Choosing how to produce client libraries, generating them, making them idiomatic, composing runtime features, customizing a generator without forking, adding languages, and regenerating safely.

Choose a generator and generate an SDK 5 guides

Deciding and doing: a repeatable rubric for hand-written versus generated versus AI-written versus SaaS-generated SDKs (total cost of ownership, per-seat pricing, determinism measured across two runs, entity-shaped versus endpoint-shaped output measured rather than asserted), then running OpenAPI Generator, Swagger Codegen, Kiota, Speakeasy, Stainless, Fern, liblab, oapi-codegen, openapi-typescript with openapi-fetch, orval, Hey API, openapi-python-client, NSwag, AutoRest, Smithy, and sdkgen (npm create @voxgig/sdkgen, target add, --only, --dryrun), judging the output (the voxgig-solardemo-sdk Go reference and the elementdemo repo as things to read before choosing), and migrating from one generator to another while keeping package names and semver continuity.

TypeScript, JavaScript · Beginner

Decide between generating and hand-writing a client

Count the operations, schemas and parameters you would maintain, then decide between a generated client and one you write on the numbers rather than on taste.

SDK generationSDK designCoding agents

TypeScript, Python · Intermediate

Generate an SDK with Fern from generators.yml

Set up a Fern project from an OpenAPI document, read the generators.yml it writes, validate it offline, and know which generator group runs before anything runs.

SDK generationOpenAPICode generation

TypeScript, JavaScript · Advanced

Generate one SDK from several OpenAPI documents

Join one document per service under a prefix rule fixed before the first merge, generate one package from the result, and test that no name moves.

SDK generationOpenAPICode generation

TypeScript · Beginner

Generate your first SDK with sdkgen

Scaffold a project from your OpenAPI document with one non-interactive command, generate a TypeScript SDK, and read what the model made of your endpoints.

SDK generationSemantic modelOpenAPI

TypeScript, JavaScript · Intermediate

Tell an entity-shaped SDK from an endpoint-shaped one

Count the nouns, the operations per noun, and how many names start with a verb, so a claim about SDK shape is a measurement rather than a preference.

SDK generationSDK designSemantic model

Design SDK ergonomics per language 5 guides

What makes an SDK feel native: entities versus endpoint wrappers, constructor and configuration, method naming, options objects versus builders, sync and async variants, cancellation (context.Context, AbortSignal), typed errors, nullable handling, response envelopes, ESM and CJS dual builds, and escape hatches for raw requests (sdkgen direct and prepare, Stainless raw responses, OpenAPI Generator withHttpInfo).

PHP · Intermediate

Build a PHP SDK that takes any PSR-18 HTTP client

Type a PHP SDK against the PSR-18 and PSR-17 interfaces, let callers pass the HTTP client they already run, and fail with an install command when none is present.

SDK designTestingMocking

TypeScript, JavaScript, Python, Go · Intermediate

Expose typed SDK errors callers match without parsing text

Turn HTTP failures into a small error hierarchy carrying status, a stable code, the request id, and the raw body, and test that each status maps to one type.

Error handlingSDK designAPI design

Python · Intermediate

Offer sync and async clients from one Python SDK

Write the client once as coroutines over httpx, generate the sync twin with unasync at build time, and pin both to one method set with a test.

SDK designCode generationTesting

TypeScript, JavaScript, Go · Intermediate

Shape an SDK around entities instead of endpoint wrappers

Decide the home entity of every operation before you pick a generator, test the three documented call chains, and see what two generators guess.

SDK designAPI designOpenAPISDK generation

Compose runtime features in an SDK 4 guides

How cross-cutting behaviors fit together inside one client, and the smaller behaviors a client carries: permission hints, proxy routing, debug buffers, structured logs, request tracking, audit records and cost attribution.

TypeScript, Ruby · Advanced

Choose the pipeline stage where an SDK behavior should run

Place each cross-cutting behavior at the sdkgen stage that holds its input, and prove with forced failures which stages a call runs and which it skips.

SDK designSDK generationCustomizationObservability

TypeScript, JavaScript · Intermediate

Tag SDK calls with session and request ids

Send three identifiers with three lifetimes, so a support question about one call can be answered from the service's own logs.

ObservabilitySDK designDebugging

Python · Intermediate

Wrap an SDK transport in a middleware chain

Compose retry, caching, authentication and tracing as layers around one transport, so each concern is written once and the order is declared rather than implied.

SDK designRetries and backoffCachingObservability

TypeScript, Ruby · Intermediate

Write an audit record for every SDK call

Write one record per logical SDK call, naming the caller, the operation, the entity, and the outcome, to an append-only sink, and never one record per HTTP attempt.

ObservabilitySDK designSecurity

Customize a generator without forking 5 guides

Bending generated output without a fork: OpenAPI Generator custom templates and .openapi-generator-ignore, Speakeasy overlays and hooks, Fern custom code, Kiota, and the six sdkgen levers (model .aon files with project.aon never overwritten, templates in .sdk/tm, TypeScript components in .sdk/src/cmp, custom features with per-stage hooks, custom targets, and sdkgen packages with package add, check, list, update), plus docs add, the flags --only, --alias, --force, --dryrun and --debug, typed models, doctor in CI, installing a third-party sdkgen package such as @voxgig/sdkgen-haskell or sdkgen-station, propagating template changes, migrating a bundled target out of tree, driving generation from a script with the programmatic API, and debugging generation.

TypeScript, JavaScript · Advanced

Fail a build when a generator customization becomes a fork

Record what the generator shipped, compare the project against it on every build, and separate a file you forked from a file you added.

CustomizationSDK generationCI and automationGit and repositories

TypeScript, Java · Intermediate

Find which template produced a generated file

Read the FILES manifest for what OpenAPI Generator wrote, search its extracted template set for the file's text, and prove the match with a one-line marker.

CustomizationTemplatesSDK generationDebugging

TypeScript · Advanced

Generate a code section with code instead of a template

Write a client's computed parts, a dispatch table and an overload matrix, as a function over the typed model, and hold its output to a formatted fixture.

Code generationTemplatesCustomizationSDK generation

TypeScript · Advanced

Package a customization several SDK projects can install

Turn a feature you copy between sdkgen projects into a versioned package, install it into two projects, and roll both forward while each keeps its own settings.

CustomizationSDK generationTemplatesPublishing and releases

TypeScript, JavaScript · Intermediate

Rename a generated SDK method without editing the output

Rename a generated method where its name is decided, in the OpenAPI document or in the generator, regenerate, and prove the rename reached every target.

CustomizationSDK generationOpenAPI

Target another language 3 guides

Adding a language to an SDK programme: how to grade targets yourself when the generator does not (sdkgen publishes 22 bundled targets plus package-delivered ones such as Haskell, but grades none of them; OpenAPI Generator labels each generator's stability; Speakeasy publishes a supported-language list), what less polished should mean to you, packaging expectations per ecosystem, and authoring a new target (sdkgen author-a-new-language, OpenAPI Generator new-generator scaffolding, the Fern generator API).

Beginner

Decide which SDK language to add next

Rank candidate SDK languages from tickets, signup answers, registry counts, and the User-Agents of raw API calls, the source that sees users you have not reached.

SDK generationDeveloper relationsDeveloper experience

Advanced

Evaluate a third-tier SDK target before you ship it

Run one fixed evaluation on a candidate language target, record what you measured beside the generator's claims, and decide who supports it before it ships.

SDK generationPortingTestingPublishing and releases

Intermediate

Set support tiers for your SDK languages

Write each SDK language's tier as data, generate the CI matrix and the published support table from it, and fail any release that broke a tier's promise.

Developer relationsCI and automationTestingPublishing and releases

Regenerate without losing edits 1 guide

Regeneration as a routine operation: three-way merge against the last generation, preserve and protect markers, diff mode, overwrite policies, reviewing a regeneration diff, failing CI when a regenerated SDK differs from the committed one, vendoring and upgrade migration, keeping hand edits in separate files.

TypeScript, JavaScript · Intermediate

Preview a regeneration as a diff before writing files

See exactly what a generator would change before it changes anything, with a dry run that reports creates, replacements, and the files its mode protects.

SDK generationCode generationGit and repositoriesCustomization

Section 7

Ship a CLI or REPL

15 guides in 4 topics

Command-line and interactive surfaces over an API, for humans, scripts and agents: building, making usable, distributing, and exploring an API before writing code.

Build a CLI over an API 3 guides

Generating or hand-writing a CLI: restish over any OpenAPI document, the go-cli target generated from a semantic model, oclif and commander, cobra, click and typer, clap, Thor, Symfony Console, and a gh-style resource-shaped command tree; mapping operationIds to commands, flags and auth, and curl plus jq or HTTPie as the do-nothing baseline.

Intermediate

Map API parameters to CLI arguments and flags

Extend the command map with a parameter map: path parameters as positional arguments, query and header parameters as flags, and one input style for request bodies.

CLIOpenAPIValidation

Intermediate

Wire OpenAPI security schemes into CLI auth flags

Turn each OpenAPI security scheme into a CLI flag backed by an environment variable, place the value where the scheme says, and prove it with a 401 and a 200.

CLIAuthenticationCredentials and secrets

Make a CLI usable by people, scripts and agents 3 guides

Output formats (table, JSON, YAML, --jq), stable exit codes, TTY detection and color, paging, progress, shell completion, help text, config files and profiles, environment variable precedence, keychain token storage after a device-flow login, and designing a CLI that a coding agent can drive.

TypeScript, JavaScript · Intermediate

Design a CLI a coding agent can drive

Give a CLI machine-readable output, exit codes that mean one thing each, and a confirmation rule that never depends on a terminal being attached.

CLICoding agentsError handling

TypeScript, JavaScript · Beginner

Write CLI help that people and agents can both use

Describe the command surface once, render it as text and as data, and lint the result so a command cannot ship with an example that does not run.

CLIDocumentationLinting and governanceCoding agents

Test, package and distribute a CLI 3 guides

Golden-file and snapshot tests across operating systems, end-to-end tests against a mock API, then distribution with goreleaser, Homebrew taps, Scoop, npm, pipx, Docker images, code signing and notarization, and update checks.

Go, Rust · Beginner

Cross-compile CLI release archives with goreleaser

Turn one tag into per-OS archives and a checksums file with goreleaser, a build script you own, or dist for Rust, and stamp the version so no binary says `dev`.

CLIPublishing and releasesCI and automation

TypeScript, JavaScript · Intermediate

Snapshot-test CLI output across operating systems

Run the built CLI as a child process, normalize line endings, paths, and color, and compare with committed golden files on Linux, macOS, and Windows in one matrix.

CLITestingCI and automation

Explore an API interactively 6 guides

Trying calls before writing code: language REPLs with an SDK loaded and tab completion from the model, generated REPL surfaces (the sdkgen REPL, seneca-repl), prompt_toolkit and IPython shells, Postman, Bruno, Insomnia and Hoppscotch collections generated from OpenAPI and kept in git, GraphiQL, Swagger UI try-it, HTTPie sessions, and a keyboard-first command bar over an API's operations (cmdk, kbar, voxgig-ui as options).

TypeScript, JavaScript · Advanced

Add a keyboard command bar over your API operations

Build a command palette over every operation in an OpenAPI document, opening in the sandbox and refusing a delete until its operationId is typed back.

Developer experienceOpenAPIGuardrails

TypeScript, JavaScript · Intermediate

Build a REPL for your API in Node.js

Wrap an API client in its own Node REPL: environment in the prompt, dot commands for state, one-line API errors, and a session that survives a background failure.

REPLCLIError handling

TypeScript, JavaScript, Go · Intermediate

Generate a REPL from an OpenAPI description

Generate a shell from an OpenAPI document with the sdkgen Go CLI target, read what the model gave it words for, and point it at a sandbox before the first call.

REPLSDK generationSemantic modelCLI

TypeScript, JavaScript · Beginner

Preload a generated client into a Node REPL

Start a REPL with the client already built and its entities named, so exploring an API is one command rather than six lines of setup typed from memory.

REPLSDK generation

TypeScript, JavaScript · Beginner

Turn an exploratory REPL session into a script

Convert a REPL history into a script that runs, by dropping the lines that threw, the expressions typed to look at a value, and the REPL's own commands.

REPLCLI

26 guides in 6 topics

MCP servers, tool schemas, hosting and server-side policy, agent skills and instruction files, and making a site and its docs usable by autonomous callers.

Build an MCP server 7 guides

Building an MCP server for an API, generated or by hand: openapi-mcp and openapi-mcp-generator, Speakeasy Gram, Stainless MCP, Mintlify, Zapier MCP, Composio, Cloudflare MCP, the go-mcp target generated from a semantic model (SDK Catalog servers, aontu-mcp and the tabnas mcp server as worked examples), and the official MCP SDKs (TypeScript, Python, Go, Java, C#, Rust, Kotlin, Swift) plus FastMCP; tools, resources, prompts, elicitation, wrapping an existing SDK as tools, pruning a generated server to a small tool set, regenerating when the spec changes without losing custom tools.

TypeScript, JavaScript · Beginner

Generate an MCP server from an OpenAPI document

Run openapi-mcp-generator over an OpenAPI 3 document, build the stdio server it writes, and list its tools from a scripted client before any agent connects to it.

MCPOpenAPICode generationTool schemas

TypeScript, JavaScript · Intermediate

Prune a generated MCP server to ten tools an agent can use

Cut a generated MCP server from forty-one tools to ten, merging near duplicates behind an enum, and prove the same agent tasks still complete.

MCPTool schemasCode generationEvals and observability

TypeScript, Python · Advanced

Upgrade an MCP server to a newer protocol revision

Move a server from a handshake-era revision to 2026-07-28 by upgrading the SDK, then prove every client you support still connects with one scripted matrix run.

MCPVersioning and deprecation

Design tool schemas agents can use 4 guides

Tools an agent can reason about: naming, descriptions, argument schemas, enums over free text, result shapes, errors as data that tell the agent what to do next, pagination inside a tool result without overflowing context, tool granularity (one tool per entity operation versus one search tool), annotations (readOnlyHint, destructiveHint, idempotentHint), versioning a tool set, and MCP schemas versus OpenAI function schemas versus Claude tool definitions versus Gemini function declarations.

TypeScript, JavaScript · Intermediate

Design filter and sort arguments for a list tool

Named properties, a query mini-syntax, or a filter object with sort enums: three argument designs for one list tool, scored on ten prompts, then made to fail loudly.

Tool schemasValidationEvals and observability

TypeScript, JavaScript · Intermediate

Name tools so an agent picks the right one from fifty

Give every tool a noun and a verb, a description long enough to choose on, and a warning on anything destructive, then measure how often two tools still look alike.

Tool schemasMCPEvals and observability

TypeScript, JavaScript · Intermediate

Shape a tool result so an agent can reason about it

Return the fields an agent decides on, in that order, with the ids its next call needs, and measure what Markdown, compact JSON, and structuredContent cost.

Tool schemasMCP

Host, transport and secure an MCP server 5 guides

The server side of running MCP in production: stdio versus Streamable HTTP versus legacy SSE, stateless design, OAuth 2.1 with protected resource metadata, per-agent keys and scopes per tool, rate limits shaped for bursty autonomous traffic, audit trails, deny lists, sanitizing tool results against injection, hosting on Cloudflare Workers, Vercel and containers, server cards at /.well-known/mcp/server-card.json, server.json registry entries, and testing with MCP Inspector and scripted clients.

Intermediate

List an MCP server in the official MCP registry

Publish a server.json to the official MCP registry, prove your namespace from CI with GitHub OIDC, and keep the listing level with each release.

MCPPublishing and releasesValidation

TypeScript · Intermediate

Record an audit trail of every MCP tool call

Write one record per tool call with the caller's identity, a keyed digest of the arguments, and the outcome, then ask the store which agent deleted a record.

MCPObservabilitySecurityPersistence

Write agent skills and instruction files 4 guides

Documents an agent reads before it writes code, at repo and package level: AGENTS.md, CLAUDE.md, Cursor rules, Copilot instructions, SKILL.md against the Anthropic Agent Skills spec with progressive disclosure and bundled scripts, generated skills from a semantic model (the sdkgen Agent Skills surface and aontu agentsmd as options, the tabnas skills repo as an example), what to include and keep out, stopping an agent editing generated files, testing whether Claude Code or Cursor actually uses a skill, keeping several formats in sync from one source, versioning with the code.

Intermediate

Migrate CLAUDE.md and .cursor/rules to AGENTS.md

Move the rules every agent needs into one AGENTS.md, keep each tool's file for what it alone understands, and measure what each tool loads before and after.

Coding agentsAgent skillsGit and repositories

Intermediate

Organize agent skills across many related repositories

Keep one shared set of skills for the ecosystem, let each repository override what it needs, and report every shadowed name rather than letting one win in silence.

Agent skillsLinting and governanceGit and repositories

Intermediate

Scope agent instructions to one package in a monorepo

Give each package its own AGENTS.md, Cursor rule, Copilot instructions file, or Claude Code rule, and check which files each tool loads from inside one package.

Agent skillsCoding agentsConfiguration

Make a docs site agent-ready 5 guides

A documentation or product site that agents can use: llms.txt and llms-full.txt, markdown twins and Accept: text/markdown negotiation, AGENTS.md at the site root, a published OpenAPI document at a stable URL, /.well-known/api-catalog (RFC 9727), MCP server cards, an agent-skills index, robots.txt rules per AI crawler, JSON-LD types, RFC 9457 errors on every route, a health endpoint, a docs-search MCP server, and validation tooling (Google Rich Results, the MCP registry CLI, schema linters), with the setup for Astro, Docusaurus, Mintlify and Next.js.

TypeScript · Beginner

Add a health endpoint agents can poll

Return a status, a release id, and one line per dependency, cache it for seconds, and prove the endpoint goes red when a dependency goes down.

API designCachingObservability

TypeScript · Intermediate

Make a Docusaurus site agent-ready

Generate llms.txt in sidebar order, a markdown twin of every page, AGENTS.md, and the OpenAPI document from a Docusaurus plugin, and fail the build on any drift.

DocumentationCrawlers and bot policyCI and automation

Beginner

Set robots.txt rules for each AI crawler

Separate the crawlers that train models from the fetchers acting for a person right now, and check each rule against the matching algorithm before you ship it.

Crawlers and bot policyDocumentationEdge and serverless

Audit your API's agent experience 1 guide

Testing your API and docs against real agents: scripted runs with Claude, ChatGPT, Cursor, Cline and VS Code as MCP clients, scoring task completion from the docs alone, catching error semantics that mislead agents (vague 500s, missing Retry-After), finding pages an agent cannot read, measuring token cost per task, and turning findings into a scorecard and backlog.

Python · Advanced

Measure the token cost of an agent task against your API

Read the usage fields from a scripted run, split each task's tokens between tool definitions, tool results, and reasoning, and find the costliest result.

Evals and observabilityTool schemasPaginationDeveloper experience

32 guides in 6 topics

Coding agents, MCP clients, agent frameworks, structured output, evals, observability, cost and safety on the consuming side.

Write an integration with a coding agent 8 guides

Getting Claude Code, Cursor, Copilot, Codex CLI, Gemini CLI, Aider or Cline to write an API integration: prompting with the spec, feeding an SDK, a catalog SDK, a skill or the API's MCP server, stopping the agent inventing endpoints, reviewing generated code for missing retry and error handling, test-first loops, running the agent in a sandbox with a mock API, keeping generated files out of agent edits, and the experiments: measuring drift between two AI-written clients from one spec, comparing an AI-written client with generator output, and the hybrid workflow where an agent customizes a generated SDK without breaking regeneration.

TypeScript · Advanced

Let a coding agent customize a generated SDK safely

Point the agent at the levers under .sdk/, never at the generated tree, and prove with doctor and a regeneration diff that only the intended files move.

Coding agentsSDK generationCustomization

TypeScript, JavaScript · Intermediate

Measure drift between two AI-written clients

Compare two clients written from the same description and separate what one of them missed from what neither was told.

Coding agentsEvals and observabilityContract tests

Connect MCP clients to servers 4 guides

Wiring an MCP server into Claude Desktop, Claude Code, ChatGPT, Cursor, Cline, VS Code and custom clients: stdio versus remote configuration, OAuth in client config, restricting which tools an agent may call, running several servers at once, composing servers behind one gateway (mcp-proxy), running a stdio server as a subprocess from a Python agent, health checks, debugging with MCP Inspector, and using catalog MCP servers, aontu-mcp and the tabnas mcp server as ready-made examples.

Beginner

Connect a remote MCP server to Claude Desktop

Get a remote MCP server answering tool calls in Claude Desktop, as a custom connector or through a stdio bridge, and probe its transport before blaming the config.

MCPAuthenticationStreaming

TypeScript, Python · Intermediate

Health check your MCP server connections

Probe an MCP server three ways, see which probe notices an upstream credential that expired, and set one reconnect and backoff policy for stdio and remote servers.

MCPObservabilityResilience patterns

TypeScript · Intermediate

Share one MCP server config across several editors

Keep Claude Code, Cursor, VS Code, and Cline on the same MCP servers by rendering four editor files from one source, and see why a copied file loads zero servers.

MCPConfigurationCredentials and secrets

Build an agent that calls APIs 5 guides

Agent loops and frameworks: Claude Agent SDK, OpenAI Agents SDK, LangGraph, Vercel AI SDK, Mastra, CrewAI; wrapping a typed SDK as tools, converting OpenAPI operations into function schemas, auth passthrough, pagination in tool results, parallel tool calls, long-running operations, streaming tool output, multi-step workflows (Arazzo as a description format), and calling SDKs directly versus through MCP.

Python, TypeScript · Intermediate

Build a stateful API agent with LangGraph

Read a record in one turn and write it back in the next, after a restart, carrying only its id and version in the state LangGraph saves at each step.

Agent frameworksPersistence

TypeScript, JavaScript · Beginner

Build a tool-calling loop with the Claude Agent SDK

Call two REST operations from one agent three ways: the Claude Agent SDK query loop, the Anthropic SDK tool runner, and a loop you write over the Messages API.

Agent frameworksTool schemasError handling

TypeScript, Go · Intermediate

Choose between calling an SDK directly and using MCP

Wire three API operations into one agent as in-process typed tools and as MCP tools, then measure startup, tokens per request, and what a rename breaks under each.

MCPAgent frameworksTool schemas

TypeScript · Advanced

Stream partial tool output back to a user

Show a user the chunks a tool is receiving while the model waits, through AI SDK data parts, your own server-sent events, or Anthropic's input streaming.

StreamingAgent frameworks

TypeScript, Python · Intermediate

Wire an API client into the OpenAI Agents SDK

Register a typed client's operations as function tools, run the loop, hand off between two agents on one client, and keep a failed call from ending the run.

Agent frameworksTool schemasError handling

Constrain model output to a schema 3 guides

Making a model emit valid data: JSON Schema structured outputs, tool-call schemas used as output, GBNF and Lark grammars for constrained decoding (llama.cpp, vLLM, Outlines, guidance), repairing malformed or truncated JSON, validating with Zod, Pydantic or gubu and retrying, and generating grammars from a spec (the aontu GBNF and Lark output and the tabnas GBNF grammar as options).

TypeScript, JavaScript · Advanced

Generate a GBNF grammar from an aontu schema

Generate a GBNF grammar from an aontu model through its JSON Schema export, and find with a corpus which constraints only vet still enforces.

Structured outputGrammarsValidation

Python · Advanced

Serve schema-constrained output with vLLM

Pin a decoding backend, send the schema in the field this vLLM release reads, and run a harness that validates every reply and refuses a silent fallback.

Structured outputGrammarsValidation

TypeScript, JavaScript · Intermediate

Validate JSON model output before you use it

Get a typed value out of a model response that is only mostly JSON, and refuse the responses that are the wrong shape instead of letting them into your code.

Structured outputValidationParsing

Evaluate and observe agents 7 guides

Evals (promptfoo, Braintrust, Inspect, LangSmith, custom harnesses), golden traces, task success rates across model providers, regression suites for tool use recorded from real traffic, tracing with OpenTelemetry GenAI semantic conventions (Langfuse, Phoenix, Helicone, OpenLLMetry), token and cost accounting, per-task budgets as cutoffs versus hard caps (the sdkgen cost feature as one example), caching tool results across steps, prompt caching, model routing.

TypeScript, JavaScript, Python · Intermediate

Account for tokens and cost per agent task

Read each provider's usage fields into exclusive token buckets, price them from a table you keep, and roll the money up per task and per tenant.

ObservabilityEvals and observabilityCaching

Python, TypeScript · Intermediate

Cache tool results across the steps of one agent run

Cache an agent's read tools by tenant, tool and arguments, clear the cache on every write, and record requests saved beside whether the answer stayed right.

CachingEvals and observabilityAgent frameworks

Python, TypeScript · Intermediate

Compare agent task success rates across model providers

Run one tool-using suite against several providers with only the model varied, and report success with an interval by case, tokens, and wall time per model.

Evals and observabilityTool schemas

Python, TypeScript · Intermediate

Cut agent cost with provider prompt caching

Order the request so the stable prefix comes first and the growing conversation last, place the breakpoints, and measure cache reads against a baseline run.

CachingEvals and observabilityAgent frameworks

Python · Intermediate

Redact prompts and tool results in traces before export

Hash or drop prompts, tool results, and exception messages in one OpenTelemetry span processor, so a hosted backend gets the span tree and timings without the data.

ObservabilityCredentials and secretsSecurity

TypeScript, JavaScript, Python · Advanced

Replay recorded API traffic in an agent regression suite

Record an agent's tool calls once, commit the cassette without the key, and replay it in CI so an uncovered request fails instead of reaching the network.

Evals and observabilityMockingTestingCI and automation

TypeScript · Intermediate

Run agent evals in CI without flaky failures

Rerun each eval case, gate the pull request on the aggregate against a band from nightly history, and keep outages and ordinary variance from reading as regressions.

Evals and observabilityCI and automationTesting

Guard agents and add approvals 5 guides

The agent side of safety: prompt injection defence for tool results, web pages and documents, isolating untrusted content, output filtering, allow lists, human-in-the-loop approval before destructive calls, MCP elicitation, dry-run modes, sandboxing, least privilege per tool, spend and blast-radius limits, guardrail libraries (OpenAI Agents SDK guardrails, Guardrails AI, NeMo Guardrails, Llama Guard), and testing against an injection corpus.

TypeScript, Python · Intermediate

Add a dry-run mode to an agent's write tools

Give every write tool a dry-run flag the runner owns, answer the dry run from the server, a fake transport or a recorded plan, and diff it against the audit log.

GuardrailsMockingTool schemas

TypeScript · Intermediate

Handle MCP elicitation requests in your agent client

Let an MCP server ask the person before a destructive tool runs: declare the capability, render the schema as a form, and answer accept, decline, or cancel.

MCPGuardrailsSecurity

Python, TypeScript · Intermediate

Sandbox an agent's shell and code execution

Run what an agent executes inside a boundary with no credentials, a scratch filesystem and a closed network, in Docker, a sandbox service or an OS-level sandbox.

GuardrailsSecurityCoding agents

Python, TypeScript · Intermediate

Sanitize tool results before they re-enter the prompt

Extract readable text, strip zero-width characters, normalize to NFKC, cut to a byte budget, and wrap the result in a delimiter the system prompt names as data.

GuardrailsSecurityStructured output

16 guides in 3 topics

Mocks, record-and-replay, contract and spec-driven tests, and layered SDK test suites, for APIs you ship and APIs you do not own.

Mock an API 7 guides

Standing in for the real API: Prism from an OpenAPI document, WireMock, MSW, nock, Mockoon, vendor sandboxes, record-and-replay (vcrpy, VCR, Polly.JS, go-vcr, responses, httptest), fault injection (Toxiproxy, chaos flags), and in-SDK mocks (the sdkgen test feature for an in-memory API and netsim for injected latency, 429s and outages as options).

Advanced

Control which stub wins when mock rules overlap

Make stub precedence explicit in WireMock, MSW and nock, and fail a test when a stub never answers, so a catch-all cannot hide the specific case you just added.

MockingTestingDebugging

TypeScript, JavaScript, Python · Intermediate

Mock a generated SDK in your application tests

Run one set of assertions about your code against a vendor SDK four ways, then bump the SDK a minor version and see which strategy noticed the change.

MockingTesting

TypeScript, JavaScript · Intermediate

Run an in-memory mock of your API inside SDK tests

Build the client in test mode, seed it with records, and let the generated SDK answer its own calls from memory instead of reaching the network.

MockingTestingSDK generation

Advanced

Simulate slow and broken networks with Toxiproxy

Put Toxiproxy between a client and its dependency, slow, stall and cut the connection from the test, and prove each call fails at its time budget.

Resilience patternsTimeoutsTestingMocking

TypeScript, JavaScript · Intermediate

Stub outbound HTTP calls in Node tests with nock

Intercept outbound requests in-process, assert on what your code sent as well as received, and turn off real network access so an unstubbed call fails.

MockingTesting

Run contract and spec tests 7 guides

Proving the implementation matches the description: Pact consumer-driven contracts (for an SDK consumer and for a vendor API you call), Schemathesis and Dredd property tests against a spec, Specmatic and Microcks, response validation middleware at runtime, and message contracts for service messages (seneca-msg-test as one option next to Pact message contracts).

TypeScript, JavaScript · Beginner

Choose consumer-driven or spec-driven contract tests

Pick a contract style by what it fails on: the fields one consumer reads, or everything the published document describes, including the unused parts.

Contract testsTestingOpenAPI

TypeScript, JavaScript · Intermediate

Contract test an API you do not own

Write down the fields your integration reads, check a recorded response against them, and run the same check against the live API on a schedule.

Contract testsTestingMocking

TypeScript · Advanced

Contract test messages between services

Pin the body and the routing key of an event in a consumer contract, verify the publisher in CI, and see the three tools catch, or miss, a renamed topic.

Contract testsEvents and messagingTestingServices and architecture

Intermediate

Publish and tag pacts in a Pact Broker

Run the broker on Docker and Postgres, publish each pact under its commit and branch, and record deployments so the broker knows what runs where.

Contract testsCI and automationTesting

JavaScript, Python · Advanced

Test stateful endpoints with Dredd hooks

Make Dredd pass for reads and deletes that need a record first, without loosening an assertion, and fail loudly when a hook names a transaction that has gone.

Contract testsOpenAPITesting

Run SDK test suites 2 guides

Layered SDK testing: unit tests per language, integration tests in a sandbox account, live suites with real credentials under rate limits, CI matrices across language versions, doc examples executed as tests, flaky-test policy.

TypeScript, JavaScript · Beginner

Layer unit, integration, and live tests for an SDK

Split an SDK suite into unit tests on an injected transport, integration tests against a sandbox, and a guarded live suite. Each layer gets a command and a trigger.

TestingSDK designCI and automation

TypeScript, JavaScript · Intermediate

Seed a sandbox account for SDK integration tests

Create every record an integration suite needs under a run id, delete them newest first in a hook that runs on failure too, and sweep what earlier runs left.

TestingSDK designCI and automation

23 guides in 6 topics

Reference docs, guides, docs that ship inside packages, question answering over docs, developer relations, and measuring your own developer experience.

Publish reference docs 5 guides

Reference from the spec and the code: Redoc, Scalar, Swagger UI, Mintlify, ReadMe, Stoplight Elements, mkdocs-material (the docgen apidocs target as one generator option), per-language API references (typedoc, pkg.go.dev, Sphinx, phpDocumentor, YARD), try-it consoles, versioned docs, diagrams (Mermaid, the Voxgig diagram utility), and hosting where each language looks.

Beginner

Add sequence diagrams to reference docs with Mermaid

Write an OAuth exchange or a webhook round trip as a Mermaid sequence diagram beside the reference page, check it against the spec in CI, and render it in dark mode.

DocumentationOpenAPICI and automation

Write guides and quickstarts 2 guides

Diátaxis structure for APIs, quickstarts that reach a first call in five minutes, task docs, code samples in six languages that do not go stale (tested in CI), changelog-driven migration guides, versioned guides.

Advanced

Move guides to a new docs toolchain without breaking URLs

Build the redirect map from your sitemap and your logs, crawl every old URL against the new build before the switch, and audit the anchors a redirect cannot carry.

DocumentationVersioning and deprecationEdge and serverless

TypeScript, JavaScript · Intermediate

Turn a breaking release changelog into a migration guide

Diff the old and new API descriptions with oasdiff, group the breaks by the work they cause, add before and after code, and ship it with the release candidate.

Versioning and deprecationDocumentationOpenAPI

Ship docs with the code 4 guides

README conventions per registry (npm, pkg.go.dev doc comments, PyPI long description, Packagist, RubyGems, LuaRocks), docstrings and typed signatures generated from the spec, a CHANGELOG inside the package, examples directories that run in CI, and generated READMEs (the sdkgen docs add target and seneca-doc as options against hand-written templates).

JavaScript, TypeScript · Intermediate

Document Seneca plugin message patterns inside the repo

Generate the pattern reference from the running plugin with seneca-doc, ship it in the README, and diff it against seneca.list() to catch messages an option adds.

DocumentationServices and architecturePlugin systems

Go · Intermediate

Generate Go doc comments from OpenAPI descriptions

Generate a Go client with oapi-codegen, OpenAPI Generator, and sdkgen from one document, and count which summaries, descriptions, and examples reached the comments.

DocumentationSDK generationOpenAPI

TypeScript, JavaScript · Beginner

Ship a changelog inside your published package

Put the changelog in the published artifact, and check in CI that it ships and that its newest entry matches the version being released.

Publishing and releasesDocumentationCI and automation

Answer questions over your docs 3 guides

RAG and search over docs, specs and transcripts: chunking an OpenAPI document so retrieval returns whole operations, embeddings, hybrid search, citations, evaluation against real support tickets, and hosting (podmind as one production example beside LlamaIndex, LangChain, Cloudflare Vectorize, pgvector, Algolia DocSearch, Inkeep, Kapa).

TypeScript, JavaScript · Intermediate

Chunk an OpenAPI document for retrieval

Cut an OpenAPI description into retrieval chunks that are each one complete operation, so a top hit carries the whole parameter table rather than half a schema.

DocumentationOpenAPISemantic model

TypeScript · Intermediate

Host docs question answering on Cloudflare Workers

Embed the question with Workers AI, query a Vectorize index filtered to one docs version, and stream the answer with its sources over Server-Sent Events.

DocumentationEdge and serverlessStreaming

TypeScript, JavaScript · Intermediate

Re-index docs on release without serving stale answers

Build a new documentation index per release, promote it in one write, and fail a check whenever the live index was built from an older version than the docs.

DocumentationPublishing and releasesCI and automation

Run developer relations 5 guides

Practitioner DevRel: community forums and office hours, changelog communication, sample apps, content calendars with non-vanity metrics, conference talks and speaker coaching (agenda tooling such as conf-agenda as one option), a technical podcast with editorial independence (Fireside as one example beside Software Engineering Daily and The Changelog), DevRel programme set-up and audit, and fractional CTO and developer management routines.

Advanced

Audit a DevRel program in one week

List every DevRel activity on Monday, replace each count with an outcome from evidence by Thursday, and present a scored report with three changes on Friday.

Developer relationsDeveloper experience

TypeScript, JavaScript · Intermediate

Build a sample app that developers fork instead of ignore

Build one sample app with a key, a list, a form, and real errors, name its owner and omissions in the README, and link it only to hosts that can run it.

Developer relationsDeveloper experienceGit and repositories

Beginner

Choose a developer community platform for year one

Score Discord, Discourse, GitHub Discussions, Slack, and Zulip on search, moderation, identity, cost, and export, then commit to one platform for a year.

Developer relationsDeveloper experience

Intermediate

Run a changelog channel developers read in time

Carry breaking changes to developers by feed, email, chat, and widget, then score the channels by the keys still calling the old shape on the sunset date.

Versioning and deprecationDeveloper relationsDocumentation

Measure and audit developer experience 4 guides

DX as a measured thing: time to first successful call, install friction, SDK adoption per language, error rates by endpoint, support ticket taxonomy, scoring error messages with a rubric, running a DX audit of your own SDK (the checklist a Developer Experience consultancy would use, written for you to run), and production-readiness reviews before a launch.

Intermediate

Score your API's error messages with a rubric

Sample fifty real error responses from the log, score each body 0 to 2 on six criteria, and publish the score per endpoint before anyone redesigns the errors.

Error handlingDeveloper experienceAPI design

Advanced

Write a production-readiness checklist for a new SDK

Write the checklist your team signs before a first public SDK release: an owner and an exit criterion on every item, and a script that fails the items it can read.

Publishing and releasesSupply chainSDK designCI and automation

16 guides in 4 topics

Publishing to registries, versioning and release automation, supply-chain integrity, and hardening clients and servers.

Publish to package registries 3 guides

The mechanics of each registry: npm (provenance, scoped packages), PyPI (trusted publishing), Go modules (tags, major version paths, proxies), Packagist, RubyGems, LuaRocks, crates.io, Maven Central, NuGet, pub.dev, Swift Package Index, Hex; yanking; and releasing many SDKs from one commit or monorepo (changesets, release-please, goreleaser, repo-manager as one tool for many repos, the sdkgen release-and-tag flow).

TypeScript, JavaScript · Advanced

Recover when one registry upload fails mid release

Make each publish step ask the registry and skip what it holds, give each registry its own job, push the tag last, and know when to burn a half-published version.

Publishing and releasesCI and automationIdempotency

Python · Intermediate

Set up PyPI trusted publishing from GitHub Actions

Register the workflow on PyPI and TestPyPI, publish through pypa/gh-action-pypi-publish with id-token write, and check the record still matches the file.

Publishing and releasesCI and automationAuthentication

Version, changelog and automate releases 3 guides

Semver for SDKs, deciding whether a regenerated SDK is a minor or major release, conventional commits, CHANGELOG generation, release candidates, human-gated production releases, deprecation policy and long-term support, scheduled live suites, regenerating SDKs in CI (the Speakeasy action, Fern CI, sdkgen doctor and release-and-tag as options).

Beginner

Adopt conventional commits in an SDK repository

Write commits as type(scope): subject with a scope per language, enforce it with commitlint and a title check, and keep draft footers out of squash merges.

Git and repositoriesPublishing and releasesCI and automation

Intermediate

Choose a release automation tool for an SDK repository

Dry-run changesets, git-cliff, release-please, and semantic-release against a throwaway copy of the repository, then pick by where a person decides the release.

Publishing and releasesCI and automationGit and repositories

Beginner

Generate a changelog from conventional commits

Turn a commit range into CHANGELOG.md sections grouped by release, with dependency bumps and regeneration noise filtered out rather than published.

Publishing and releasesGit and repositoriesDocumentation

Secure the supply chain 3 guides

SLSA levels, Sigstore signing and cosign, SBOMs (CycloneDX, SPDX), provenance attestations, dependency pinning and lockfiles, Dependabot and Renovate, Socket, secret scanning, CVE runbooks, reproducible builds as a security property, and the trade-offs of a zero-dependency policy (the Voxgig multi-language libraries as one example of that policy).

Advanced

Write a CVE response runbook for an SDK

Take a private vulnerability report to a fixed release in every language you ship, then check the advisory against the OSV schema and your SDK list.

SecuritySupply chainPublishing and releases

Harden clients and servers 7 guides

Runtime security for integrations: the OWASP API Security Top 10, TLS pinning, SSRF defence for user-supplied URLs, input validation at the boundary, mass assignment, security.txt (RFC 9116), secret redaction in logs and debug output, least-privilege tokens, dependency isolation, server-side key rotation.

TypeScript, JavaScript · Advanced

Defend a URL-fetching endpoint against SSRF

Allowlist the scheme and port, resolve the name yourself, refuse special-purpose addresses, connect to the address you checked, and check again on each redirect.

SecurityOutbound controlValidation

TypeScript, JavaScript · Intermediate

Keep internal detail out of API error responses

Map every unhandled exception to an RFC 9457 problem with a correlation id, run the mapper everywhere, and scan responses for your own host names and table names.

SecurityError handlingObservability

Beginner

Publish security.txt for an API

Serve an RFC 9116 security.txt so a researcher who finds a bug in your API knows where to send it, and add the expiry check that stops the file going stale.

SecurityCI and automation

TypeScript, JavaScript · Intermediate

Rotate API keys without breaking your clients

Run two keys at once, watch which one each caller uses, and retire the old one on evidence rather than on a date somebody picked.

API keysCredentials and secretsSecurity

TypeScript, JavaScript · Advanced

Test an API for broken object level authorization

Try every identifier with every credential and assert that a caller who does not own a resource gets the same answer as one asking for something that does not exist.

AuthorizationSecurityTesting

22 guides in 5 topics

For the team with many third-party APIs in production: choosing and upgrading SDKs, credentials, telemetry and metering, one control surface for outbound calls, and debugging what went over the wire.

Evaluate, adopt and upgrade SDKs 6 guides

Assessing an official, community or generated SDK before you depend on it (license, retry behavior, release cadence, transport control), wrapping it behind your own interface, pinning and vendoring, upgrading across a major with jscodeshift and ts-morph codemods, responding to Sunset headers, and using SDK Catalog packages for public APIs (install per language, offline test mode, the paired Go CLI, MCP server and REPL, direct and prepare for unmodelled endpoints, what unofficial means, and when Octokit or plain fetch is the better call).

TypeScript · Intermediate

Audit SDK retry and timeout defaults before adoption

Point a candidate client at a local stub that fails and hangs, then read its real retry count and tail latency off the stub instead of trusting its README.

Retries and backoffTimeoutsSDK design

Intermediate

Evaluate a third-party SDK before you depend on it

Score each candidate client on license, release cadence, unreleased fixes, open issues, and support, from a dated snapshot instead of its star count.

Supply chainPublishing and releasesSDK design

TypeScript, JavaScript · Intermediate

Respond to a Sunset header in your client

Read Sunset, Deprecation, and the Link relations off every response, then open one ticket per endpoint per day with the days remaining and the successor.

Versioning and deprecationSDK designObservability

TypeScript, JavaScript · Advanced

Write a jscodeshift codemod for an SDK upgrade

Rename methods and reshape argument objects at every SDK call site with a jscodeshift transform, dry-run it, review the diff, and audit the misses with ts-morph.

Versioning and deprecationParsingLinting and governance

Load credentials and secrets 3 guides

Where the secret lives and how code reaches it: environment variables and dotenv, Vault (agent and API), AWS Secrets Manager and Parameter Store, GCP Secret Manager, Azure Key Vault, 1Password Connect and CLI, Doppler, Infisical, SOPS, the external-secrets operator; rotation without downtime, local development, CI, serverless, failing fast on a missing secret, keeping secrets out of CI logs.

TypeScript · Intermediate

Give a Cloud Run service a secret at deploy or at run time

Mount a Secret Manager secret with --set-secrets, read it at run time with the client library or through sekreto, and see which path picks up a new version and when.

Credentials and secretsEdge and serverlessAuthorization

TypeScript, Python, Go · Intermediate

Load AWS secrets without a vendor SDK in every service

Read one Secrets Manager secret from Node, Go, and Python services through a sekreto chain or the AWS SDKs, and see what each path reaches and what it hides.

Credentials and secretsAuthorizationSecurity

TypeScript, Python · Intermediate

Load secrets in Lambda without a fetch per invocation

Read an API key from Secrets Manager once per execution environment, not per invocation, through the extension, the SDK, or sekreto, and count the calls.

Credentials and secretsEdge and serverlessCaching

Instrument and meter API calls 4 guides

OpenTelemetry traces and metrics for API clients, trace context propagation from SDK through gateway to service, request ids and correlation, audit logs, cost attribution per call and per tenant, sampling, client identification headers, dashboards (Grafana, Honeycomb, Datadog), and SDK-level telemetry, metrics, audit, cost and clienttrack features (sdkgen) as one option against OpenTelemetry auto-instrumentation and gateway analytics.

Intermediate

Choose the layer that instruments outbound API calls

Capture one retried call at four layers, from OpenTelemetry to the gateway log, and give the span to the one that names the operation, tenant, and attempt.

ObservabilitySDK generationOutbound controlRetries and backoff

TypeScript, Python · Intermediate

Export outbound call spans from a serverless function

Get the span for the API call your function made to the collector before the environment freezes: flush it, hand it to a runtime task, or let a sidecar drain it.

ObservabilityEdge and serverless

TypeScript, Go · Intermediate

Propagate a request id through an SDK into server logs

Mint one id per logical request, send it on every retry as a trace id, a custom header, or baggage, and find that exact id on every line of the server log.

ObservabilityDebuggingRetries and backoff

Advanced

Set an SLO for a third party API you depend on

Set an objective for a dependency you do not run, measured from your client, with burn-rate alerts that page when the provider degrades, not when you ship a bug.

ObservabilityError handling

Control outbound integrations from one place 7 guides

One place to see and police every outbound call: API gateways used for egress (Kong, Envoy, Tyk), egress proxies, service-mesh egress, unified-API vendors (Merge, Nango, Paragon), automation platforms (Zapier, Make, n8n), feature flags and kill switches, and station (each SDK registered as a plugin; config, credential routing via sekreto, observe, police with allow, deny and budget, debug; reading the station-errors reference when a policy denies a call; the sdkgen-station feature package, station-view, seneca-station).

Intermediate

Bring Zapier and n8n calls under your outbound policy

Put automation workflows under the egress policy your services follow: self-host n8n behind the proxy, scope hosted keys, or rewrite as a service.

Outbound controlAPI keysIdempotencyRetries and backoff

Beginner

Decide between a unified API and direct integrations

Score one real customer request against a unified common model and against direct vendor calls, then check the escape hatch and token custody before you sign.

Outbound controlOAuth and OIDCCredentials and secrets

Intermediate

Give a vendor a stable egress IP to allowlist

Pin calls to a vendor that allowlists source addresses behind one reserved address, and prove it from inside a worker with an address echo service.

Outbound controlEdge and serverlessSecurity

TypeScript · Intermediate

Kill-switch one vendor integration without a deploy

Stop every call to one vendor within seconds, return a typed refusal instead of a slow failure, and decide whether a refused call queues, degrades, or errors.

Outbound controlResilience patternsError handlingRetries and backoff

TypeScript, JavaScript · Advanced

Route outbound API calls through an egress proxy

Send every outbound call through one proxy that holds the credentials, enforces a per-vendor policy, and logs every decision it makes.

Outbound controlCredentials and secretsSecurityObservability

Debug an integration 2 guides

Finding out what went over the wire: mitmproxy, Charles, Proxyman, request logging, HAR files, replaying with curl, diagnosing TLS and proxy problems, content-type and encoding mistakes, debugging generated code (sdkgen --debug, the debug-generation guide, station-view), and a debug mode that dumps requests without leaking secrets.

TypeScript, Python · Beginner

Debug a query string the API rejects

Capture the query string your client sent, decode it, and compare it with the OpenAPI style and explode rules, so a 400 points at the one encoding fix it needs.

DebuggingOpenAPISDK design

15 guides in 5 topics

The services behind an API: choosing an architecture, message-based services and pattern routing, entity persistence, providers for external APIs, and HTTP or edge exposure. Seneca is one option beside NestJS, Moleculer, tRPC, NATS, Temporal and Hono.

Build message-based services 6 guides

Services where everything is a message: Seneca (actions by pattern, plugins and priors, transports and seneca-mesh, seneca-user, seneca-petition, structured message tracing, seneca-msg-test, seneca-doc, seneca-repl), @voxgig/system and create-system (services loaded by convention, model-driven CLI adding entity, srv, msg, field, env), and ordu for ordered task pipelines, against NestJS modules, Moleculer actions, tRPC routers, Fastify plus a message bus, NATS services and Temporal.

TypeScript · Beginner

Add health and readiness checks to a worker service

Give a worker with no HTTP port a liveness check that flags a stuck loop, and a readiness check that holds work until its broker and store answer.

Services and architectureObservabilityResilience patterns

TypeScript · Intermediate

Add user accounts to a message-based service

Give a Seneca system register, login and session-check messages with argon2id hashes, and keep the password out of every log line debug logging writes.

AuthenticationServices and architectureSecurityObservability

TypeScript, JavaScript · Advanced

Limit concurrency in a message worker

Stop a worker pulling more messages than it can process, so a burst waits at the broker where an operator can see it instead of inside your process.

Events and messagingServices and architecture

TypeScript, JavaScript · Advanced

Override a service action without forking its plugin

Add a second Seneca action on a vendor plugin's pattern, call the prior, keep every field it returns, and refuse to load out of order.

Plugin systemsServices and architectureCustomizationTesting

TypeScript, JavaScript · Intermediate

Run service startup steps in a fixed order

Turn an improvised startup function into an ordered list of named steps that can stop the boot and say why, and pin readiness to the store actually being open.

Services and architecturePlugin systems

JavaScript · Intermediate

Split a monolith into message-based services with Seneca

Put each module of a Node monolith behind a Seneca message pattern, keep its exports as a facade so callers and tests stay put, and find shared tables first.

Services and architecturePlugin systemsTesting

Route messages by pattern 2 guides

Dispatch by matching properties inside a service: patrun (most-specific match wins, trie keyed by sorted property names, gex globs, add, find, list, remove), bloomrun, router libraries, rules engines (json-rules-engine, Drools), decision tables (GoRules ZEN) and plain switch or if chains, with benchmarks for your message mix.

TypeScript · Beginner

Dispatch messages to handlers with a Map keyed by type

Replace a switch on message.type with a Map of handlers, so that adding one is a registration call, unknown types reach a fallback, and prototype keys stay out.

Services and architectureEvents and messaging

Python · Intermediate

Dispatch messages with pattern matching in Python

Route messages in a Python worker with the match statement, using mapping and class patterns, guards, and a fallback, tested over a table of messages.

Services and architectureEvents and messaging

Persist entities in services 1 guide

Entity data in services: seneca-entity and its store plugins (Postgres, Mongo, DynamoDB, seneca-d1-store on Cloudflare) against Prisma, Drizzle, TypeORM, Knex and raw drivers; the repository pattern, store-agnostic tests, migrations, multi-store setups.

TypeScript · Beginner

Choose an id scheme for service entities

Decide who mints an entity id, the service or the database, then choose a sequence, UUIDv4, UUIDv7, ULID, or nanoid by measuring index locality and order.

PersistenceServices and architecture

Wrap external APIs as providers 4 guides

Bringing third-party APIs into a service system as providers: the seneca-provider pattern (seneca-dtone-provider, seneca-attachmentav-provider), generating a provider from a spec (the sdkgen seneca-provider target), credentials, retries and testing for providers against recorded fixtures, versus the adapter pattern, Nango and Merge unified APIs, and hand-written service clients.

TypeScript · Intermediate

Decide which layer retries a failed vendor call

Give network errors, 429 responses, 5xx, and handler crashes one retry owner each among stripe-node, p-retry, and JetStream, then count vendor calls to prove it.

Retries and backoffResilience patternsServices and architectureIdempotency

TypeScript · Intermediate

Map vendor error responses onto message errors

Map every vendor status and error code onto five outcomes inside a Seneca provider, reply with a coded error, and log the vendor's own code beside it.

Error handlingServices and architecturePlugin systems

TypeScript · Advanced

Migrate a hand-written vendor client to a provider plugin

Replace each service's copy of a vendor client with one Seneca provider, moving callers through shadow reads until the legacy path's vendor calls reach zero.

Services and architecturePlugin systemsRetries and backoffTesting

TypeScript · Advanced

Switch vendors behind one provider interface

Put two vendors behind one Seneca message, route by tenant and country, normalize both replies into one shape that keeps every field, and diff the two replies.

Services and architecturePlugin systemsTesting

Expose services over HTTP and at the edge 2 guides

HTTP and edge fronts for message services: seneca-gateway-* (including seneca-gateway-cloudflare) and seneca-web-adapter-express against Hono on Cloudflare Workers, Express and Fastify routers, API gateways (Kong, APISIX) and serverless adapters; auth at the gateway, running the same service locally and at the edge.

JavaScript, TypeScript · Intermediate

Add auth at the gateway for a service system

Verify tokens once at the gateway, strip the identity headers callers send, and sign what it forwards, so a hand-set x-user-id cannot promote anyone.

AuthenticationAuthorizationSecurityServices and architecture

TypeScript, JavaScript · Advanced

Run one service locally and at the edge without forking it

Write the HTTP front once in the fetch shape, give Node a twenty-line adapter, and run one request suite against both fronts and a stand-in that has no Node globals.

Edge and serverlessServices and architectureTesting

16 guides in 4 topics

Reading the formats integrations depend on, building parsers from grammars, validating shapes at boundaries, and transforming nested data.

Parse config and data formats 6 guides

Each format and when to choose it: JSON, JSONC, JSON5, jsonic (unquoted keys, comments, implicit top level, plugins, jsonic-cli), YAML, TOML, INI, CSV (RFC 4180, headers, custom separators, streaming, strict and lenient modes), XML, Markdown, CSS, JSON Lines, Atom and RSS feeds, protobuf IDL and Zon; error positions, streaming large files, when lenient input is the wrong choice.

TypeScript · Intermediate

Decide when lenient parsing is the wrong choice

Give a lenient parser to files people edit and a strict one to bodies programs send, keep the loaders apart, and let a test refuse a lenient import at the boundary.

ParsingValidationSecurity

TypeScript · Advanced

Include one config file from another

Pull a shared fragment into a config file with @tabnas/multisource, track where each value came from, and refuse cycles and paths that leave the config directory.

ConfigurationParsingSecurity

TypeScript, Go · Advanced

Read a protobuf IDL file without running protoc

List the services, methods, and field numbers in a tree of .proto files from a script, and refuse the misspelled custom option that a plain parser accepts.

gRPC and protobufParsingLinting and governance

Write a grammar and parser 7 guides

Building a parser for your own format: ABNF (RFC 5234) compiled to a rule table with @tabnas/abnf (a state machine as data, not generated parser code), attaching behavior by rule name, extending an existing grammar without forking, inspecting with @tabnas/debug, railroad diagrams, the support libraries (expr, path, directive, hoover, multisource), an LSP and playground for your format, benchmarking with measure, and emitting GBNF for constrained decoding; against peggy, ohm, chevrotain, nearley, ANTLR, tree-sitter, Lark and hand-written recursive descent.

TypeScript, Python · Intermediate

Attach parse actions to grammar rules by name

Keep the grammar as plain ABNF, bind behavior to the rule names the compiler assigns, and test that every handler still names a rule and fires after a rename.

GrammarsParsing

Go · Intermediate

Generate a parser for a custom format in Go

Build a Go parser for a nested config format with pigeon, participle, and the ANTLR Go target, and catch a PEG rule that doubles its work per level of nesting.

GrammarsParsingCode generation

TypeScript, Python · Advanced

Recover from syntax errors and report several in one parse

Turn on error recovery in chevrotain, ANTLR, tree-sitter or Lark, collect every error in one pass, and test that recovery keeps its place inside nested brackets.

ParsingGrammarsError handlingLinting and governance

TypeScript · Intermediate

Remove left recursion from a PEG grammar

Rewrite a left-recursive rule so peggy accepts it, fold the action from the left to keep subtraction left-associative, and compare with ohm-js and nearley.

GrammarsParsing

TypeScript · Beginner

Write a recursive descent parser by hand in TypeScript

Parse a filter language with a tokenizer, a method per grammar rule, and peek and expect helpers, then measure it against the same grammar in peggy and chevrotain.

ParsingGrammarsError handling

Validate data shapes 1 guide

Runtime validation of inputs, config and SDK responses, and exporting JSON Schema from a validator (for tool definitions and OpenAPI alike): Zod, Joi, Yup, Valibot, ArkType, io-ts, AJV with JSON Schema, Pydantic, go-playground/validator, and gubu (a schema that looks like the data, Required, Optional, Default, Min, Max, One, Exact, Check, Coerce, Email, Url, Uuid, JSON Schema export, TypeScript and Go).

TypeScript, JavaScript · Beginner

Write a validator whose schema looks like the data

Write the schema as an example of an accepted value, with constructors for types and literals for defaults, so schema and sample read side by side.

ValidationConfiguration

Transform nested data 2 guides

Getting, setting, merging, walking, injecting and transforming nested structures, and flattening API responses for analysis: lodash, ramda, immer, jq, JSONPath, JSON Pointer, json-patch, deepmerge, pandas.json_normalize, and struct (getpath, setpath, merge, walk, inject, transform, validate, flatten, ported to 23 languages at parity).

TypeScript, JavaScript · Beginner

Merge nested config objects with predictable precedence

Layer defaults, file, environment and flags with a deep merge so a later source overrides only the keys it sets, and clone first because merge mutates.

Data transformationConfiguration

TypeScript, JavaScript · Beginner

Read a value at a nested path without null checks

Read a deep value by a path held as a string, so a response mapper is a table of paths rather than a chain of optional accesses written out once per field.

Data transformationConfiguration

10 guides in 5 topics

Spec languages for configuration, environment overlays, application models that generate artifacts, project generators, and templates that produce deterministic code.

Unify configuration with a spec language 3 guides

Configuration as a lattice: aontu (unification, types, defaults such as *8080 | integer, references, conjunction and disjunction, reading a contradiction error, the verbs vet, get, why, set, subsume, breaking, trim, relations, hash, mod, reaches, jsonschema; the LSP and the stdio MCP server) against CUE, Jsonnet, Dhall, Pkl, KCL and Nickel.

Intermediate

Explain why a unified config has a given value

Trace one field of a config unified from base, team, and environment files back to the line that set it, and fail CI when a field still rests on a default.

ConfigurationDebugging

Layer configuration across environments 1 guide

Configuration as data: Kustomize overlays, Helm values, YAML anchors, Jsonnet, Dhall, Pkl, KCL and CUE for environment layering; validating manifests in CI, removing duplication, migrating between languages, keeping secrets out of config, and when a unification language earns its keep.

Model an application and generate from it 1 guide

One model for entities, services, messages, fields and environments, then generating artifacts from it: @voxgig/model (unify .aon files into one model.json, actions that generate artifacts, --watch), model-react and model-vue bindings, and the early-stage apigen and udk projects.

TypeScript · Intermediate

Rebuild artifacts on model change with a watch loop

Regenerate TypeScript types and SQL within a second of a model edit, keep the last good output when a generator fails partway, and make the watch loop log why.

Code generationSemantic modelError handling

Generate code and projects 2 guides

Scaffolding and repeatable generation: jostraca (component tree of Project, Folder, File, Content, Fragment, Slot, Inject, Copy; define then build; in-memory generation for tests; byte-identical TypeScript and Go implementations; inks interpolation) against Yeoman, Plop, Hygen, Cookiecutter, Copier, Nx generators, Projen and Rails generators; plus pushing one template change to hundreds of repositories (repo-manager, the gh CLI, the Terraform GitHub provider, Renovate presets).

Engineer templates and AST transforms 3 guides

Deterministic generated code: EJS, Handlebars, Mustache, Jinja and Go templates; AST-based generation with ts-morph, jscodeshift and go/ast; codemods across generated files; formatting after generation; golden-file and snapshot tests of generated output; stable ordering and no timestamps.

TypeScript, Go, Python · Beginner

Format generated code as the last step of generation

Format generated TypeScript, Go, and Python in memory with the consuming project's settings, before the generator writes, so no run needs a formatting commit.

Code generationConfigurationCI and automation

13 guides in 4 topics

For library maintainers: porting with parity, one test corpus for every port, plugin systems that work the same everywhere, and the small utilities that recur.

Port a library across languages 3 guides

The canonical-plus-ports pattern (a TypeScript canonical, ports kept at parity: struct in 23 languages, plugin in 17, sekreto in 12, aontu, jostraca and apidef in Go), byte-identical output checks, idiom versus parity trade-offs, first-tier versus second-tier polish, release cadence across ports; compared with transpiling, sharing one implementation through WASM (wasm-bindgen, Extism) or FFI, and independent reimplementations (jq clones, lodash ports).

TypeScript, Go, Python · Beginner

Choose between porting a library and reimplementing it

Decide how a library reaches a second language by running one shared case against every candidate, and record which reimplementations already disagree with it.

PortingTestingData transformation

TypeScript, Go, Python, Rust · Intermediate

Release every port of a library on one version number

Link a canonical library and its npm, PyPI, Go, and Rust ports to one version, tag the Go module where Go looks, and check every artifact before anything publishes.

Publishing and releasesPortingGit and repositoriesCI and automation

Test once, run in every language 2 guides

One spec, many languages: JSON test corpora authored once and run by a per-language runner, omni (24 languages, zero runtime dependencies), the corpora behind struct, jostraca, aontu and the sdkgen .sdk/test/feature files, compared with Cucumber and Gherkin, JSON fixtures with hand-written runners, property-based testing (fast-check, Hypothesis, gopter) and Pact; corpus design, golden files, marking a case as expected to differ in one language, reporting parity gaps.

Design a plugin system 3 guides

Extending an application or library without forking it: @voxgig/plugin (definition, instance, declared, loaded and live lifecycle, reversible activation, 17 languages), the ESLint, Vite and Rollup plugin models, pluggy, the Go plugin package and hashicorp/go-plugin, OSGi, Ruby gem hooks, sandboxing third-party plugins, and sdkgen packages as an applied example.

Python, Ruby, JavaScript · Intermediate

Discover installed plugins without explicit registration

Find plugins because they are installed, with Python entry points, a gem file convention or a Node prefix scan, and refuse to start when two claim one name.

Plugin systemsSupply chainSecurity

TypeScript, JavaScript · Intermediate

Run two instances of one plugin definition side by side

Declare one plugin definition under two refs, each with its own options, state, and connection, and reconfigure one without touching the other.

Plugin systemsConfigurationTesting

TypeScript, JavaScript · Intermediate

Test a plugin through every lifecycle stage

Drive one plugin from registration through activation to deactivation inside a test, and assert what it released, without touching a real network.

Plugin systemsTesting

Choose and build small utilities 5 guides

The small libraries that recur in integration code, each against its mainstream peer: nid against uuid, nanoid and ulid (for idempotency keys and request ids); eraro against VError, Error.cause and Error subclasses; gex against minimatch and picomatch; inks against template literals and Mustache; ordu against p-series and a task queue; norma for argument normalization; and when to write your own versus depend.

TypeScript, JavaScript · Intermediate

Accept optional and reordered function arguments

Match a call's arguments against a pattern of names and types, so one function accepts several shapes without a chain of typeof checks.

SDK designValidation

TypeScript · Intermediate

Measure what a small dependency costs before you add it

Take four numbers for a one-purpose package, install size, bundle bytes, parse cost, and maintenance, and set them beside a copy and a version of your own.

Supply chainPublishing and releases

TypeScript, JavaScript · Intermediate

Package one utility for Node, Deno, Bun, and browsers

Publish one zero-dependency function so it imports cleanly in Node, Deno, Bun, and a bundler, and prove it against the packed tarball rather than the source tree.

Publishing and releasesEdge and serverlessTesting

Stop writing the same client twice#

Every guide here solves a problem a generated SDK already handles. Voxgig reads your OpenAPI description and generates the client, the CLI and the MCP server from one model.

Listen to Fireside, the Voxgig podcast

Since 2018, Richard Rodger has talked with developer advocates, event organizers, and the people who build developer-facing companies about the specifics of the work.