Defining an API
Introduction to Accorudo
Getting to know Accorudo
What is Accorudo
Accorudo is the type-safe layer between your client and APIs you interact with. It provides a way to define and consume contracts that don't tax your application on code style, structure, or size.
Some of its most notable features include:
- OpenAPI cross-compatibility: You can generate Accorudo definitions from an OpenAPI spec, but also generate an OpenAPI spec from Accorudo definitions. Use the CLI to import and export. Annotate types with
@openapi.*JSDoc for components, parameters, and responses. See OpenAPI annotations. - 0kb bundle: Accorudo is a devDependency whose definitions exist only as types.
- No-baggage contract generation from OpenAPI: Accorudo definitions do not interfere with how you write your application business logic.
AccorudoClientwrapper with first-party rate-limiting support.
Install Accorudo
pnpm add accorudo
yarn add accorudo
npm install accorudo
bun add accorudo
import type { Route } from "accorudo/core";
import { AccorudoClient } from "accorudo/client";
import { defineConfig } from "accorudo/cli";