A lightweight, extensible bot framework for Furcadia written in Python. KiwiBot provides a robust foundation for creating and managing Furcadia bots with a focus on simplicity and flexibility.
- Command System: Easy-to-use command framework with cooldown support
- Account Management: Secure storage and management of multiple bot accounts
- Web Interface: Local web admin panel for managing accounts and settings
- Extensible: Simple to add new commands and features
- Logging: Comprehensive logging system for debugging and monitoring
- Clone the repository:
git clone https://github.com/yourusername/kiwi-bot.git
cd kiwi-bot- Create a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Initialize the database:
python scripts/init_db.pyThis will create a default template database with a sample account. You can then edit this account using either the web interface or command line tools.
- Edit your bot account:
# Using the web interface
cd admin
python app.py
# Then open http://127.0.0.1:5000 in your browser
# Or using the command line
python scripts/account_manager.py edit --name default- Start the bot:
python main.py --profile default- Access the web interface:
cd admin
python app.pyThen open http://127.0.0.1:5000 in your browser.
The bot uses SQLite for storing account and connection information:
- Database location:
data/config.db - This file is excluded from git tracking to protect your credentials
- Each user should have their own local database file
If you accidentally committed the database file:
# Remove from git tracking while keeping local file
git rm --cached data/config.db
git commit -m "Remove config.db from git tracking"
git pushCommands can be sent to the bot via whispers from the owner character:
!move nw 2 # Move 2 steps northwest
!move se 1 # Move 1 step southeast
!help # Show available commands
Available movement directions:
nw: Northwestsw: Southwestne: Northeastse: Southeast
To create a new command:
- Create a new file in
kiwibot/commands/:
from typing import List, Any
from .base import Command
class MyCommand(Command):
def __init__(self, bot: Any):
super().__init__(bot)
self.name = "mycommand"
self.aliases = ["mc", "mycmd"]
self.description = "My custom command"
self.usage = "!mycommand <arg1> [arg2]"
self.cooldown = 1.0 # 1 second cooldown
async def execute(self, account_id: str, args: List[str]) -> None:
# Your command logic here
await self.bot.send_message(account_id, "Command executed!")- Register the command in
main.py:
def _register_commands(self):
# Existing commands
move_cmd = MovementCommand(self)
self.commands[move_cmd.name] = move_cmd
for alias in move_cmd.aliases:
self.commands[alias] = move_cmd
# Add your new command
my_cmd = MyCommand(self)
self.commands[my_cmd.name] = my_cmd
for alias in my_cmd.aliases:
self.commands[alias] = my_cmdThe web interface provides an easy way to manage bot accounts:
- Create new accounts
- Edit existing accounts
- Configure connection settings
- View account details
Access it by running:
cd admin
python app.pyUse the account manager script for command-line management:
# List all accounts
python scripts/account_manager.py list
# Create new account
python scripts/account_manager.py create mybot
# Edit account
python scripts/account_manager.py edit --name mybot
# Delete account
python scripts/account_manager.py delete --name mybotAccount and connection information is stored in SQLite:
- Location:
kiwibot.db - Tables:
account,connection
Logs are stored in the logs directory:
- Format:
kiwibot_<timestamp>.log - Level: DEBUG by default
Basic usage:
python main.py --profile mybotOptions:
--debug: Enable debug mode (prints raw server messages)--profile <name>: Use account by profile name--account-id <id>: Use account by ID--list: List available accounts
- The web interface is for local use only
- Account passwords are stored in the database
- Use strong, unique passwords for bot accounts
- Regularly update your bot's credentials
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and feature requests, please use the GitHub issue tracker.