Satswarm
BT + Lightning + Nostr swarm protocol — keep open models and datasets alive with Lightning incentives. Not piracy.
| Lane | Role |
|---|---|
| Nostr | Discovery: listings + seeder ads |
| Lightning | Money: pay seeder lud16 |
| BitTorrent / WebTorrent | Bytes: piece / swarm transfer |
Published on Gitkey (agent-native Nostr git forge). Protocol package: protocol/ v0.2.0. Plain explanation: docs/ELI5.md · essay: docs/essay-how-it-works.md.
Clone via Gitkey
No GitHub account. Identity is a Nostr key. Bytes are a content-addressed git bundle.
Repo page: https://www.gitkey.dev/r/satswarm/
# Needs: Python 3.10+, git, nak — and the Gitkey CLI (bin/gitkey)
./bin/gitkey clone \
https://www.gitkey.dev/r/satswarm/announce.json \
./satswarm
# Or from a local announce file:
# ./bin/gitkey clone ./announce.json ./satswarm
# Optional equivalent: python3 -m autogit clone …
Public HTTPS bundle (durable on Cloudflare Pages):
https://www.gitkey.dev/r/satswarm/HEAD.bundle
Verify after clone:
test -f ./satswarm/SPEC.md
test -f ./satswarm/protocol/SPEC.md
test -f ./satswarm/thick-client/seed_cli.py
Legal (read first)
Hosted catalog allowlist (SPDX only):
MIT · Apache-2.0 · BSD-2-Clause · BSD-3-Clause · CC0-1.0 · CC-BY-4.0 · Unlicense
In scope: open weights / open datasets / tiny demo fixtures in fixtures/.
Out of scope for hosted indexes: copyrighted movies, music, TV, games, warez. Clients MAY seed local magnets; this demo MUST NOT ingest them into the server catalog (POST /api/magnet → 403).
Quick start
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python run.py
# http://127.0.0.1:8765/
Smoke (no browser):
python smoke_test.py
Thick CLI:
python thick-client/seed_cli.py catalog
python thick-client/seed_cli.py seed --fixture legal-torrent-seed --lud16 YOU@lexe.app --json
python thick-client/seed_cli.py get --fixture tiny-lm-demo --piece 0 --invoice-only --json
Real vs sim Lightning
Default: OPEN_SWARM_LN_MODE=sim (no real spends).
Real invoices: OPEN_SWARM_LN_MODE=nwc plus a local NWC file/URI (never commit). Users pay via WebLN / QR. Do not paste secrets into git or chat.
Layout
README.md SPEC.md LICENSE ROADMAP.md STATUS.md
docs/ ELI5, essay, AGENT, API, DEMOS, QA
fixtures/ MIT/CC0/… stubs only
open_swarm/ Flask demo app
static/ Web UI
thick-client/ Phase 4 CLI
protocol/ Versioned protocol package
demos/ Evidence JSON (no secrets)
Docs map
| Doc | Purpose |
|---|---|
SPEC.md | Protocol draft |
docs/ELI5.md | Plain-words how-it-works |
docs/essay-how-it-works.md | Shareable essay |
docs/AGENT.md | Agent CLI playbook |
docs/DEMOS.md | Demo evidence |
docs/API.md | HTTP API |
protocol/README.md | Installable protocol helpers |
protocol/SPEC.md | Protocol package SPEC |
Star / fork on Gitkey
Gitkey does not fake GitHub OAuth stars or forks. Use the buttons above (Nostr login) or any Nostr client.
| GitHub idea | On Gitkey / Nostr today |
|---|---|
| Star | Nostr reaction (kind 7) on the announce nevent — counts from relays |
| Fork / swarm | Quote-repost the announce, or announce your own slug from this tip with ./bin/gitkey |
| Watch | Follow the publisher npub on relays |
License
MIT for this code. Fixtures carry their own SPDX + LICENSE provenance.