platinumshrimp is a modern, multiprocess IRC bot written in Python 3. It is designed for stability, extensibility, and ease of use, featuring a plugin architecture where each plugin runs in its own isolated process.
- Multiprocessing Architecture: Each plugin runs in a separate process. If a plugin crashes, it won't affect the main bot or other plugins.
- Asynchronous & Fast: Uses
asynciofor the main bot loop andZeroMQ (ZMQ)for high-performance IPC between the bot and its plugins. - Integrated CLI: Manage the bot in real-time through a built-in command-line interface. Load/unload plugins, join channels, send messages, and reload settings without restarting the bot.
- Multi-Server Support: Connect to multiple IRC networks simultaneously.
- Secure Connections: Built-in SSL/TLS support for encrypted communication.
- Extensible Plugins: Supports plugins written in multiple languages (through ZMQ).
git clone https://github.com/Tigge/platinumshrimp.git
cd platinumshrimpDebian/Ubuntu:
sudo apt-get install python3-pip libzmq3-devFedora:
sudo dnf install python3-devel python3-pip zeromq-develcurl -sSL https://install.python-poetry.org/ | python -
poetry updatepoetry run python bot.pyThe bot is configured via settings.json. If the file does not exist, a
default one will be created on the first run.
{
"nickname": "platinumshrimp",
"realname": "Platinumshrimp",
"username": "shrimp",
"servers": {
"libera": {
"host": "irc.libera.chat",
"port": 6697,
"ssl": true
}
},
"plugins": {
"autojoiner": {
"libera": ["#platinumshrimp"]
},
"titlegiver": {
"yt-key": "your-youtube-api-key"
},
"shrimpgemini": {
"key": "your-gemini-api-key",
"trigger": "shrimp:"
}
}
}- nickname/realname/username: The bot's identity on IRC.
- servers: A map of server configurations. Each server needs a
hostandport. Setssl: truefor secure connections. - plugins: A map of plugins to load and their specific settings.
- autojoiner: Automatically joins channels on connect and remembers channels the bot is invited to.
- titlegiver: Fetches and displays the title of URLs posted in chat. Includes rich YouTube metadata support if an API key is provided.
- feedretriever: Tracks RSS feeds (and others) to automatically get updates from various sources.
- shrimpgemini: Integration with Google Gemini for interactive AI chat. Supports custom prompts, conversation history and context.
- youtubesummarizer: Summarizes YouTube videos using AI based on their transcripts.
- sqllogger: Log events to an sql database. Includes an extensive viewer to search through and find messages and events based on different filters.
- wikilooker: Search and display summaries from Wikipedia in any language.
When running the bot, you have access to a CLI to control it:
list_plugins: Show currently loaded plugins.load_plugin <name>/unload_plugin <name>: Manage plugins dynamically.join_channel <server> <channel>: Join a new channel.send_message <server> <channel> <message>: Send a message as the bot.reload_settings: Reloadsettings.jsonwithout restarting.
poetry run python -m unittest discover -vblack .Clean up temporary IPC sockets, bytecode, logs and caches:
rm -Rf `find . -name "*.pyc" -or -name __pycache__ -or -name _trial_temp -or -name "*.log" -or -name "ipc_plugin_*"`See LICENCE.md for details.