Callsheet
Getting Started

Installation

Pick an adapter to get started, then add packages for code generation or ts-rest as needed.

Choose an adapter

Install the adapter package for the data-fetching library you use.

React Query

pnpm add @callsheet/react-query @tanstack/react-query

sh npm install @callsheet/react-query @tanstack/react-query

yarn add @callsheet/react-query @tanstack/react-query

SWR

pnpm add @callsheet/swr swr
sh npm install @callsheet/swr swr
yarn add @callsheet/swr swr

The adapter package includes everything you need to define and use calls.

Add code generation (optional)

If you want Callsheet to generate calls from your existing typed sources, add the codegen package:

pnpm add -D @callsheet/codegen
sh npm install -D @callsheet/codegen
yarn add @callsheet/codegen -D

GraphQL

For GraphQL apps with code-generation, Callsheet can build from GraphQL Code Generator output.

For more on GraphQL setup, read Using Callsheet with GraphQL.

ts-rest

For ts-rest apps, add @ts-rest/core and Callsheet will build from your existing contracts.

pnpm add @ts-rest/core
sh npm install @ts-rest/core
yarn add @ts-rest/core

Manual ts-rest calls

If you are wrapping ts-rest routes by hand instead of using code generation, add the ts-rest source package:

pnpm add @callsheet/ts-rest @ts-rest/core
sh npm install @callsheet/ts-rest @ts-rest/core
yarn add @callsheet/ts-rest @ts-rest/core

For more details on ts-rest setup, read the ts-rest guide.

Callsheet Packages

  • @callsheet/react-query: adapter for React Query apps
  • @callsheet/swr: adapter for SWR apps
  • @callsheet/codegen: automatically generate Callsheet from sources
  • @callsheet/ts-rest: for manual ts-rest integration

Next Steps

If you're ready to get started with Callsheet, go to Quickstart.

If you want a deeper package breakdown, go to Packages and Imports.

On this page