OverviewFilesCommitsIssuesDocsReleasesPeers

p2pbuilders commits / f631564

docs: refresh pear link + clarify it's a terminal app (TUI)
The live pear:// key was stale. Point the README, landing/public sites, and the relay probe script at the freshly staged + released build: pear://dqz1e6fwyrz1mxj7eqsmcar3hnegrj491t5hnqjm9mda9tz8dzfy Also rework the README so it's unambiguous that p2pbuilders is a TUI: - lead with "lives entirely in your terminal — no browser, no GUI" - add a "Using it" section: full prompt command reference (feed, thread, compose editor, moderation, identity) pulled from the in-app help - mark src/terminal/main.js as THE app in the file tree - fix the staging instructions for current Pear (pear touch → stage <link> → release; the old `pear stage dev .` no longer resolves a link) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
f63156427f3673337ccbcc81cb1567bdb79046da
by Local LLM <localllm@Locals-Mac-Studio.local> · 2026-06-10T22:47:01.000Z

Changed files (4) +93 -28

README.md +90 -25
……@@ -1,8 +1,10 @@
11# p2pbuilders
22
3A permissionless, peer-to-peer Hacker News clone on the [Pear](https://docs.pears.com/) + [Bare](https://github.com/holepunchto/bare) stack. Single feed, one hypercore per identity, hashcash-gated posts, reputation-weighted voting. Posts are mirrored across the [p2p-hiverelay](https://github.com/bigdestiny2/P2P-Hiverelay) network so they stay online when authors close their laptops.
3A permissionless, peer-to-peer Hacker News clone that lives **entirely in your terminal**. One feed, one hypercore per identity, hashcash-gated posts, reputation-weighted voting — built on the [Pear](https://docs.pears.com/) + [Bare](https://github.com/holepunchto/bare) stack. Posts are mirrored across the [p2p-hiverelay](https://github.com/bigdestiny2/P2P-Hiverelay) network so they stay online when authors close their laptops.
44
5Repo: https://github.com/bigdestiny2/p2pbuilders · Live: `pear run pear://gopfpwat99tcuaakasfnftrds3j6t7srdmi3qidbhm9xeizt1a5y`
5It's a **TUI** — no browser, no webview, no GUI. You run one command and drive the whole board from the `›` prompt.
6
7Repo: https://github.com/bigdestiny2/p2pbuilders · Live: `pear run pear://dqz1e6fwyrz1mxj7eqsmcar3hnegrj491t5hnqjm9mda9tz8dzfy`
68
79## Try it
810
……@@ -17,15 +19,68 @@ export PATH="$HOME/Library/Application Support/pear/bin:$PATH"
1719Run p2pbuilders:
1820
1921```
20pear run pear://gopfpwat99tcuaakasfnftrds3j6t7srdmi3qidbhm9xeizt1a5y
22pear run pear://dqz1e6fwyrz1mxj7eqsmcar3hnegrj491t5hnqjm9mda9tz8dzfy
2123```
2224
23Type `help` at the prompt.
25You'll land on the feed. Type `help` at the `›` prompt, or `submit "hello"` to say hi.
26
27## Using it
28
29The whole app is keyboard-driven from the `›` prompt. Type `help` any time to see this list in-app.
30
31**Feed**
32
33| command | what it does |
34| --- | --- |
35| `submit` | new post — opens the multi-line editor |
36| `submit "title" <body>` | new post in one line |
37| `open <n>` | open the thread for post #n |
38| `up <n>` / `down <n>` | vote post #n up or down |
39| `sort <hot\|new\|top>` | change how the feed is ordered |
40| `refresh` / `r` | reload the feed |
41
42**Inside a thread**
43
44| command | what it does |
45| --- | --- |
46| `reply` | reply — opens the multi-line editor |
47| `reply <body>` | reply in one line |
48| `up` / `down` | vote on the post you're viewing |
49| `back` / `b` | return to the feed |
50
51**Compose editor** (after `submit` / `reply` with no inline text)
52
53| key | what it does |
54| --- | --- |
55| `<your text>` | any line joins the body |
56| `.` | submit — on its own line |
57| `:q` | cancel |
58
59**Moderation**
60
61| command | what it does |
62| --- | --- |
63| `delete <n>` | delete a post (author, or admin for anyone) |
64| `delete` | delete the thread you're viewing |
65
66**Identity + infra**
67
68| command | what it does |
69| --- | --- |
70| `nick <name>` | set your nickname |
71| `me` | show your pubkey + stats |
72| `relays` | which relays are pinning you (or the current thread's author) |
73| `opid <n>` | print a post's opId |
74| `quit` / `q` | exit |
75
76> Posts and comments carry a small proof-of-work (~80ms / ~20ms), so there's a brief `minting pow…` pause before they land. That's normal.
2477
2578## What's in here
2679
2780```
2881src/
82├── terminal/
83│ └── main.js ← THE APP. the Pear terminal (TUI) entry — readline feed/thread UI
2984├── backend/ shared Node/Bare backend (ops, PoW, indexer, reputation, antispam)
3085│ ├── ops.js signed append-only op schema (post, comment, vote, edit, tombstone,
3186│ │ follow, block, profile, board_create, blocklist_publish)
……@@ -36,22 +91,21 @@ src/
3691│ ├── swarm.js hyperswarm + protomux announce channel for peer discovery
3792│ ├── rpc.js JSON-RPC dispatch shared by every transport
3893│ └── server.js optional Node HTTP/WS dev server
39├── terminal/
40│ └── main.js the Pear terminal entry (readline UI)
4194├── bare/
4295│ ├── harness.js Pear/bare-kit shared backend bootstrap
43│ └── ios-entry.js bare-kit-pear iOS entry
96│ └── ios-entry.js bare-kit-pear iOS entry (parked)
4497├── pear/
4598│ └── worker.js Pear desktop worker (parked)
4699└── relay/
47100 └── server.js self-hosted hiverelay with @hyperswarm/dht-relay endpoint
48101
49public/ HTML/CSS/JS for the browser/desktop UI (dev mode)
102landing/ static site for p2pbuilders.com
103public/ parked browser/desktop UI (dev mode) — not the terminal app
50104ios-app/ minimal Xcode project using bare-kit-pear (parked)
51105scripts/
52106 publish.js publish a directory to hiverelay
53107 seed-pear.js ask hiverelay to seed a pear:// key
54 probe-relays.mjs list relays currently pinning a key
108 probe-relays.mjs list relays currently pinning the live key
55109test/ 41 tests covering every layer
56110```
57111
……@@ -78,43 +132,54 @@ git clone https://github.com/bigdestiny2/p2pbuilders.git
78132cd p2pbuilders
79133npm install
80134
81# run the Node dev server (browser at http://localhost:8787)
82npm run dev
83
84# run the terminal app under standalone Bare (no Pear needed)
135# run the terminal app (TUI) under standalone Bare — no Pear needed
85136./node_modules/bare/bin/bare src/terminal/main.js
86137
138# run the optional Node dev server (browser at http://localhost:8787)
139npm run dev
140
87141# run the full test suite (41 tests)
88142npm test
89143```
90144
91145## Stage a new build to Pear
92146
147Staging publishes the current working tree to a `pear://` link that anyone can `pear run`.
148
93149```
94# 1. make sure /tmp/p2pbuilders symlinks to this project (Pear chokes on paths
95# containing spaces inside pear-electron/pre)
150# 1. symlink to a space-free path (Pear chokes on paths with spaces in
151# pear-electron/pre).
96152ln -sfn "$(pwd)" /tmp/p2pbuilders
97
98# 2. stage from the space-free path
99153cd /tmp/p2pbuilders
100pear stage --no-ask dev . # prints pear://0.<n>.<key>
101154
102# 3. run it
103pear run pear://<that-key>
155# 2. generate a fresh link (once per app — reuse it for later builds)
156pear touch # prints pear://<key>
157
158# 3. sync the working tree to that link
159pear stage --no-ask pear://<key> . # prints pear://0.<n>.<key>
160
161# 4. point the unversioned link at this build, so `pear run pear://<key>`
162# serves what you just staged
163pear release pear://<key> .
164
165# 5. run it
166pear run pear://<key>
104167```
105168
106## Seed an app or user to hiverelay
169## Keep it online (seed to hiverelay)
107170
108171```
109node scripts/publish.js # publish ./public as a hyperdrive
110node scripts/seed-pear.js pear://<pear-key>
111node scripts/probe-relays.mjs # see which relays are pinning it
172node scripts/seed-pear.js pear://<key> # ask relays to pin the app (or any user core)
173node scripts/probe-relays.mjs # see which relays are pinning the live key
174node scripts/publish.js # publish ./public as a hyperdrive
112175```
113176
177`seed-pear.js` stays running so your local replica is available while relays catch up — leave it up, or Ctrl+C once `seeded on N relay(s)` prints.
178
114179## Status
115180
116181**Shipping now:**
117- Terminal app via `pear run pear://…`
182- Terminal app (TUI) via `pear run pear://…`
118183- Full backend verified with 41 tests
119184- Auto-seeding to the public hiverelay network
120185
landing/index.html +1 -1
……@@ -304,7 +304,7 @@ which pear
304304
305305 <li>
306306 <p><strong>run the board.</strong></p>
307<pre><code>pear run pear://gopfpwat99tcuaakasfnftrds3j6t7srdmi3qidbhm9xeizt1a5y</code></pre>
307<pre><code>pear run pear://dqz1e6fwyrz1mxj7eqsmcar3hnegrj491t5hnqjm9mda9tz8dzfy</code></pre>
308308 <p>type <code>help</code> at the <code>›</code> prompt. submit a post to say hi.</p>
309309 </li>
310310
public/index.html +1 -1
……@@ -304,7 +304,7 @@ which pear
304304
305305 <li>
306306 <p><strong>run the board.</strong></p>
307<pre><code>pear run pear://gopfpwat99tcuaakasfnftrds3j6t7srdmi3qidbhm9xeizt1a5y</code></pre>
307<pre><code>pear run pear://dqz1e6fwyrz1mxj7eqsmcar3hnegrj491t5hnqjm9mda9tz8dzfy</code></pre>
308308 <p>type <code>help</code> at the <code>›</code> prompt. submit a post to say hi.</p>
309309 </li>
310310
scripts/probe-relays.mjs +1 -1
……@@ -6,7 +6,7 @@ const client = new HiveRelayClient('./.hiverelay-probe')
66await client.start()
77await new Promise(r => setTimeout(r, 4000))
88
9const k = hypercoreId.decode('gopfpwat99tcuaakasfnftrds3j6t7srdmi3qidbhm9xeizt1a5y')
9const k = hypercoreId.decode('dqz1e6fwyrz1mxj7eqsmcar3hnegrj491t5hnqjm9mda9tz8dzfy')
1010const acceptances = await client.seed(k, { replicas: 8, timeout: 25000 })
1111console.log(`\nseeded on ${acceptances.length} relay(s):\n`)
1212for (const a of acceptances) {