# @trpc/client

> The tRPC client library

Latest version **11.18.0** (published 2026-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @trpc/client
pnpm add @trpc/client
yarn add @trpc/client
bun add @trpc/client
```

Provides the command `intent`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 11.18.0 |
| Published | 2026-06-17 |
| First published | 2021-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 591.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 40602 |
| Author | KATT |
| Maintainers | katt, juliusmarminge |
| Keywords | tanstack-intent |

## Links

- npm: https://www.npmjs.com/package/@trpc/client
- Repository: https://github.com/trpc/trpc
- Homepage: https://trpc.io
- Issues: https://github.com/trpc/trpc/issues
- Funding: https://trpc.io/sponsor
- npm.io page: https://npm.io/package/@trpc/client

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 11.18.0 (latest) — 2026-06-17
- 11.18.1-canary.6 (canary) — 2026-09-03
- 11.13.0 (next) — 2026-03-15
- 10.45.4 (v10) — 2026-01-02
- 11.5.2-alpha-tmp-6955-again.21 (tmp) — 2025-09-25
- 11.5.2-alpha-6955-again-2025-09-24-08-18-00.13 (6955-again) — 2025-09-24
- 10.46.0-alpha-tmp-0202-nosideeffects-main.26 (tmp-main) — 2024-02-02
- 11.18.1-canary.5 — 2026-08-31
- 11.18.1-canary.2 — 2026-07-26
- 11.18.1-canary.1 — 2026-07-26
- 11.17.1-canary.3 — 2026-06-14
- 11.17.1-canary.2 — 2026-06-13
- 11.17.1-canary.1 — 2026-05-26
- 11.17.0 — 2026-04-28
- 11.16.1-canary.20 — 2026-04-22
- … 1339 more at https://npm.io/package/@trpc/client/versions

## README

<p align="center">
  <a href="https://trpc.io/"><img src="https://assets.trpc.io/icons/svgs/blue-bg-rounded.svg" alt="tRPC" height="75"/></a>
</p>

<h3 align="center">tRPC</h3>

<p align="center">
  <strong>End-to-end typesafe APIs made easy</strong>
</p>

<p align="center">
  <img src="https://assets.trpc.io/www/v10/v10-dark-landscape.gif" alt="Demo" />
</p>

# `@trpc/client`

> Communicate with a tRPC server on the client side.

## Documentation

Full documentation for `@trpc/client` can be found [here](https://trpc.io/docs/vanilla)

## Installation

```bash
# npm
npm install @trpc/client

# Yarn
yarn add @trpc/client

# pnpm
pnpm add @trpc/client

# Bun
bun add @trpc/client
```

## AI Agents

If you use an AI coding agent, install tRPC skills for better code generation:

```bash
npx @tanstack/intent@latest install
```

## Basic Example

```ts
import { createTRPCClient, httpBatchLink } from '@trpc/client';
// Importing the router type from the server file
import type { AppRouter } from './server';

// Initializing the tRPC client
const trpc = createTRPCClient<AppRouter>({
  links: [
    httpBatchLink({
      url: 'http://localhost:3000/trpc',
    }),
  ],
});

async function main() {
  // Querying the greeting
  const helloResponse = await trpc.greeting.query({
    name: 'world',
  });

  console.log('helloResponse', helloResponse); // Hello world
}

main();
```

---
_Source: https://npm.io/package/@trpc/client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
