rust reimplentation of sequoia.pub
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rust 63.4%
Python 36.3%
Shell 0.4%
1 1 0

Clone this repository

https://tangled.org/notplants.bsky.social/rsequoia https://tangled.org/did:plc:3nogfd4smhmbrv4wo6kl7zg2/rsequoia
git@tangled.org:notplants.bsky.social/rsequoia git@tangled.org:did:plc:3nogfd4smhmbrv4wo6kl7zg2/rsequoia

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

rsequoia#

A Rust reimplementation of Sequoia (sequoia-cli) for publishing standard.site documents to AT Protocol.

Built in Rust so it can be directly imported as a library into other Rust projects (like lichen) without requiring Node.js or Bun as a runtime dependency.

Features#

  • Config-compatible with Sequoia's sequoia.json format
  • State-compatible with Sequoia's .sequoia-state.json format
  • OAuth token pass-through via environment variables (for integration with tools that already have AT Protocol auth)
  • App password auth via ATP_IDENTIFIER + ATP_APP_PASSWORD env vars (Sequoia-compatible)
  • Publication icon upload via --icon flag on init
  • Cover image upload from frontmatter field mapping
  • Configurable frontmatter mapping for different SSGs (Hugo, Astro, etc.)
  • Draft filtering via configurable frontmatter field

Usage#

# authenticate
rsequoia auth --handle alice.bsky.social --password xxxx-xxxx

# create a publication record
rsequoia init --name "My Blog" --url https://myblog.example.com

# publish documents
rsequoia publish

# inject verification links into HTML
rsequoia inject --output-dir ./dist

OAuth token auth (for integration with lichen)#

RSEQUOIA_ACCESS_TOKEN=eyJ... \
RSEQUOIA_DID=did:plc:abc123 \
RSEQUOIA_PDS_URL=https://bsky.social \
rsequoia publish

Configuration#

Create a sequoia.json in your project root:

{
  "siteUrl": "https://myblog.example.com",
  "contentDir": "./content",
  "publicationUri": "at://did:plc:abc123/site.standard.publication/self",
  "pathPrefix": "/",
  "ignore": ["header.md", "footer.md"],
  "publishContent": true,
  "frontmatter": {
    "title": "title",
    "description": "description",
    "publishDate": "date",
    "updatedAt": "updated",
    "draft": "draft",
    "tags": "tags",
    "coverImage": "cover_image"
  }
}

As a library#

Add to your Cargo.toml:

rsequoia = { path = "../references/rsequoia" }

Then use the modules directly:

use rsequoia::config;
use rsequoia::publish;
use rsequoia::pds_client::PdsClient;

let cfg = config::load_config(Path::new("sequoia.json"))?;
let client = PdsClient::with_token(&pds_url, &access_token);
let result = publish::publish(&client, &did, &cfg, base_dir, false).await?;

Running tests#

# unit tests
cargo test

# E2E tests (requires access to t1cc PDS)
cd e2e-tests && ./run.sh

Credits#

This project is entirely based on Sequoia by Steve Simkins, reimplemented in Rust. The config format, state tracking, CLI commands, and publishing behavior are designed to be compatible with the original.