Enclave

Bots

Post alerts, reports and updates into your community from a script, a server or your Mac, with the enclave command-line tool.

1. Create the bot (an admin)

  1. In Enclave, open You → your community → Bots (on the Mac: Settings → Account → the community → Bots). Only owners and admins see it.
  2. Tap New bot, give it a name and a username (alerts@yourcommunity), and choose Posts only or Reads and posts.
  3. Tap Create bot. Enclave shows a setup command once:
    enclave enroll <token> --relay https://relay.useenclave.com
    Copy it to the machine the bot will run on. It works once, for 24 hours. If it expires or gets lost, open the bot (it shows Pending) and tap New enrollment command.

2. Install the tool and enrol

The Enclave team sends you the install command. It looks like curl -fsSL …/install.sh | sh and works on macOS (Apple silicon and Intel) and Linux (x86-64 and arm64). It installs to /usr/local/bin when it can, otherwise ~/.local/bin.

Then run the setup command from step 1:

enclave enroll <token> --relay https://relay.useenclave.com
enclave status

status lists the bot and its access. In the app, the bot now shows Active.

3. Add the bot to a conversation

Bots aren't added from Add people, and they don't appear there. Instead:

  1. An admin opens the bot (Bots → the bot) and, under Can join, turns on each conversation it may join: the Community feed, a channel or a group.
  2. The bot asks to join. A running bot (enclave run) checks every 30 seconds and asks by itself. You can also ask once by hand: enclave join "#channel-name", enclave join feed or a conversation id.
  3. The next time a member's Enclave is open, it adds the bot. That's the same way people join channels. The bot's keys come from its own machine, so only members' devices can let it in.

Check with enclave conversations. Turning a conversation off under Can join takes the bot out of it. Revoke stops the bot everywhere at once.

4. Post

enclave send --to feed "Hello from our bot 👋"
enclave send --to "#deploys" "v1.4 is live" --file notes.pdf
enclave send --to "#alerts" "Disk at 92% on db-1" --loud

Bots post quietly by default: the message arrives, but nobody's phone buzzes. Add --loud to alert people as a person's message would. In the feed, a bot's message is a post.

Commands

CommandWhat it does
enroll <token> [--name N]Sets up a bot on this machine from the admin's one-time command. --name is what this machine calls it (default: from its username).
statusWhether the daemon is running, and each bot with its access.
botsThe bots this installation runs.
conversationsThe conversations the bot is in, with their ids.
join <where>Asks to join a conversation the bot is allowed into: feed, #channel-name or a conversation id. If it isn't allowed, it lists where it may go. A running bot does this by itself.
send --to <where> TEXTSends a message. where is feed, #channel-name or a conversation id. Options: --file F (repeatable), --reply-to ID, --loud.
react --to <where> MESSAGE EMOJIReacts to a message; --remove takes the reaction back.
history --to <where> [--limit N]Recent messages the bot has received (bots that read). Default 20.
listenPrints everything that arrives, one JSON object per line, until stopped. Pipe it into jq or a while read loop.
runThe daemon: keeps every bot connected, joins newly allowed conversations, and serves a local API. --only NAME, --listen 127.0.0.1:8787, --auto-update.
add skill [<claude home>]Adds the Claude skill for this tool, so Claude Code can post, read and join for you.
update [--check] [--yes]Installs the newest release. It's signed and checked before it replaces this one.
remove <name>Forgets a bot on this machine. To stop the bot itself, an admin revokes it in the app.

Every command takes --bot NAME when one installation runs several bots, and --state DIR (or $ENCLAVE_STATE) to choose where bots are kept. The default is ~/Library/Application Support/Enclave CLI on macOS, your data folder on Linux, or /var/lib/enclave as root.

Keep it running

For a bot that reacts or joins new conversations on its own, run the daemon all the time:

enclave run --auto-update

While it runs, the other commands go through it. Its local API is on the Unix socket enclave.sock in the state folder, and with --listen also over TCP, using the bearer token in api.token:

CallWhat it does
GET /botsThe bots.
GET /bots/:bot/conversationsWhere a bot is.
GET /bots/:bot/messages?to=&limit=Recent messages.
POST /bots/:bot/send{to, text, loud?, reply_to?, files?: [{name, mime, data}]}, file data in base64.
POST /bots/:bot/react{to, message, emoji, remove?}
POST /bots/:bot/join{conversation}
GET /events, GET /bots/:bot/eventsServer-Sent Events, resumable with Last-Event-ID.

Service files are included for Linux (systemd: enclave.service for all bots, enclave@.service for one bot per process) and macOS (launchd).

Use it with Claude

Claude Code can post and read for you through the bot. Add the Enclave skill on the machine the bot runs on:

enclave add skill

It goes in ~/.claude/skills/enclave/ (or $CLAUDE_CONFIG_DIR). If Claude Code keeps its settings elsewhere, name that folder: enclave add skill ~/.claude-work. Run it again after enclave update to get the skill for the new version.

Then ask, for example, “post today's sales summary to #cafe-sales-numbers”. The skill tells Claude which commands to use, to post quietly unless you say otherwise, and never to touch the bot's keys. Read the skill.

Limits