GlobalCanadaEuropeAsia-Pacific
Sign in

Back to Open Source

District Social

An engine and a command-line client for drafting, checking and publishing social posts. The engine turns one post into a version for each network, checks every version, and publishes through each network's own API. It is built to publish only what a person has approved, exactly as it will be sent.

Quick start

  1. installnpm install district-socialInstalls the engine. Needs Node.js 22 or later.
  2. measure a postnode --input-type=module -e ' import { SPECS, vendorLength } from "district-social"; const text = "We shipped dark mode."; for (const p of ["bluesky", "twitter"]) console.log(p, vendorLength(p, text), "of", SPECS[p].maxChars); 'Prints bluesky 21 of 300 and twitter 21 of 280: the post counted the way each network counts, against its limit. No model and no credentials.

The README's quick start, word for word. Its section Using the engine goes on to formatting, QA and publishing.

What it does with a post

One post, a version for each network

It covers ten networks: Instagram, Facebook, Threads, X, LinkedIn, YouTube, Reddit, Bluesky, Pinterest and TikTok, each through that network's own API. Each version is measured the way its network counts, against that network's limits and conventions. A network publishes only when its connection is registered and its credentials resolve.

Checked before it goes out

QA runs over every version: the mechanical limits, compliance gates you can add, and an optional review by a model. Then the engine applies the fixes.

Only what a person approved

An approval is single-use, for one draft, and tied to a hash of that draft's exact versions. The engine has no call that grants one: a person grants it, through your own application. Your application, not the engine, enforces it: publishing does not check the approval, so your application uses it up first, then publishes.

Licence
Apache-2.0
Built with
TypeScript, on Node.js
Networks
Instagram, Facebook, Threads, X, LinkedIn, YouTube, Reddit, Bluesky, Pinterest and TikTok
Install
npm install district-social, on Node.js 22 or later. The package is the engine; the command-line client runs from a clone of the repository.
Credentials and model
Yours. None ship with it: you register your own developer app with each network, and approvals granted to anyone else, the project's maintainers included, do not carry over. The model is Claude with your own Anthropic credentials by default, or any client with the same contract.
Status
Released on npm, with SLSA provenance: its SECURITY.md shows how to verify a release

district-social on npm

Releases on GitHub

District Social on GitHub

Get involved

Issues and pull requests are welcome on GitHub. Report a vulnerability privately, as the security policy describes, and not in a public issue.

Contributing guide
CONTRIBUTING.md
Security policy
SECURITY.md
Changelog
CHANGELOG.md