Paircaster Farcaster from your own node, for people and their AI agents

Paircaster

Farcaster from your own Snapchain node, for you and your AI agent. No API keys from anyone.


Farcaster is a decentralised social network: its accounts, casts (posts), likes and follows are signed messages, and every node keeps a copy of them. Paircaster lets you and your AI agent read and post on Farcaster from your own node, with no app or hosted API in between. It has three parts:

What you get

Quickstart

You need:

The easiest way is to let your AI agent install it. Clone the repository and start Claude Code in the clone:

run
git clone https://github.com/cyberchitta/paircaster
cd paircaster
claude

Then ask it: “Install Paircaster here, with the viewer.” It loads Paircaster's skill from the clone, checks what your machine already has, and builds paircaster with the viewer. Snapchain's installer asks questions at the terminal, so the skill has the agent give you steps 2 and 4 below to run yourself, with the answers, and start step 3's download for you.

The same steps by hand follow. Each is explained in Running the node.

1. Install paircaster

run
git clone https://github.com/cyberchitta/paircaster
cd paircaster
cargo install --path crates/cli --locked

2. Install Snapchain, then stop it

run
mkdir -p ~/snapchain && echo SKIP_CRONTAB=true >> ~/snapchain/.env
curl -sSL https://raw.githubusercontent.com/farcasterxyz/snapchain/refs/heads/main/scripts/snapchain-bootstrap.sh | bash

The script asks two questions. Agree to the first, that a read node earns no rewards. Leave the second, an operator FID, blank: the first command made that safe, and upgrades then happen by hand. It installs to ~/snapchain and starts the node, which begins its own snapshot download. That download cannot resume after an interruption (why), so stop it and let paircaster download instead:

run
cd ~/snapchain && ./snapchain.sh down

paircaster node fetch-snapshot refuses to start while the node's container is running, and names this command.

3. Download the snapshot

run
paircaster node fetch-snapshot

The download and unpack took about 12 h 15 min of wall-clock time on the test machine, pauses included, at 8 to 41 MB/s.

4. Start the node

run
cd ~/snapchain && ./snapchain.sh up

This starts the node and then follows its log; Ctrl-C stops following the log and leaves the node running. The node has to catch up from the snapshot's date to now. Check on it from any terminal:

run
paircaster node status

Four hours after starting, the test node was still catching up:

output
Syncing (Snapchain 0.14.3): 47h07m behind at most.
  shard 0: height 48391469, 23h49m behind
  shard 1: height 49002681, 41h55m behind
  shard 2: height 48819789, 47h07m behind
Disk: 3165 GB free of 3996 GB.

5. Read from your node

You are done when paircaster node status says Ready:

output
Ready (Snapchain 0.14.3): every shard within a minute of its newest block.
  shard 0: height 48725626, 2s behind
  shard 1: height 49402047, 1s behind
  shard 2: height 49237300, 1s behind
Disk: 3145 GB free of 3996 GB.

Then read an account from it:

run
paircaster profile dwr
output
dwr  fid 3
  name: Dan Romero
  bio: Interested in technology and other stuff.
  url: https://danromero.org
  twitter: dwr
  following: 79
  followers: at least 10000 (counting stopped; --all-followers counts them all)

Using the client goes on from here, and Giving your AI agent Farcaster hands the same commands to an agent.

Already running a Snapchain node?

If another guide has already given you a synced mainnet node, skip steps 2 to 4: install paircaster (step 1) and point it at that node. On the machine the node runs on, there is nothing to set, because paircaster asks http://localhost:3381, Snapchain's own port, however the node was installed. Elsewhere, reach the node's API through SSH, or name its address with --node on every command, reads and writes alike:

run
paircaster node status --node http://127.0.0.1:3381
output
Ready (Snapchain 0.14.3): every shard within a minute of its newest block.
  shard 0: height 48642234, 1s behind
  shard 1: height 49318266, 0s behind
  shard 2: height 49153538, 0s behind

If nothing answers at that address, it says could not reach node and exits 1. Without --node, reads and writes both go to your own node; some of the guide's writes were sent through Farcaster's public node instead, by naming it with --node, because the test node had not yet synced the new test account, and a node accepts writes only from accounts it has seen (Writing).

What you just did

Your node keeps its own copy of the network's messages: casts, reactions, follows and profile data. Ours reports 914,246,336 messages in 557 GB. paircaster reads from the node at http://localhost:3381 unless you point it elsewhere.

A read node does not decide what goes on the network; validators do. When you post, your node checks the message against what it has and passes it on to the validators, without adding it to its copy (Snapchain's node types). The message is on the network only once it comes back in a read, which is why paircaster reads every write back before it calls it sent.

The protocol in brief

Each idea is explained where the guide first uses it.

The rest of the guide

  1. Running the node
  2. Using the client
  3. Giving your AI agent Farcaster
  4. What you can do with it
  5. Safety
  6. Contributions upstream

Not tried yet

Going further

Next: Running the node


Paircaster is MIT-licensed: github.com/cyberchitta/paircaster.