your-attention
One inbox where all your coding agents ask you questions as cards, and your answers reach them at once.
Package details
Install your-attention from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:your-attention- Package
your-attention- Version
0.1.1- Published
- Nov 14, 2026
- Downloads
- 571/mo · 571/wk
- Author
- elecnix
- License
- MIT
- Types
- extension
- Size
- 2.1 MB
- Dependencies
- 8 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./src/integrations/pi/extension.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Your Attention
One inbox for the questions all your coding agents ask you. An agent posts a card and keeps working. You answer in one place, and the answer goes back to that session within a second.

Why it helps
With 100 sessions open, a question waits in whichever terminal asked it, and you find it late or never. Your Attention puts every question on one queue, sorted by priority, one card at a time. Each card shows whether its agent is listening, busy or offline, and where your answer is: stored, delivered, or read by the model. An answer to an offline agent waits until its session resumes.
Claude Code and pi post cards through tools, and herdr turns any blocked agent into a card. A card can draw Mermaid diagrams, such as a flowchart of the choice on the card. A click copies a command or an approval sentence that the agent wrote as code. A diagram that doesn't parse goes back to the agent with mermaid's error. The laptop inbox refuses it when the agent posts the card. On a hosted inbox, the agent's client checks it first, and the page sends back any card that skipped that check. To request a key, the agent places the secret widget, key = widget secret {"name": "OLLAMA_API_KEY"}, beside the card's other questions. Your browser encrypts the key for that session, and the model sees the path of a private file instead of the value. Each new client pairs with a code you confirm.
PRINCIPLES.md states the design and SPEC.md the protocol.
Set it up
These steps take a machine with only a coding harness on it to a full setup. A coding agent can run them for you. Steps marked (optional) add a feature, and you can skip them.
- Check what you need.
- Choose a home for the inbox.
- Install the command.
- Start or open your inbox.
- Connect your agents.
- Open the inbox on your phone (optional).
1. Check what you need
- Node 22.18 or later. The
your-attentioncommand runs on it. Check withnode --version. - git, to get the code.
- A coding harness, such as Claude Code, pi, or any agent that herdr runs. Your agents post cards from it.
- A browser. The inbox is a web page.
2. Choose a home for the inbox
The inbox is one server that holds your cards. Pick one place for it:
| Where | What you get | Choose it when |
|---|---|---|
| On your laptop | Unlimited and free, without an account. Agents on the same machine find it on their own. It stops when the laptop sleeps. | You work from one machine. This is the default. |
| Your own Cloudflare inbox | Always on, reachable from any machine and your phone. You deploy it to your own Cloudflare account. | You run agents on several machines, and want to own the deployment. See Run your own cloud inbox. |
| A hosted inbox | Always on, with no deployment. Someone who runs the service gives you an invite code. Each inbox has limits. | Someone already runs the service for you. |
You can change your mind later. Each machine pairs with one inbox at a time.
3. Install the command
Agents talk to the inbox through the your-attention command, so you install it wherever an agent runs.
git clone https://github.com/elecnix/your-attention ~/Source/your-attention
cd ~/Source/your-attention && npm ci && npm link
your-attention --help
npm link puts your-attention on your path. To update later, run git pull && npm ci in the same folder.
The package is also on npm, and npm install -g your-attention works. The published tarball contains the same sources compiled into dist/, because Node refuses to strip TypeScript types in anything under node_modules. A checkout runs the sources directly, with no build step.
4. Start or open your inbox
On your laptop:
your-attention start # runs the inbox in the background, on port 4815
your-attention open # opens the inbox page, signed in
your-attention open --link # prints a one-time sign-in link, for a private window or another browser
The inbox keeps its files in ~/.your-attention. Set YOUR_ATTENTION_HOME to move them.
The PIN is optional. A laptop inbox used by one person works fine without it. In a terminal, start and serve offer to set it while the inbox has none: type y and the PIN twice, s to skip until the next start, or n to stop asking. A service started at login has no terminal, so it never asks.
To start the inbox when you log in (optional), write a launchd or systemd unit. Without --write, the command only prints the unit.
your-attention service serve --write
On a hosted inbox:
- Open the address you got with your invite code. Enter the code and a 4-digit PIN, then select Create my inbox. Leave the PIN empty to skip it for now, or tick Never ask me for a PIN.
- The page opens your inbox, signed in. Bookmark that address, and keep it private. You type the PIN in each new tab.
- Pair each machine that runs agents, as step 5 shows.
The address alone does not sign a browser in. What opens a cloud inbox is an owner token kept in the browser's cookie, and the link that creates that cookie works once, within five minutes. Keep that browser signed in. When no browser holds the cookie, the page lists sign-in steps that each need a browser already signed in, and a machine paired as an agent cannot make a sign-in code.
Keep a second way in. From a signed-in page, tap the phone button and use the code on your phone. Or pair a computer as owner while a page has you signed in. That saves an owner token in owner.json, and your-attention open then signs that computer's browser in from a terminal.
With neither, make a new inbox. The cards in the old one remain in a place nobody can open.
On your own Cloudflare inbox: deploy it first, as Run your own cloud inbox shows. Then pair each machine, as step 5 shows.
5. Connect your agents
Do the parts for the harnesses you use.
Claude Code
Add the channel server once. It gives every session the card tools, and brings your answers into the session as they arrive.
claude mcp add -s user your-attention -- your-attention claude-channel
Claude Code loads a channel only from a launch flag. Start each session with it, and confirm the development-channel warning that Claude Code shows:
claude --dangerously-load-development-channels=server:your-attention
Keep the = form: the flag takes a list, and would read a prompt after it as a second server.
A shell function that adds the flag (optional). It adds the flag to interactive starts, and leaves subcommands and --print alone. Put it in ~/.bashrc or ~/.zshrc:
claude() {
case "${1:-}" in
-p|--print|mcp|config|doctor|update|install|plugin|setup-token|migrate-installer|--version|-v|--help|-h) command claude "$@" ;;
*) command claude --dangerously-load-development-channels=server:your-attention "$@" ;;
esac
}
Questions from AskUserQuestion as cards (optional). Add these hooks to ~/.claude/settings.json, next to any hooks you already have. Answer in either place. Your terminal answer closes the card, and a card answer goes to the session. In herdr, the terminal dialog closes too. When you cancel the dialog, or the session moves on without an answer, ask-cancel closes the card.
{ "hooks": {
"PreToolUse": [{ "matcher": "AskUserQuestion", "hooks": [{ "type": "command", "command": "your-attention claude-hook ask-pre", "timeout": 10 }] }],
"PostToolUse": [{ "matcher": "AskUserQuestion", "hooks": [{ "type": "command", "command": "your-attention claude-hook ask-post", "timeout": 10 }] }],
"PostToolUseFailure": [{ "matcher": "AskUserQuestion", "hooks": [{ "type": "command", "command": "your-attention claude-hook ask-cancel", "timeout": 10 }] }],
"PermissionDenied": [{ "matcher": "AskUserQuestion", "hooks": [{ "type": "command", "command": "your-attention claude-hook ask-cancel", "timeout": 10 }] }],
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "your-attention claude-hook ask-cancel", "timeout": 10 }] }],
"SessionEnd": [{ "hooks": [{ "type": "command", "command": "your-attention claude-hook ask-cancel", "timeout": 10 }] }]
} }
A card from a session that stops without one (optional). With YOUR_ATTENTION_REQUIRE_CARD=1 in the session's environment, this hook gives the model one request to post a card when it stops with none open, and names the card_post call to make. Claude Code marks the stop that request causes with stop_hook_active, so the hook does nothing then. A session gets three asks at most without a card, counted in ~/.your-attention/claude/<session>.card-asks, and the count resets when the person types a prompt, when an answer arrives through the channel, and when a card of the session's own is open. Leave the variable out for a background agent that should run without a card.
{ "hooks": {
"Stop": [{ "hooks": [{ "type": "command", "command": "your-attention claude-hook turn-end", "timeout": 10 }] }]
} }
pi
pi install git:github.com/elecnix/your-attention
A session's cards can take default tags, such as the repository and the topic. Start pi through the launcher, which sets YOUR_ATTENTION_TAGS and passes the rest of the command to pi unchanged:
your-attention pi --tags repo=acme/api,topic=billing -- [pi args]
Every card the session posts inherits them, under the tags on the card itself. The agent reads or changes them with the card_tags tool, so a compaction loses nothing.
With YOUR_ATTENTION_REQUIRE_CARD=1 in its environment, a session is asked for a card when a run settles and none of its cards is open. The extension sends the request as a user message. A session gets three asks at most without a card, and the count resets when a run starts for any reason other than the request itself, and when a card of the session's own is open. Leave the variable out for a background agent that should run without a card.
OpenCode
Write the plugin file once. It gives every session the card tools, and brings each answer into its session as a new message. A message that arrives while the agent works waits for the turn to end.
your-attention opencode-plugin --write
The file goes in ~/.config/opencode/plugin/, or under $XDG_CONFIG_HOME when you set it, and OpenCode loads it at its next start. It loads the plugin from this checkout, so keep the checkout where it is. Run the command without --write to see the file first.
herdr: a card for each blocked agent (optional)
The sidecar posts a card when any herdr agent waits for you, whatever its harness. When the agent shows numbered choices, such as a permission prompt, you pick one on the card, and the sidecar presses it in that agent's pane. It first checks that the same prompt still waits there.
your-attention herdr-blocked &
Pair a machine with a cloud inbox or another computer
A machine whose inbox runs elsewhere pairs once:
- Run
your-attention pair <inbox address>on that machine. It prints a six-digit code. - A card with a code appears in your inbox. Approve it only when the code matches.
- The machine saves its token in
~/.your-attention/client.json, and its agents use that inbox from then on.
For a hosted inbox, the address is the one you bookmarked, such as https://app.example.workers.dev/i/<inbox id>. On your network, your-attention discover lists the laptop inboxes it finds, with their addresses.
your-attention discover
your-attention pair http://<host>:4815
To pair a front-end that answers cards instead of an agent, add --role owner. The machine saves that token in ~/.your-attention/owner.json, beside its agent pairing, so its agents keep their own token. A machine paired as owner signs a browser in with your-attention open, and opens your-attention tui. It also runs the pin commands against a hosted inbox, such as your-attention pin reset for a forgotten PIN. Its token works without the PIN, so pair a machine as owner only while you sit at it.
Check your cards before you see them (optional)
Triage reads each new card and sends back one that lacks a goal, options, evidence or a recommendation. It uses your own OpenRouter account, or runs a coding harness in print mode:
your-attention triage login # once, for OpenRouter
your-attention service triage --write # a launchd or systemd unit
your-attention triage --judge-cmd "claude -p" # or a harness instead
Reach a laptop inbox from containers, CI or other machines (optional)
Agents that can't reach your laptop connect through a bridge, an SSH tunnel or a relay:
your-attention bridge --upstream https://inbox.example
your-attention offer ssh build-box
YOUR_ATTENTION_RELAY_KEY=... your-attention serve --relay https://relay.example
6. Open the inbox on your phone (optional)
Select the phone button, left of the GitHub mark, and scan the QR code with the phone camera. The phone opens the inbox, signed in with its own token. The code works once, for five minutes, so keep it to yourself. The devices button, left of the phone button, lists every key to the inbox and signs one out, so a phone you lost ends without touching the others.
A cloud inbox works from anywhere, and a laptop inbox from a phone on the same network. The laptop inbox listens on every network interface, IPv4 and IPv6, by default. Its QR code opens the laptop's .local name, such as http://my-laptop.local:4815, and the dialog also gives an IP address, for a phone that cannot open .local names.
If the phone cannot open the inbox, check for a VPN on the laptop. A VPN that sends your home network's IPv4 traffic into its tunnel breaks every connection from the phone to the laptop over IPv4. The inbox still answers over IPv6, which most home networks and phones use. Otherwise, exclude your home network from the VPN, or use a cloud inbox.
Day to day
Answer cards on the inbox page. Each answer reaches its agent within a second, or when its session resumes.
An agent's recommendation shows inside the option it recommends, under a Recommended tag, so you read the pick once. The agent marks that option with recommended: true, or starts its recommendation with the option's label, as in "Go ahead. The key is read-only." A recommendation that matches no option keeps its own box above the options.
your-attention status # the inbox on this machine, its files, and this machine's pairings
your-attention clear # clears the cards you answered or that closed; search finds them for 30 days
your-attention reset --yes # removes every card, answer and file; tokens and templates stay
your-attention login-url # prints a sign-in link that works once, within 5 minutes
your-attention stop # stops the inbox, or its launchd or systemd service
A card can link a file on the agent's computer with a file: address, such as file:///Users/me/report.html. On the laptop inbox, a click opens the file in a new tab, when the card came from the same computer. The inbox serves only files that the card's text or recommendation contains, to the owner only, and a served HTML file can't run scripts. A cloud inbox, and a card from another computer, show the path as code.
The inbox deletes a cleared card 30 days after you clear it. It also deletes a card nobody answered 30 days after its agent last changed it, even a card that still waits for you. Each deletion takes the answer and the files with the card. An answered card you haven't cleared stays.
clear, reset and stop act on the inbox this machine runs. login-url and open sign in to that inbox, or, on a machine that runs none, to the inbox it paired with as owner, such as a cloud inbox: your-attention pair <url> --role owner.
your-attention status says what runs here before you start or stop anything: whether the inbox on this machine answers, its address, pid, inbox id, PIN and usage setting, the home directory with its database, token files, service and log, the inboxes this machine paired with and whether each answers, and YOUR_ATTENTION_URL or YOUR_ATTENTION_TOKEN when they are set, since they win over the files. It prints the names of the token files and of those two variables, never their contents, so a secret stays out of the scrollback.
Answer in a terminal
your-attention tui shows the inbox full screen in a terminal, beside your agents in herdr, tmux or any terminal tab. The card list is on the left, in the page's sections and order. The open card is on the right, with its text, the recommendation, its files and its form. The recommended option shows the same tag and recommendation as on the page. Your answer goes to the agent with the same values the page would send.
your-attention tui # the inbox on this machine, as its owner
your-attention tui --mono # no colors
your-attention tui --ascii # ASCII symbols and borders, for a terminal without Unicode
Like the other commands, the client reads YOUR_ATTENTION_URL and YOUR_ATTENTION_TOKEN first. Without them, it uses a pairing made with your-attention pair <url> --role owner, then the inbox this machine runs, with its owner-token file. For an inbox with a PIN, the client prompts for the PIN when the token needs it, as a sign-in link's token does. The owner-token file and an owner pairing open the inbox without it.
| Key | In the list | In the card |
|---|---|---|
Up, Down, j, k |
open the card above or below | move between fields, or inside a choice |
| Enter, Right, Tab | move into the card | pick a choice, press a button |
| Space | move into the card | pick a choice or tick a box |
| Tab, Shift+Tab | move into the card | the next or previous field, button or link |
| Esc | back to the list | |
| PgUp, PgDn | ten cards up or down | scroll the card |
| Ctrl+Enter, Ctrl+S | send the answer | send the answer |
| Ctrl+N | skip for now | skip for now |
d |
dismiss without telling the agent | dismiss without telling the agent |
g |
group by nothing, priority, agent or a tag | |
p |
pin the open card's value of the tag you group by | |
C |
clear the answered and closed cards | |
o |
open the card in the browser | |
?, q, Ctrl+C |
help, quit, quit | Ctrl+C quits |
On a card that is still loading, Enter waits and shows "Loading the card…". The client moves into the card once it loads, unless you pick another card first.
Ctrl+Enter needs a terminal that reports it, such as iTerm2, Ghostty, cmux, kitty or WezTerm, and tmux with extended-keys on. Ctrl+S works in every terminal. In a text field, letters type text, and the Ctrl keys still work.
A click opens a card or presses a button. In a form, a click picks a choice, ticks a box or puts the cursor in a text field. The wheel scrolls the pane under the pointer. A click on a herdr session link opens that session in herdr, as on the page. A click on any other link opens it in the browser.
Color is never the only sign. Each state has a symbol of its own: ● waits for you and ◉ is the card on screen. In the Outbox and Sent sections, ○ means the inbox stored your answer, ◑ that the agent got it, ✓ that the model read it, and × that the card closed. Each waiting card shows its priority level in words, such as now or soon, beside the level's color. The card on screen has a marker, ▶, and inverse video while the list has the keys. Set NO_COLOR=1 or pass --mono for no colors at all, and pass --ascii, or set YOUR_ATTENTION_TUI_ASCII=1, for symbols such as *, @ and >. YOUR_ATTENTION_TUI_COLOR forces a color depth: mono, 16, 256 or truecolor.
The client works in iTerm2, cmux, Apple Terminal, tmux and herdr panes, and Linux terminals. From 60 columns it shows the list beside the card, and below that one pane at a time. A card part that a terminal can't draw, such as a chart or an HTML card, shows a line with the card's address on the page. On a laptop, the first frame of an inbox with 200 cards appears about 130 ms after the command starts. YOUR_ATTENTION_TUI_TRACE=<file> writes that time and the time of each frame to the file.
Watch the answers from a script
your-attention watch keeps one agent stream open and prints each event it receives as one line of JSON, so a script reads the answers without a front-end. The fields are the ones SPEC.md defines for the agent stream, with receivedAt added: the time this process read the event. The command adds receivedAt and leaves the other fields as the inbox wrote them. Output is line-delimited JSON, so jq reads it as it arrives. A beat, the frame that shows the stream answering, never becomes a line, so a quiet inbox writes only the answers that arrive.
your-attention watch --agent cli:deploy | jq -r 'select(.type == "answer") | .answer.values.choice'
your-attention watch --no-card # the answer and its receipt, without the card
your-attention watch --select id,title,status # only these fields of the card
your-attention watch --agent cli:deploy --ack # marks each answer read, as the answering session does
your-attention ack <card> # marks one answer read, when the script took it another way
Without --ack a watcher leaves the answer unread, and the card waits in the page's outbox until something says it read it. your-attention ack <card> is that word, for a script that reads answers another way, and for one that keeps a card to read later.
A watcher receives the answers to cards that this machine's token posted as the agent it names, so it pairs with your-attention post --agent cli:deploy: a script that posts cards and watches them gets each answer as it arrives. Cards that other sessions post stay on the page and in your-attention tui. The watcher reconnects by itself with one instance id, so a restarted inbox or a dropped socket keeps every answer queued and delivers each one once, and a hello line marks each connection or reconnection.
The inbox reports an answer as read only when something acknowledges it, so --ack is off by default. A watcher that acknowledged every answer would mark read what the session waiting for it has not seen.
--role owner follows every card in the inbox, as the page does, so one process can wake an orchestrator on any card or forward each new card to a notifier. It uses the owner token of the inbox on this machine, or the pairing from your-attention pair <url> --role owner, and works with the laptop inbox and the hosted one. Each change to a card prints one change line with the whole card, its answer and its state, such as open, answered or closed. --agent keeps one agent's cards, and --type keeps the event types it lists, with either role. --ack stays with the agent role: only the token that posted a card may mark its answer read.
your-attention watch --role owner | jq -c 'select(.type == "change" and .state == "answered")'
your-attention watch --role owner --agent claude:deploy --select id,title
your-attention watch --role owner --type change --no-card # the card id, state and answer only
An owner watcher sees every card and every answer. Its token is an owner token, in a file with mode 0600. Pair the machine as owner only when it is yours, and sign it out from the devices button on the page to end its access.
Send the answers to a webhook
An agent that only runs when something calls it, such as a hosted bot or a CI job, can get its answers at a webhook instead of running watch:
your-attention subscribe --agent cli:deploy --webhook https://example.com/hooks/abc --header-file ~/.config/deploy-hook-headers
your-attention unsubscribe --agent cli:deploy
The inbox shows the request to you as a card with the address and the header names. The inbox calls the webhook only after you approve it there, and changing your answer to Deny later stops it. Once you approve, the inbox POSTs each answer to a card of that agent, from the same token, in the format of an agent stream event. It tries again with a growing wait until the webhook answers 2xx, and that answer marks it read. Write a secret header as a NAME: VALUE line in a file of mode 0600, and pass that file with --header-file. With --header-file - the headers come from stdin. Keep --header 'NAME: VALUE' for the rest, since ps shows command-line arguments to every user of the machine. An address with a secret in its path goes in a file too, with --webhook-file. subscribe prints the secret that signs each call, once. your-attention status lists the webhooks. SPEC.md, "Answer webhooks", has the details.
Protect the inbox with a PIN
An answer on a card goes straight into a coding agent's session. Someone who gets the inbox address or a sign-in link, from a bookmark, the browser history or a pasted message, could open the page and answer as you. A 4-digit PIN stops that: the address or link signs a browser in, and each new tab must also type the PIN before it shows a card or takes an answer.
The PIN is optional. Set one when other machines on your network can open the inbox, and when you would mind a sign-in link kept in a browser history.
your-attention pin status # whether the inbox has a PIN, and any lockout
your-attention pin set # sets a PIN, typed twice and hidden
your-attention pin reset # replaces a forgotten PIN without the old one, and lifts a lockout
your-attention pin clear # removes the PIN
The PIN commands act on the inbox this machine runs, with its owner-token file, or on the inbox this machine paired with as owner. On the page, the buttons below the card list change the PIN, which needs the current one, and lock the tab.
- Closing the tab locks the inbox again. A tab also locks after 12 hours without a request, and every tab locks when the PIN changes.
- After 5 wrong PINs, the page waits 1 minute before the next try. Each later lockout doubles the wait, up to a day.
your-attention pin resetlifts the lockout from the computer that runs the inbox. - The PIN never leaves your browser or terminal. The page and the CLI derive a key from it with a slow salted hash, and the inbox stores a hash of that key. Nobody can read the PIN back, including you.
- Without a PIN, the page offers to set one each time it opens. Skip asks again next time, and Never ask again stops the offer for that inbox.
The PIN guards the page and every sign-in link. Agents and their tokens, and the owner-token file on the laptop, work without it. A PIN does not protect the inbox from someone who can read files on the laptop, or from a person who watches you type it. A 4-digit PIN has 10,000 values, so the wait after wrong tries is what stops a guesser. After about 60 tries in the first day and a half, a guesser gets 5 tries a day.
Usage counts
A laptop inbox sends nothing unless you turn usage counts on. The first start in a terminal asks once, and the inbox page offers them until you pick. When on, the inbox sends the maintainers one anonymous report a day. It counts cards posted and answered, pairing requests, page opens, and how many agents, agent processes and tokens connected, with a random install id. It never sends card text, answers, agent names, paths, host names, addresses or anything else that says who you are.
your-attention telemetry status # on or off, where reports go, and the install id
your-attention telemetry on # turns anonymous reports on
your-attention telemetry show # prints the next report
your-attention telemetry off # turns reports off and deletes the days not yet sent
your-attention telemetry reset-id # picks a new random install id
DO_NOT_TRACK=1 or YOUR_ATTENTION_TELEMETRY=off keeps reports off whatever the setting says, and YOUR_ATTENTION_TELEMETRY_DEBUG=1 prints each report to stderr in place of sending it.
The hosted service always sends the same counts, with an id made from the invite code that created the inbox, and has no off switch. Its landing page and the inbox page say so. To keep the counts to yourself, run the inbox on your laptop. SPEC.md lists every field.
Run your own cloud inbox (optional)
The Cloudflare build runs the same inbox on Workers. Each inbox is one Durable Object that sleeps when idle. Choose a mode when you deploy:
- single serves one inbox, yours, at the root address.
- hosted serves many inboxes. Each person creates one with an invite code you give out.
You need a Cloudflare account with R2 turned on once in the dashboard, a workers.dev subdomain, Terraform, and the GitHub CLI.
Create the KV namespace, the R2 bucket, its 30-day expiry rule, and a deploy token that can change Workers only. The state file contains that token, so it stays outside the repo:
export CLOUDFLARE_API_TOKEN=... # an account token that can create tokens, KV and R2 terraform -chdir=cloudflare init -backend-config="path=$HOME/.your-attention/cloudflare.tfstate" terraform -chdir=cloudflare apply -var account_id=<account id>Put the outputs in the repo's
cloudflareenvironment:terraform -chdir=cloudflare output -raw deploy_token | gh secret set CLOUDFLARE_API_TOKEN --env cloudflare gh variable set KV_NAMESPACE_ID --env cloudflare --body "$(terraform -chdir=cloudflare output -raw kv_namespace_id)" gh secret set CLOUDFLARE_ACCOUNT_ID --env cloudflare --body "<account id>"Add the secret for your mode:
- Single mode needs
OWNER_TOKEN, your owner token. It is 12 hex digits, a dot, and 64 hex digits:echo "$(openssl rand -hex 6).$(openssl rand -hex 32)" | gh secret set OWNER_TOKEN --env cloudflare. Keep a copy: you sign in with it. - Hosted mode needs
INBOX_ID_SECRET, which signs inbox addresses:openssl rand -hex 32 | gh secret set INBOX_ID_SECRET --env cloudflare. Changing it later makes every inbox address invalid.
- Single mode needs
Run the
deploy-cloudflareworkflow from the Actions tab, and pick the mode. The Worker is namedapp, so it answers athttps://app.<subdomain>.workers.dev.The same run deploys the telemetry Worker first, which takes laptop inboxes' anonymous daily counts. It uses the same credentials as the inbox and answers at
https://telemetry.<subdomain>.workers.dev. Deploy both with:gh workflow run deploy-cloudflare -f mode=hostedIn single mode, open
https://app.<subdomain>.workers.dev/#token=<owner token>. In hosted mode, add an invite code. Codes need 20 characters or more, and the last number is how many inboxes the code creates:npx wrangler kv key put invite:$(openssl rand -hex 16) 5 --binding INVITES --remoteThat command doesn't print the code. Put it in a variable first if you want to give it out.
In hosted mode, each inbox writes its daily usage counts to the your_attention_usage Analytics Engine dataset in your account, with an id made from its invite code. your-attention telemetry report --invites <file> lists usage per invite and flags an invite with many clients in one inbox. Each line of the file is a code and a label. It needs CLOUDFLARE_ACCOUNT_ID and a CLOUDFLARE_API_TOKEN with Account Analytics Read.
Limits of a cloud inbox
The Cloudflare build sets these in wrangler.jsonc, so a free account stays within its quotas:
- 100 MB of uploaded files over the inbox's life. Each file counts as at least 64 KB, and the count doesn't go down when a file is deleted.
- 20 MB in the inbox's database. A full inbox takes only deletes, answers and closes until you make room. Past 16 MB, the inbox deletes cleared and unanswered cards before their 30 days, oldest first.
- 2,000 file downloads a day for each client.
- 300 requests a minute for each signed-in client address, per inbox, and 100 a minute for each address without a token.
- R2 deletes each file 30 days after its upload. The card stays.
- Pages and agents get their events over WebSockets, so an idle inbox sleeps. The event stream and long-poll routes answer 410.
A laptop inbox has none of these limits.