# @appport/client

> Transport-independent typed AppPort application client.

Latest version **1.0.1** (published 2026-09-24) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-09-24 |
| First published | 2026-09-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 84.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | rkendel |

## Links

- npm: https://www.npmjs.com/package/@appport/client
- Repository: https://github.com/rkendel1/appport
- Homepage: https://github.com/rkendel1/appport#readme
- Issues: https://github.com/rkendel1/appport/issues
- npm.io page: https://npm.io/package/@appport/client

## Dependencies (1)

- [@appport/protocol](https://npm.io/package/@appport/protocol.md) 1.0.1

## Recent versions

- 1.0.1 (latest) — 2026-09-24
- 1.0.0 — 2026-09-21

## README

# @appport/client

The transport-independent application client.

```ts
import { createClient } from "@appport/client";

const client = createClient({ transport });
await client.connect();
await client.load(); // discovers capabilities and versions from the manifest

await client.call("documents.save", { documentId, content });
await client.capabilities.documents.save({ documentId, content });

for await (const chunk of client.stream("build.logs", { buildId })) console.log(chunk.line);

const unsubscribe = await client.events.subscribe("documents.changed", (payload) => refresh(payload));
```

The client builds envelopes, correlates responses, resolves capability versions
from the manifest, unwraps errors into `AppPortError`, and exposes capabilities
as a namespaced proxy. Application code never touches a protocol envelope.

`createDuplexTransport` implements request correlation, subscriptions and stream
reassembly once, for every carrier that can push: WebSocket, Electron IPC, Tauri
IPC and the in-process bridge.

With a generated contract the client is fully typed:

```ts
import { createDocumentsClient } from "./appport/generated/client.ts";

const client = createDocumentsClient({ transport });
const { version } = await client.capabilities.documents.save({ documentId, content });
```

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