Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mary-ext/atcute
a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky.
https://github.com/mary-ext/atcute
atproto bluesky dag-cbor dasl ipld typescript whitewind
Last synced: 1 day ago
JSON representation
a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky.
- Host: GitHub
- URL: https://github.com/mary-ext/atcute
- Owner: mary-ext
- License: mit
- Created: 2024-09-01T03:00:52.000Z (5 months ago)
- Default Branch: trunk
- Last Pushed: 2025-01-18T08:12:32.000Z (8 days ago)
- Last Synced: 2025-01-19T23:11:47.734Z (6 days ago)
- Topics: atproto, bluesky, dag-cbor, dasl, ipld, typescript, whitewind
- Language: TypeScript
- Homepage: https://codeberg.org/mary-ext/atcute
- Size: 1.22 MB
- Stars: 251
- Watchers: 2
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# atcute
a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky,
featuring:- an [API client][client] for making typed HTTP requests, with support for lexicons like
[WhiteWind][whitewind] or [Bluemoji][bluemoji]
- an [OAuth client for SPA applications][oauth-browser-client] for authentication use-cases
- a grab bag of utility packages:
- codec libraries for [DASL][dasl] data formats, a strict subset of IPLD specifications, like
CIDv1, DAG-CBOR and CAR, but tailored specifically for atproto
- codec for atproto's timestamp identifiers
- cryptography library for signing and verification of signatures in atproto
- schema validators for DID documents, and verification of did:plc operations
- Bluesky-specific helpers like [a rich text builder][bluesky-richtext-builder] and [a post thread
builder][bluesky-threading]looking for more? check out [skyware][skyware], an additional collection of packages, built on top
of atcute.[bluemoji]: ./packages/definitions/bluemoji
[bluesky-richtext-builder]: ./packages/bluesky/richtext-builder
[bluesky-threading]: ./packages/bluesky/threading
[client]: ./packages/core/client
[oauth-browser-client]: ./packages/oauth/browser-client
[whitewind]: ./packages/definitions/whitewind
[dasl]: https://dasl.ing/
[ipld]: https://ipld.io/
[skyware]: https://skyware.js.org/---
| Packages |
| ---------------------------------------------------------------------------------------------------------------------- |
| **Core packages** |
| [`client`](./packages/core/client): API client library |
| [`lex-cli`](./packages/core/lex-cli): CLI tool to generate type definitions for the API client |
| **OAuth packages** |
| [`oauth-browser-client`](./packages/oauth/browser-client): minimal OAuth browser client implementation |
| **Lexicon definitions** |
| [`bluemoji`](./packages/definitions/bluemoji): adds `blue.moji.*` lexicons |
| [`bluesky`](./packages/definitions/bluesky): adds `app.bsky.*` and `chat.bsky.*` lexicons |
| [`ozone`](./packages/definitions/ozone): adds `tools.ozone.*` lexicons |
| [`whitewind`](./packages/definitions/whitewind): adds `com.whtwnd.*` lexicons |
| **Utility packages** |
| [`car`](./packages/utilities/car): DASL CAR and atproto repository decoder |
| [`cbor`](./packages/utilities/cbor): DASL dCBOR42 codec |
| [`cid`](./packages/utilities/cid): DASL CID codec |
| [`crypto`](./packages/utilities/crypto): cryptographic utilities |
| [`did`](./packages/utilities/did): did utilities |
| [`did-plc`](./packages/utilities/did-plc): did:plc utilities |
| [`multibase`](./packages/utilities/multibase): multibase utilities |
| [`tid`](./packages/utilities/tid): atproto timestamp identifier codec |
| [`varint`](./packages/utilities/varint): protobuf-style LEB128 varint codec |
| **Bluesky-specific packages** |
| [`bluesky-richtext-builder`](./packages/bluesky/richtext-builder): builder pattern for Bluesky's rich text facets |
| [`bluesky-richtext-parser`](./packages/bluesky/richtext-parser): parse Bluesky's (extended) rich text syntax |
| [`bluesky-richtext-segmenter`](./packages/bluesky/richtext-segmenter): segments Bluesky's rich text facets into tokens |
| [`bluesky-threading`](./packages/bluesky/threading): create Bluesky threads containing multiple posts with one write |## contribution guide
this monorepo uses [`mise`](https://mise.jdx.dev) to handle versioning, although it doesn't really
matter. Node.js LTS is necessary to use the `internal-dev-env` package for testing the `client`
package with the official PDS distribution, but otherwise you can (and should) use the latest
available version.```sh
# Install all the recommended runtimes
mise install# Runs all the build scripts
pnpm run -r build# Pull in the latest ATProto/Ozone/Bluesky lexicons, and generate the type declarations
pnpm run pull
pnpm run -r generate
```### checking package sizes
to observe the size of packages (both install size and bundled size), there is a `pkg-size-report`
tool doing just that. you can also save the package sizes at a given time and inspect the impact of
changes to the final bundle size. the tool uses `esbuild` to produce a minified bundle to get the
size of each entrypoint.> [!WARNING]
> run `pnpm run -r build` before running the command. otherwise, the command **may not run**, or **give bad measurements**.```sh
# See the size of packages.
# If package sizes were saved previously, will also show the diff.
pnpm pkg-size-report# Save esbuild metafiles and package size information.
pnpm pkg-size-report --save# Save just esbuild metafiles.
pnpm pkg-size-report --save-meta# Show only the packages whose size have changed.
pnpm pkg-size-report --compare# Keep the result bundle produced by esbuild.
# Will be left in /tmp/[...]--[pkgname]--[random]
pnpm pkg-size-report --keep-builds
```