From 2294f48dbace69d8e68117d906407f2f2846140f Mon Sep 17 00:00:00 2001 From: Ani -- Annie Tunturi Date: Mon, 23 Mar 2026 23:03:56 -0400 Subject: [PATCH] Add lettabot CLI tools reference to system memory --- system/lettabot_cli_tools.md | 230 +++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 system/lettabot_cli_tools.md diff --git a/system/lettabot_cli_tools.md b/system/lettabot_cli_tools.md new file mode 100644 index 0000000..12d8ad4 --- /dev/null +++ b/system/lettabot_cli_tools.md @@ -0,0 +1,230 @@ +--- +description: LettaBot CLI tools reference - commands available via Bash when in Matrix/lettabot context +limit: 2000 +--- +--- +description: LettaBot CLI tools for messaging, reactions, and channel management. Use via Bash when in Matrix/lettabot context. +limit: 3000 +--- + +# LettaBot CLI Tools Reference + +When running in Matrix via lettabot, these CLI tools are available through Bash. They allow sending messages, files, reactions, and managing channels. + +## Available Commands + +| Command | Purpose | Key Options | +|---------|---------|-------------| +| `lettabot` | Main bot management | onboard, server, channels, skills, todo | +| `lettabot-message` | Send messages and files | send --text, --file, --channel, --chat | +| `lettabot-react` | Add emoji reactions | add --emoji, --channel, --chat, --message | +| `lettabot-channels` | List channel IDs | list --channel | +| `lettabot-history` | Fetch message history | fetch --limit, --channel, --chat | + +--- + +## 1. lettabot-message + +Send text messages and files to any configured channel. + +### Send Text +```bash +lettabot-message send --text "Hello from Ani!" +``` + +### Send File +```bash +lettabot-message send --file /path/to/file.pdf --text "Here's the file" +``` + +### Send to Specific Channel +```bash +# Matrix +lettabot-message send --file video.mp4 --text "Video!" --channel matrix --chat "!room:wiuf.net" + +# Telegram +lettabot-message send --text "Hello" --channel telegram --chat "123456789" + +# Discord +lettabot-message send --text "Hello" --channel discord --chat "123456789" + +# Slack +lettabot-message send --text "Hello" --channel slack --chat "C123456" +``` + +### Image vs File +```bash +# Send as image (displays inline) +lettabot-message send --file photo.jpg --image --channel telegram + +# Send as document/file +lettabot-message send --file photo.jpg --channel telegram +``` + +### Key Options +- `--text, -t ` - Message text (or caption with --file) +- `--file, -f ` - File path to send +- `--image` - Treat file as image (inline display) +- `--channel, -c ` - Channel: telegram, slack, discord, whatsapp, matrix +- `--chat, --to ` - Chat/room ID (uses last messaged if omitted) + +--- + +## 2. lettabot-react + +Add emoji reactions to messages. + +### React to Last Message +```bash +lettabot-react add --emoji "👍" +``` + +### React to Specific Message +```bash +lettabot-react add --emoji "👀" --channel discord --chat 123 --message 456 +``` + +### Emoji Formats +```bash +# Unicode +lettabot-react add --emoji "❤️" + +# Slack/Discord alias +lettabot-react add --emoji ":eyes:" +lettabot-react add --emoji ":heart:" +``` + +### Key Options +- `--emoji, -e ` - Emoji (unicode or :alias:) +- `--channel, -c ` - Channel platform +- `--chat, --to ` - Chat/room ID +- `--message, -m ` - Message ID to react to + +--- + +## 3. lettabot-channels + +List available channels and their IDs. + +```bash +# List all configured channels +lettabot-channels list + +# List Discord channels only +lettabot-channels list --channel discord + +# List Slack channels only +lettabot-channels list --channel slack +``` + +**Note:** Telegram, WhatsApp, and Signal do not support channel listing. + +--- + +## 4. lettabot-history + +Fetch recent message history from Discord or Slack. + +```bash +# Fetch last 50 messages from current chat +lettabot-history fetch --limit 50 + +# Fetch from specific Discord channel +lettabot-history fetch --channel discord --chat 123456789 --limit 50 + +# Fetch older messages (pagination) +lettabot-history fetch --before 987654321 --limit 50 +``` + +### Key Options +- `--limit, -l ` - Max messages to fetch (default: 50) +- `--channel, -c ` - Channel: discord, slack +- `--chat, --to ` - Chat/room ID +- `--before, -b ` - Fetch messages before this ID + +--- + +## 5. lettabot (Main Command) + +Manage the bot itself. + +### Todo Management +```bash +lettabot todo list +lettabot todo add "Do something important" +lettabot todo complete +lettabot todo remove +lettabot todo snooze --until "tomorrow 9am" +``` + +### Channel Management +```bash +lettabot channels list +lettabot channels add telegram +lettabot channels remove discord +``` + +### Skills Management +```bash +lettabot skills status +lettabot skills +``` + +### Model Selection +```bash +lettabot model show +lettabot model set "anthropic/claude-sonnet-4-5-20250929" +``` + +--- + +## Common Patterns + +### Send File to Current Matrix Room +```bash +lettabot-message send --file /tmp/output.pdf --text "Here's the report" +``` + +### Quick Acknowledgment Reaction +```bash +lettabot-react add --emoji "✅" +``` + +### Send Image with Caption +```bash +lettabot-message send --file screenshot.png --image --text "Check this out!" +``` + +### Send to Different Platform +```bash +lettabot-message send --text "Update" --channel telegram --chat "123456789" +``` + +--- + +## Environment Variables + +| Variable | Purpose | +|----------|---------| +| `LETTA_API_KEY` | Letta Platform API key | +| `TELEGRAM_BOT_TOKEN` | Telegram BotFather token | +| `DISCORD_BOT_TOKEN` | Discord bot token | +| `SLACK_BOT_TOKEN` | Slack bot token (xoxb-...) | +| `SLACK_APP_TOKEN` | Slack app token (xapp-...) | +| `SIGNAL_PHONE_NUMBER` | Signal phone number | +| `HEARTBEAT_INTERVAL_MIN` | Heartbeat frequency | + +--- + +## Important Notes + +1. **Default Context**: If `--channel` and `--chat` are omitted, uses last messaged conversation +2. **Matrix/WhatsApp**: Route through bot's API server for E2EE support +3. **File Paths**: Use absolute paths (e.g., `/home/ani/file.pdf` not `file.pdf`) +4. **Signal**: Text only, no file support in `lettabot-message` +5. **Permissions**: Matrix reactions need `MATRIX_HOMESERVER_URL` and `MATRIX_ACCESS_TOKEN` + +--- + +Created: 2026-03-23 +Last tested: LettaBot v0.17.x