Skip to content
Back to skills

Orpc Client Side

ASecurity

Call your oRPC procedures remotely as if they were local functions.

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 12, 2026
businessgit

Works with

  • cli

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-client-side --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Client Side?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orpc Client Side
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-client-side/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-client-side)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: oRPC Client-Side Clients
description: Call your oRPC procedures remotely as if they were local functions.
license: MIT
metadata:
  author: Ali Torki
  homepage: https://github.com/ali-master
  version: "1.0.0"
---

# Client-Side Clients

Call your [procedures](/docs/procedure) remotely as if they were local functions.

## Installation

```sh
npm install @orpc/client@latest
```

## Creating a Client

Uses [RPCLink](/docs/client/rpc-link); ensure your server uses `RPCHandler` or follows the [RPC Protocol](/docs/advanced/rpc-protocol).

```ts
import { createORPCClient, onError } from '@orpc/client'
import { RPCLink } from '@orpc/client/fetch'
import { RouterClient } from '@orpc/server'
import { ContractRouterClient } from '@orpc/contract'

const link = new RPCLink({
  url: 'http://localhost:3000/rpc',
  headers: () => ({ authorization: 'Bearer token' }),
  interceptors: [onError(error => console.error(error))],
})

const client: RouterClient<typeof router> = createORPCClient(link)
// or with a contract:
const client: ContractRouterClient<typeof contract> = createORPCClient(link)
```

## Calling Procedures

```ts
const planet = await client.planet.find({ id: 1 })
```

## Merging Clients

```ts
const clientA: RouterClient<typeof routerA> = createORPCClient(linkA)
const clientB: RouterClient<typeof routerB> = createORPCClient(linkB)

export const orpc = { a: clientA, b: clientB }
```

## Type Utilities

```ts
import type {
  InferClientInputs, InferClientBodyInputs,
  InferClientOutputs, InferClientBodyOutputs,
  InferClientErrors, InferClientErrorUnion,
  InferClientContext
} from '@orpc/client'

type Inputs = InferClientInputs<typeof client>
type BodyInputs = InferClientBodyInputs<typeof client>
type Outputs = InferClientOutputs<typeof client>
type BodyOutputs = InferClientBodyOutputs<typeof client>
type Errors = InferClientErrors<typeof client>
type AllErrors = InferClientErrorUnion<typeof client>
type Context = InferClientContext<typeof client>
```

- `InferClientInputs` / `InferClientOutputs`: full input/output types per endpoint
- `InferClientBodyInputs` / `InferClientBodyOutputs`: only the `body` portion
- `InferClientErrors`: type-safe error map per endpoint
- `InferClientErrorUnion`: union of all possible errors
- `InferClientContext`: client context type

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.