# @atcute/bluesky

> Bluesky (app.bsky.* and chat.bsky.*) schema definitions

Latest version **4.0.21** (published 2026-09-10) · 0BSD license · 0 weekly downloads

## Install

```sh
npm install @atcute/bluesky
pnpm add @atcute/bluesky
yarn add @atcute/bluesky
bun add @atcute/bluesky
```

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.0.21 |
| Published | 2026-09-10 |
| First published | 2024-08-18 |
| Weekly downloads | 0 |
| License | 0BSD |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 839.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | externdefs |
| Keywords | atcute, atproto, bluesky |

## Links

- npm: https://www.npmjs.com/package/@atcute/bluesky
- Repository: https://tangled.org/did:plc:pljn5qch4tgadongtc7i6qij
- npm.io page: https://npm.io/package/@atcute/bluesky

## Dependencies (2)

- [@atcute/atproto](https://npm.io/package/@atcute/atproto.md) ^4.0.4
- [@atcute/lexicons](https://npm.io/package/@atcute/lexicons.md) ^2.1.0

## Recent versions

- 4.0.21 (latest) — 2026-09-10
- 4.0.20 — 2026-08-22
- 4.0.19 — 2026-08-19
- 4.0.18 — 2026-08-12
- 4.0.17 — 2026-08-02
- 4.0.16 — 2026-07-25
- 4.0.15 — 2026-07-23
- 4.0.14 — 2026-07-07
- 4.0.13 — 2026-07-05
- 4.0.12 — 2026-06-29
- 4.0.11 — 2026-06-27
- 4.0.10 — 2026-06-18
- 4.0.9 — 2026-06-12
- 4.0.8 — 2026-06-11
- 4.0.7 — 2026-06-08
- … 68 more at https://npm.io/package/@atcute/bluesky/versions

## README

# @atcute/bluesky

[Bluesky](https://bsky.app) (app.bsky.\* and chat.bsky.\*) schema definitions

```sh
npm install @atcute/bluesky
```

## usage

```ts
import { is, type $type } from '@atcute/lexicons';
import { AppBskyFeedPost, AppBskyRichtextFacet } from '@atcute/bluesky';

type Facet = AppBskyRichtextFacet.Main;
type MentionFeature = $type.enforce<AppBskyRichtextFacet.Mention>;

const mention: MentionFeature = {
	$type: 'app.bsky.richtext.facet#mention',
	did: 'did:plc:z72i7hdynmk6r22z27h6tvur',
};

const facet: Facet = {
	index: {
		byteStart: 6,
		byteEnd: 15,
	},
	features: [mention],
};

const record: AppBskyFeedPost.Main = {
	$type: 'app.bsky.feed.post',
	text: `hello @bsky.app!`,
	facets: [facet],
	createdAt: new Date().toISOString(),
};

is(AppBskyFeedPost.mainSchema, record);
// -> true
```

### with `@atcute/client`

pick either one of these 3 options to register the ambient declarations

```jsonc
// file: tsconfig.json
{
	"compilerOptions": {
		"types": ["@atcute/bluesky"],
	},
}
```

```ts
// file: env.d.ts
/// <reference types="@atcute/bluesky" />
```

```ts
// file: index.ts
import type {} from '@atcute/bluesky';
```

now all the XRPC operations should be visible in the client

```ts
import { Client, simpleFetchHandler } from '@atcute/client';

const client = new Client({
	handler: simpleFetchHandler({ service: 'https://public.api.bsky.app' }),
});

const response = await client.get('app.bsky.actor.getProfile', {
	params: {
		actor: 'did:plc:z72i7hdynmk6r22z27h6tvur',
	},
});
// ...
```

### with `@atcute/lex-cli`

when building your own lexicons that reference Bluesky types, configure lex-cli to import from this
package:

```ts
// file: lex.config.js
import { defineLexiconConfig } from '@atcute/lex-cli';

export default defineLexiconConfig({
	files: ['lexicons/**/*.json'],
	outdir: 'src/lexicons/',
	imports: ['@atcute/bluesky'],
});
```

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