A Zig library for Bluesky activity and feed analytics, built on Zat.
README.md

tend #

a Zig library for understanding Bluesky activity and feeds, built on Zat. Explore who posts, replies, likes, or reposts; which records they interact with; and who contributes the largest share of your timeline. Collect evidence once and reuse it for different questions. See the supported questions.

install #

requires Zig 0.17 (tested with 0.17.0). from this checkout:

zig build -Doptimize=ReleaseSafe

use #

for example, collect a timeline sample and compare who brought entries into your feed with who originally wrote them. given an authenticated client:

var sample = try tend.feed.sample(&client, 10);
defer sample.deinit();

const introducers = try tend.feed.rank(allocator, sample.value.entries, .introducer);
defer introducers.deinit(allocator);

const authors = try tend.feed.rank(allocator, sample.value.entries, .author);
defer authors.deinit(allocator);

both rankings use the same sample; ranking makes no network requests. The library guide covers setup, ownership, and analysis of account activity from repository archives. examples/analyze.zig is a complete library consumer.

The CLI exposes the same operations for use from a shell. Follow the CLI guide to collect public account activity or sample your timeline, then generate reports from saved evidence.

design #

  • reuse evidence — asking another question should not require another fetch.
  • preserve distinctions — replies, posts, reposts, and likes answer different questions.
  • preserve uncertainty — incomplete evidence cannot establish inactivity.
  • name the source — repository records and an AppView's timeline are different observations.

dependencies #

dependency used for
Zig and Zat building Tend and providing AT Protocol clients, identity resolution, and archive verification
Hubble, from Microcosm fetching public repository snapshots for activity surveys; no login required
your account's PDS (Personal Data Server) login, session refresh, and proxying authenticated requests to the selected AppView
your selected AppView timeline samples, follows, and private mutes
Cloudflare DNS, the PLC directory, and identity web hosts discovering an account's DID and PDS when resolving its identity

Offline reports need only local evidence. The dependency details show which services each workflow contacts and the resolver defaults.

STAR is a repository archive format, supported through Zat, that lets Tend verify and summarize records as a stream. How STAR buys us performance explains the mechanism, measurements, and how it fits alongside Hubble acquisition.

develop #

zig fmt --check build.zig src examples # formatting
zig build test                       # behavior, ownership, and failure tests
zig build                            # CLI and standalone library consumer
zig build run -- --help              # command help

docs #

docs/ contains calling examples, collection semantics, and verification results.