Skip to main content

IntrigCodegen & Docs for your APIs

Generate type-safe hooks and unified docs from any OpenAPI spec — with code awareness. Built for React. SDKs are generated into node_modules (keep your repo clean).

Type-safe
Zod-validated
Code awareness
OpenAPI → Intrig Hook
paths:
/employee/{id}:
get:
operationId: getEmployee
parameters:
- in: path
name: id
required: true
schema: { type: string }
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Employee'
Generated React usage
import { isPending, isError, isSuccess } from '@intrig/react';
import { useGetEmployee } from '@intrig/react/employee/client';

export default function EmployeeCard({ id }: { id: string }) {
// Stateful hook: [state, execute, clear]
const [state, getEmployee, clear] = useGetEmployee({
fetchOnMount: true,
clearOnUnmount: true,
params: { id },
});

if (isPending(state)) return <p>Loading…</p>;
if (isError(state)) return <p>Failed: {String(state.error)}</p>;
if (!isSuccess(state)) return null;

return (
<div className="card">
<h3>{state.data.name}</h3>
<div className="flex gap-2">
<button onClick={() => getEmployee({ id })}>Refresh</button>
<button onClick={clear}>Reset</button>
</div>
</div>
);
}

Everything you need for API-driven frontends

From code generation to searchable docs and a live workbench.

Typed React hooks

Generate hooks for GET/POST/PUT/DELETE with strong types, params/body schemas, and predictable network-state.

Docs from source

Build docs from your OpenAPI + TypeScript types. Intrig commits normalized specs to git and generates the SDK into node_modules (don’t commit generated code).

Validation built-in

Zod schemas alongside types ensure safer runtime behavior and better DX.

Monorepo friendly

Works smoothly in any React repo; monorepos welcome. Export static sites for GitHub Pages or host anywhere.

Git-based history

Commit normalized specs and rely on git diffs for versioning today. "Chronicle" UI is planned.

Code awareness (usage detection)

Intrig detects where generated hooks are used across your codebase to help track coverage.

How it works

Point Intrig at an OpenAPI doc and let it do the heavy lifting.

1) Connect your spec

Add a remote or local OpenAPI 3 definition. Intrig normalizes and validates.

2) Generate SDK

Normalize the OpenAPI and commit it. Intrig builds a typed SDK into node_modules for your app code (avoid committing generated code).

3) Use in code & ship

Import hooks from the SDK, benefit from code awareness, and publish your docs site.

Bring your APIs to life in React.

Spin up typed hooks, searchable docs, and an engineer-friendly workbench in minutes.