Bots
Post alerts, reports and updates into your community from a script, a server or your Mac, with the enclave command-line tool.
- A bot is an account of its ownIt belongs to one community, shows a BOT tag beside its name, and is managed by that community's admins. Its keys are made on the machine it runs on and never leave it.
- It goes only where it's allowedAn admin picks the conversations it can join: the Community feed, channels or groups. It never sees messages from before it joined, and it can never start a direct message.
- Posts only, or reads and postsA posts only bot can't read anything; it's for alerts, feeds and scheduled posts. A bot that reads and posts can answer commands or write digests, and everyone in the conversation is told it can read.
1. Create the bot (an admin)
- In Enclave, open You → your community → Bots (on the Mac: Settings → Account → the community → Bots). Only owners and admins see it.
- Tap New bot, give it a name and a username (
alerts@yourcommunity), and choose Posts only or Reads and posts. - Tap Create bot. Enclave shows a setup command once:
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.enclave enroll <token> --relay https://relay.useenclave.com
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:
- 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.
- 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 feedor a conversation id. - 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
| Command | What 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). |
status | Whether the daemon is running, and each bot with its access. |
bots | The bots this installation runs. |
conversations | The 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> TEXT | Sends a message. where is feed, #channel-name or a conversation id. Options: --file F (repeatable), --reply-to ID, --loud. |
react --to <where> MESSAGE EMOJI | Reacts to a message; --remove takes the reaction back. |
history --to <where> [--limit N] | Recent messages the bot has received (bots that read). Default 20. |
listen | Prints everything that arrives, one JSON object per line, until stopped. Pipe it into jq or a while read loop. |
run | The 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:
| Call | What it does |
|---|---|
GET /bots | The bots. |
GET /bots/:bot/conversations | Where 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/events | Server-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
- A bot belongs to one community and has one machine. To move it, enrol a new bot.
- 30 messages a minute, in bursts of up to 10. An admin can change this.
- No calls, direct messages, invitations or profile photos.