⚡ Fetching and realtime data exchange framework.
See the code
One SDK. Any API. Fully typed.
The type-safe API layer for TypeScript apps. Connect to REST, GraphQL, Firebase, WebSockets, SSE — all with one consistent interface and the best type safety in the ecosystem.
import { createClient } from "@hyper-fetch/core";
// Create a client — this is the single entry point for all your API calls
const client = createClient({ url: "https://api.example.com" });
// Define a typed request — response shape is inferred everywhere from here
const getUsers = client.createRequest<{ response: { id: number; name: string }[] }>()({
endpoint: "/users",
method: "GET",
});
// Send it — data, error, and status are fully typed
const { data, error, status } = await getUsers.send();
npx @hyper-fetch/cli generate --url https://api.example.com/openapi.json
import { sdk } from "./generated";
// Every endpoint from your schema is available as a typed method
const { data } = await sdk.users.list.send();
anyHyper Fetch is the data layer inside Hype Stack, the full-stack template I build alongside it.
// Send and destructure — all return values are typed
const { data, error, status } = await getUsers.send();
// Params go in the URL, data goes in the body — both fully typed
const { data, error, status } = await createUser.send({
params: { teamId: 1 },
data: { name: "Jane", email: "[email protected]" },
});
import { useFetch } from "@hyper-fetch/react";
const UserList = () => {
// useFetch triggers the request on mount and returns typed state
const { data, loading, error } = useFetch(getUsers);
if (loading) return <p>Loading...</p>;
if (error) return <p>Error loading users</p>;
return <ul>{data?.map((u) => <li key={u.id}>{u.name}</li>)}</ul>;
};
252 followers · starred Jul 2025
29 followers · starred Sep 2022
594 followers · starred Jul 2025
61 followers · starred Jul 2025
⚡ Fetching and realtime data exchange framework.
See the code
One SDK. Any API. Fully typed.
The type-safe API layer for TypeScript apps. Connect to REST, GraphQL, Firebase, WebSockets, SSE — all with one consistent interface and the best type safety in the ecosystem.
import { createClient } from "@hyper-fetch/core";
// Create a client — this is the single entry point for all your API calls
const client = createClient({ url: "https://api.example.com" });
// Define a typed request — response shape is inferred everywhere from here
const getUsers = client.createRequest<{ response: { id: number; name: string }[] }>()({
endpoint: "/users",
method: "GET",
});
// Send it — data, error, and status are fully typed
const { data, error, status } = await getUsers.send();
npx @hyper-fetch/cli generate --url https://api.example.com/openapi.json
import { sdk } from "./generated";
// Every endpoint from your schema is available as a typed method
const { data } = await sdk.users.list.send();
anyHyper Fetch is the data layer inside Hype Stack, the full-stack template I build alongside it.
// Send and destructure — all return values are typed
const { data, error, status } = await getUsers.send();
// Params go in the URL, data goes in the body — both fully typed
const { data, error, status } = await createUser.send({
params: { teamId: 1 },
data: { name: "Jane", email: "[email protected]" },
});
import { useFetch } from "@hyper-fetch/react";
const UserList = () => {
// useFetch triggers the request on mount and returns typed state
const { data, loading, error } = useFetch(getUsers);
if (loading) return <p>Loading...</p>;
if (error) return <p>Error loading users</p>;
return <ul>{data?.map((u) => <li key={u.id}>{u.name}</li>)}</ul>;
};
252 followers · starred Jul 2025
29 followers · starred Sep 2022
594 followers · starred Jul 2025
61 followers · starred Jul 2025