{"id":42270795,"url":"https://github.com/divkix/alita_robot","last_synced_at":"2026-06-03T09:00:56.086Z","repository":{"id":37986243,"uuid":"307265454","full_name":"Divkix/Alita_Robot","owner":"Divkix","description":"🤖 Alita is a Telegram Group management bot made using Gotgbot and Go, which makes it modern and ⏩ faster than most of the Telegram chat managers. 💬","archived":false,"fork":false,"pushed_at":"2026-05-28T07:30:58.000Z","size":6528,"stargazers_count":236,"open_issues_count":5,"forks_count":318,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-05-28T08:20:48.360Z","etag":null,"topics":["bot","golang","gotgbot","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"https://alita-docs.divkix.me","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Divkix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"ko_fi":"divkix","github":"divkix"}},"created_at":"2020-10-26T04:57:50.000Z","updated_at":"2026-05-28T06:48:03.000Z","dependencies_parsed_at":"2023-02-19T05:16:05.398Z","dependency_job_id":"50a7b16e-6fdc-4892-b8f1-95fdb1a01bb5","html_url":"https://github.com/Divkix/Alita_Robot","commit_stats":null,"previous_names":["divideprojects/alita_robot"],"tags_count":169,"template":false,"template_full_name":null,"purl":"pkg:github/Divkix/Alita_Robot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divkix%2FAlita_Robot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divkix%2FAlita_Robot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divkix%2FAlita_Robot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divkix%2FAlita_Robot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Divkix","download_url":"https://codeload.github.com/Divkix/Alita_Robot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divkix%2FAlita_Robot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33856287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","golang","gotgbot","telegram","telegram-bot"],"created_at":"2026-01-27T07:21:11.291Z","updated_at":"2026-06-03T09:00:56.079Z","avatar_url":"https://github.com/Divkix.png","language":"Go","funding_links":["https://ko-fi.com/divkix","https://github.com/sponsors/divkix"],"categories":[],"sub_categories":[],"readme":"# Alita Robot 🤖\n\n\u003cp align='center'\u003e\n  \u003ca href=\"https://github.com/divkix/Alita_Robot/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/divkix/Alita_Robot/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/divkix/Alita_Robot/actions/workflows/release.yml\"\u003e \u003cimg src=\"https://github.com/divkix/Alita_Robot/actions/workflows/release.yml/badge.svg\" alt=\"Release\"/\u003e \u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/divkix/Alita_Robot\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/divkix/Alita_Robot\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/divkix/Alita_Robot\"\u003e\u003cimg src=\"https://pkg.go.dev/badge/github.com/divkix/Alita_Robot.svg\" alt=\"Go Reference\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align='center'\u003e\n  \u003cimg src=\"https://img.shields.io/github/forks/divkix/Alita_Robot?style=flat-square\" alt=\"Forks\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/divkix/Alita_Robot?style=flat-square\" alt=\"Stars\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/divkix/Alita_Robot?style=flat-square\" alt=\"Issues\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/divkix/Alita_Robot?style=flat-square\" alt=\"LICENSE\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/contributors/divkix/Alita_Robot?style=flat-square\" alt=\"Contributors\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/repo-size/divkix/Alita_Robot?style=flat-square\" alt=\"Repo Size\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/release/divkix/Alita_Robot?style=flat-square\" alt=\"Release Version\"\u003e\n\u003c/p\u003e\n\n\u003cp align='center'\u003e\n  \u003ca href=\"https://go.dev/\"\u003e \u003cimg src=\"https://img.shields.io/badge/Made%20with-Go-1f425f.svg?style=flat-square\u0026logo=Go\u0026color=00ADD8\" /\u003e \u003c/a\u003e\n  \u003ca href=\"https://www.postgresql.org/\"\u003e \u003cimg src=\"https://img.shields.io/badge/Database-PostgreSQL-336791?style=flat-square\u0026logo=postgresql\u0026logoColor=white\" /\u003e \u003c/a\u003e\n  \u003ca href=\"https://redis.io/\"\u003e \u003cimg src=\"https://img.shields.io/badge/Cache-Redis-DC382D?style=flat-square\u0026logo=redis\u0026logoColor=white\" /\u003e \u003c/a\u003e\n  \u003ca href=\"https://makeapullrequest.com\"\u003e \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\" /\u003e \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e **Alita** is a powerful, modern Telegram group management bot built with Go\n\u003e and the Gotgbot library. Designed for speed, reliability, and extensive\n\u003e customization, Alita provides comprehensive moderation tools for Telegram\n\u003e communities of any size.\n\n\u003cp align='center'\u003e\n\u003ca href=\"https://render.com/deploy?repo=https://github.com/divkix/Alita_Robot\"\u003e\u003cimg src=\"https://render.com/images/deploy-to-render-button.svg\" alt=\"Deploy to Render\"\u003e\u003c/a\u003e \u003ca href=\"https://railway.com/deploy/2vHOTV?referralCode=Divkix\"\u003e\u003cimg src=\"https://railway.com/button.svg\" alt=\"Deploy on Railway\"\u003e\u003c/a\u003e \u003ca href=\"https://heroku.com/deploy?template=https://github.com/divkix/Alita_Robot\"\u003e\u003cimg src=\"https://www.herokucdn.com/deploy/button.svg\" alt=\"Deploy\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 📋 Table of Contents\n\n- [Features](#-features)\n- [Quick Start](#-quick-start)\n- [One-Click Deploy](#-one-click-deploy)\n- [Installation](#-installation)\n  - [Docker (Recommended)](#docker-recommended)\n  - [Binary Release](#binary-release)\n  - [Build from Source](#build-from-source)\n- [Configuration](#️-configuration)\n- [Bot Commands](#-bot-commands)\n- [Development](#-development)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## ✨ Features\n\n### 📊 **Performance \u0026 Optimization**\n\n- **Parallel Bulk Processing**: High-performance batch operations for filters,\n  blacklists, and warnings\n- **Worker Pool Architecture**: Efficient concurrent task processing with rate\n  limiting\n- **Smart Caching**: Two-tier caching with stampede protection and TTL\n  management\n- **Batch Prefetching**: Optimized data loading for reduced database queries\n- **Resource Monitoring**: Automatic detection and alerting for memory/goroutine\n  issues\n- **Performance Analytics**: Built-in statistics collection and performance\n  tracking\n\n### 🛡️ **Admin \u0026 Moderation**\n\n- **User Management**: Ban, mute, kick, and warn users with customizable actions\n- **Permission System**: Granular permission control for admins\n- **Anti-Spam**: Configurable flood control and spam detection\n- **Blacklist**: Word and sticker filtering with pattern matching\n\n### 💬 **Messaging \u0026 Content**\n\n- **Welcome/Goodbye**: Customizable greeting messages with variables\n- **Filters**: Keyword-triggered auto-responses with regex support\n- **Notes**: Save and retrieve formatted messages\n- **Pins**: Manage pinned messages with anti-spam protection\n- **Locks**: Control message types (links, forwards, media, etc.)\n\n### 🔧 **Technical Excellence**\n\n- **Performance**: Built with Go for blazing-fast response times\n- **Cache**: Redis with TTL support and stampede protection\n- **Database**: PostgreSQL with connection pooling and batch operations\n- **Deployment Modes**: Support for both polling and webhook modes\n- **Multi-Language**: i18n support with YAML locale files\n- **Monitoring**: Built-in resource monitoring and health checks\n\n### 🚀 **Modern Architecture**\n\n- **Fully Asynchronous**: Non-blocking operations throughout\n- **Repository Pattern**: Clean separation of concerns\n- **Middleware System**: Extensible command decorators\n- **Graceful Shutdown**: Proper cleanup and connection handling\n- **Docker Ready**: Multi-architecture images for easy deployment\n- **Worker Pools**: Concurrent processing with configurable worker pools\n- **Batch Operations**: Optimized bulk database operations with parallel\n  processing\n- **Performance Monitoring**: Built-in metrics collection and analysis\n\n## 🚀 Quick Start\n\nGet Alita running in under 5 minutes!\n\n### Prerequisites\n\n- Docker and Docker Compose installed\n- PostgreSQL database (or use the included one)\n- Redis instance (or use the included one)\n- Telegram Bot Token from [@BotFather](https://t.me/BotFather)\n\n### Step 1: Clone the Repository\n\n```bash\ngit clone https://github.com/divkix/Alita_Robot.git\ncd Alita_Robot\n```\n\n### Step 2: Configure Environment\n\n```bash\ncp sample.env .env\n# Edit .env with your configuration\nnano .env\n```\n\n**Required variables:**\n\n```env\nBOT_TOKEN=your_bot_token_from_botfather\nOWNER_ID=your_telegram_user_id\nMESSAGE_DUMP=-100xxxxxxxxx  # Your log channel\nDATABASE_URL=postgres://postgres:password@postgres:5432/alita_robot\nREDIS_ADDRESS=redis:6379\n```\n\n### Step 3: Run with Docker\n\n```bash\ndocker compose up -d\n```\n\nThat's it! Your bot should now be running. Check the logs:\n\n```bash\ndocker compose logs -f alita\n```\n\n### Interact with Your Bot\n\nOpen Telegram and search for your bot username to start using it!\n\n\u003e **Note:** After deploying, configure the required environment variables\n\u003e (`BOT_TOKEN`, `OWNER_ID`, `MESSAGE_DUMP`) in your platform's dashboard.\n\n**Platform-specific notes:**\n\n- **Render**: PostgreSQL and Redis are automatically provisioned. Free tier\n  includes 750 hours/month.\n- **Railway**: PostgreSQL and Redis are included in the template.\n- **Heroku**: Requires paid dynos ($5/mo) + PostgreSQL Essential ($5/mo) + Redis\n  Mini ($3/mo). All addons are auto-configured.\n\n## 💻 Installation\n\n### Docker (Recommended)\n\nWe provide official Docker images at `ghcr.io/divkix/alita_robot` for easy\ndeployment.\n\n#### Using Docker Compose (Full Stack)\n\nThis includes PostgreSQL, Redis, and the bot:\n\n```bash\n# Clone the repository\ngit clone https://github.com/divkix/Alita_Robot.git\ncd Alita_Robot\n\n# Configure environment\ncp sample.env .env\n# Edit .env with your settings\n\n# Start all services\ndocker compose up -d\n\n# View logs\ndocker compose logs -f alita\n\n# Stop services\ndocker compose down\n```\n\nNote: Database migrations run automatically in Docker (AUTO_MIGRATE=true).\n\nOptional: To run a local Telegram Bot API server for faster file handling, use\nthe compose profile and set API_SERVER in your `.env`:\n\n```bash\n# .env\nAPI_SERVER=http://telegram-bot-api:8081\nTELEGRAM_API_ID=your_api_id\nTELEGRAM_API_HASH=your_api_hash\n\n# Start with profile\ndocker compose --profile local-bot-api up -d\n```\n\n#### Using Docker Run (Bot Only)\n\nIf you have existing PostgreSQL and Redis instances:\n\n```bash\ndocker run -d \\\n  --name alita-bot \\\n  --restart unless-stopped \\\n  -e BOT_TOKEN=\"your_bot_token\" \\\n  -e DATABASE_URL=\"your_postgres_url\" \\\n  -e REDIS_ADDRESS=\"your_redis_address\" \\\n  -e OWNER_ID=\"your_telegram_id\" \\\n  -e MESSAGE_DUMP=\"-100xxxxxxxxx\" \\\n  ghcr.io/divkix/alita_robot:latest\n```\n\n### Binary Release\n\nDownload pre-built binaries for your platform:\n\n1. Visit the [Releases](https://github.com/divkix/Alita_Robot/releases) page\n2. Download the appropriate binary for your OS/architecture:\n   - **Linux**: `alita_robot_*_linux_amd64.tar.gz` or `_arm64`\n   - **macOS**: `alita_robot_*_darwin_amd64.tar.gz` or `_arm64`\n   - **Windows**: `alita_robot_*_windows_amd64.zip`\n\n3. Extract and run:\n\n```bash\n# Linux/macOS\ntar -xzf alita_robot_*.tar.gz\nchmod +x alita_robot\n./alita_robot\n\n# Windows\n# Extract the zip file and run alita_robot.exe\n```\n\n### Build from Source\n\n#### Prerequisites\n\n- Go 1.26 or higher\n- PostgreSQL 14+\n- Redis 6+\n- Make (optional)\n\n#### Build Steps\n\n```bash\n# Clone the repository\ngit clone https://github.com/divkix/Alita_Robot.git\ncd Alita_Robot\n\n# Install dependencies\ngo mod download\n\n# Build the binary\ngo build -o alita_robot .\n\n# Or use make\nmake build\n\n# Run the bot\n./alita_robot\n\n# (Recommended) Run database migrations before the first run\n# Provide your Postgres connection via env vars:\n#   PSQL_DB_HOST, PSQL_DB_NAME, PSQL_DB_USER, PSQL_DB_PASSWORD\n# Optional: PSQL_DB_PORT (default 5432), PSQL_DB_SSLMODE (default require)\nmake psql-migrate\n```\n\n#### Development Build\n\n```bash\n# Run with hot reload (requires air)\ngo install github.com/cosmtrek/air@latest\nair\n\n# Or use make\nmake run\n```\n\n## ⚙️ Configuration\n\n### Environment Variables\n\nAlita uses environment variables for configuration. Create a `.env` file in the\nproject root:\n\n#### Required Variables\n\n| Variable        | Description                                                  | Example                        |\n| --------------- | ------------------------------------------------------------ | ------------------------------ |\n| `BOT_TOKEN`     | Telegram Bot Token from [@BotFather](https://t.me/BotFather) | `123456:ABC-DEF...`            |\n| `DATABASE_URL`  | PostgreSQL connection string                                 | `postgres://user:pass@host/db` |\n| `REDIS_ADDRESS` | Redis server address                                         | `redis:6379`                   |\n| `OWNER_ID`      | Your Telegram user ID                                        | `123456789`                    |\n| `MESSAGE_DUMP`  | Log channel ID (must start with -100)                        | `-100123456789`                |\n\n#### Optional Variables\n\n| Variable               | Description                                     | Default |\n| ---------------------- | ----------------------------------------------- | ------- |\n| `REDIS_PASSWORD`       | Redis password                                  | (empty) |\n| `ENABLED_LOCALES`      | Comma-separated locale codes                    | `en`    |\n| `USE_WEBHOOKS`         | Enable webhook mode                             | `false` |\n| `WEBHOOK_DOMAIN`       | Webhook domain (if enabled)                     | -       |\n| `WEBHOOK_SECRET`       | Webhook security token                          | -       |\n| `HTTP_PORT`            | Unified server port (health, metrics, webhook)  | `8080`  |\n| `DEBUG`                | Enable verbose logging                          | `false` |\n| `AUTO_MIGRATE`         | Auto-apply SQL migrations on startup            | `false` |\n| `DROP_PENDING_UPDATES` | Drop pending updates on start                   | `true`  |\n\nSee `sample.env` for the complete list of configuration options including\ndatabase pool tuning, worker pool sizes, monitoring, and performance settings.\n\n### Webhook Mode (Production)\n\nFor production deployments, webhook mode provides better performance and lower\nresource usage than polling. Alita supports webhooks with Cloudflare Tunnel for\neasy setup behind firewalls.\n\n#### Prerequisites\n\n- Cloudflare account with a domain added to Cloudflare\n- Docker and Docker Compose installed\n\n#### Step 1: Create Cloudflare Tunnel\n\n1. Go to [Cloudflare Zero Trust Dashboard](https://one.dash.cloudflare.com)\n2. Navigate to **Networks \u003e Tunnels**\n3. Click **Create a tunnel** → Choose **Cloudflared**\n4. Name your tunnel (e.g., `alita-telegram-bot`)\n5. **Copy the tunnel token** from the command shown (the long string after\n   `--token`)\n\n#### Step 2: Configure Public Hostname\n\n1. In your tunnel dashboard, go to **Public Hostnames** tab\n2. Click **Add a public hostname**\n3. Configure:\n   - **Subdomain**: `alita-bot` (or your preference)\n   - **Domain**: Select your domain\n   - **Service**: `http://alita:8080`\n   - **Path**: `/webhook/your-secret` (replace with your actual\n     `WEBHOOK_SECRET`)\n\n#### Step 3: Environment Configuration\n\nCreate your `.env` file with webhook settings:\n\n```bash\n# Bot Configuration\nBOT_TOKEN=your_bot_token_here\nOWNER_ID=your_telegram_user_id\nMESSAGE_DUMP=-100xxxxxxxxx\n\n# Database Configuration\nDATABASE_URL=postgres://postgres:password@postgres:5432/alita_robot?sslmode=disable\nREDIS_ADDRESS=redis:6379\nREDIS_PASSWORD=your_redis_password\n\n# Webhook Configuration\nUSE_WEBHOOKS=true\nWEBHOOK_DOMAIN=https://alita-bot.yourdomain.com\nWEBHOOK_SECRET=your-random-secret-string-here\nHTTP_PORT=8080\n\n# Cloudflare Tunnel\nCLOUDFLARE_TUNNEL_TOKEN=eyJhIjoiNzU1...your-tunnel-token-here\n```\n\n#### Step 4: Enable Cloudflare Tunnel in Docker\n\nUncomment the `cloudflared` service in your `docker-compose.yml`:\n\n```yaml\n# Uncomment this section for webhook mode\ncloudflared:\n  image: cloudflare/cloudflared:latest\n  container_name: alita-cloudflared\n  environment:\n    - TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}\n  command: tunnel --no-autoupdate run\n  restart: unless-stopped\n  depends_on:\n    - alita\n  deploy:\n    resources:\n      limits:\n        memory: 128M\n        cpus: \"0.1\"\n```\n\n#### Step 5: Register Webhook with Telegram\n\nAfter your bot is running, register the webhook URL with Telegram:\n\n```bash\n# Replace YOUR_BOT_TOKEN with your actual bot token\n# Replace the URL with your actual webhook URL\ncurl -X POST \"https://api.telegram.org/botYOUR_BOT_TOKEN/setWebhook\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"url\": \"https://alita-bot.yourdomain.com/webhook/your-secret\",\n    \"secret_token\": \"your-secret\"\n  }'\n```\n\n#### Step 6: Deploy\n\n```bash\ndocker compose up -d\n```\n\n#### Verify Setup\n\nCheck webhook status:\n\n```bash\ncurl \"https://api.telegram.org/botYOUR_BOT_TOKEN/getWebhookInfo\"\n```\n\n#### Switch Back to Polling\n\nTo disable webhooks and return to polling mode:\n\n```bash\n# Clear webhook\ncurl -X POST \"https://api.telegram.org/botYOUR_BOT_TOKEN/setWebhook\" -d \"url=\"\n\n# Update environment\nUSE_WEBHOOKS=false\n```\n\n#### Webhook vs Polling Comparison\n\n| Feature               | Webhook Mode             | Polling Mode              |\n| --------------------- | ------------------------ | ------------------------- |\n| **Performance**       | ⚡ Real-time updates     | 🐌 1-3 second delay       |\n| **Resource Usage**    | 💚 Lower CPU/bandwidth   | 🟡 Higher CPU/bandwidth   |\n| **Setup Complexity**  | 🔧 Requires domain setup | ✅ Simple, works anywhere |\n| **Production Ready**  | ✅ Recommended           | ⚠️ Development only       |\n| **Firewall Friendly** | ✅ Works behind NAT      | ❌ Needs outbound access  |\n\n## 🤖 Bot Commands\n\nAlita provides **158+ commands** organized into modules. Use `/help` in your group for the full list.\n\n### 👑 Administration\n\n- `/promote` `/demote` — Manage admins\n- `/title` — Set custom admin title\n- `/adminlist` — List chat admins\n- `/anonadmin` — Toggle anonymous admin verification\n\n### 🛡️ Moderation\n\n- `/ban` `/unban` `/sban` `/dban` `/tban` — Ban users\n- `/kick` `/dkick` `/kickme` — Kick users\n- `/mute` `/unmute` `/smute` `/dmute` `/tmute` — Mute users\n- `/warn` `/dwarn` `/swarn` `/unwarn` `/rmwarn` — Warn users\n- `/setwarnlimit` `/setwarnmode` — Configure warn settings\n- `/tban` `/tmute` — Temporary bans and mutes\n- `/restrict` `/unrestrict` — Restriction menu\n- `/lock` `/unlock` — Lock message types\n- `/setflood` — Configure antiflood\n- `/captcha` `/captchamode` `/captchatime` — CAPTCHA settings\n- `/antiraid` — Raid protection\n\n### 💬 Content Management\n\n- `/filter` `/filters` `/stop` — Keyword filters\n- `/save` `/get` `/notes` `/clear` — Notes\n- `/setwelcome` `/setgoodbye` `/resetwelcome` `/resetgoodbye` — Greetings\n- `/cleanwelcome` `/cleanservice` — Auto-delete messages\n- `/setrules` `/rules` `/privaterules` — Group rules\n- `/reaction` `/reactions` — Auto-reactions\n- `/blacklist` `/blacklists` `/blacklistmode` — Word filtering\n\n### 🔧 Group Tools\n\n- `/pin` `/unpin` `/permapin` `/unpinall` — Pin management\n- `/purge` `/del` — Message deletion\n- `/invitelink` — Get invite link\n- `/reports` `/report` — Report system\n- `/approve` `/unapprove` `/approval` — Anti-spam approvals\n- `/backup` `/restore` `/reset` — Data backup\n- `/disable` `/enable` — Disable commands\n- `/language` — Change bot language\n\n### 🛠️ User \u0026 Misc\n\n- `/start` `/help` `/info` `/id` `/ping` — Basic commands\n- `/tr` `/translate` — Translation\n- `/stats` `/msgstats` — Statistics\n- `/formatting` — Formatting guide\n- `/connect` `/disconnect` — Chat connections\n\n### 🚀 Developer\n\n- `/stats` `/reload` `/restart` `/debug` `/eval` — Dev commands (owner only)\n\n## 📖 Documentation\n\n- **Comprehensive Code Documentation**: Comprehensive code documentation across\n  the Go codebase\n- **GoDoc Compatible**: Documentation follows Go standards for automatic\n  documentation generation\n- **Developer Guide**: See [AGENTS.md](AGENTS.md) for detailed architecture and\n  development guidelines\n- **API Reference**: Run `go doc` or visit\n  [pkg.go.dev](https://pkg.go.dev/github.com/divkix/Alita_Robot) for API\n  documentation\n\n## 🔨 Development\n\n### Project Structure\n\n```\nAlita_Robot/\n├── alita/              # Core bot code\n│   ├── config/         # Configuration management\n│   ├── db/             # Database layer\n│   ├── modules/        # Command handlers\n│   ├── utils/          # Utility packages\n│   └── i18n/           # Internationalization\n├── internal/           # Internal packages\n├── migrations/         # Database migration SQL files\n├── locales/            # Language files\n├── scripts/            # Support scripts (translation checks, docs generation)\n├── supabase/           # Supabase CLI configuration\n├── docs/               # Documentation site (Astro/Starlight)\n└── docker/             # Docker configurations\n```\n\n### Development Setup\n\n1. **Install Go 1.26+**\n   ```bash\n   # macOS\n   brew install go\n\n   # Linux\n   wget https://go.dev/dl/go1.26.0.linux-amd64.tar.gz\n   sudo tar -C /usr/local -xzf go1.26.0.linux-amd64.tar.gz\n   ```\n\n2. **Setup PostgreSQL and Redis**\n   ```bash\n   # Using Docker\n   docker run -d --name postgres -e POSTGRES_PASSWORD=password -p 5432:5432 postgres:14\n   docker run -d --name redis -p 6379:6379 redis:7-alpine\n   ```\n\n3. **Clone and Build**\n   ```bash\n   git clone https://github.com/divkix/Alita_Robot.git\n   cd Alita_Robot\n   go mod download\n   make build\n   ```\n\n4. **Install Pre-commit Hooks** (Optional but recommended)\n   ```bash\n   pip install pre-commit\n   pre-commit install\n   ```\n\n   This will run automatic checks before each commit:\n   - Code formatting (gofmt)\n   - Linting (golangci-lint)\n   - Security checks\n   - File cleanup (trailing whitespace, EOF)\n\n5. **Run Database Migrations**\n\n   SQL files in `migrations/` are the source of truth for schema.\n   Migrations are applied to any PostgreSQL instance, with Supabase-specific\n   statements auto-cleaned at runtime if present.\n\n   - Required environment variables for migrations:\n     - `PSQL_DB_HOST`, `PSQL_DB_NAME`, `PSQL_DB_USER`, `PSQL_DB_PASSWORD`\n     - Optional: `PSQL_DB_PORT` (default: 5432), `PSQL_DB_SSLMODE` (default:\n       require)\n\n   ```bash\n   # Example: local Postgres\n   export PSQL_DB_HOST=\"localhost\"\n   export PSQL_DB_NAME=\"alita_robot\"\n   export PSQL_DB_USER=\"postgres\"\n   export PSQL_DB_PASSWORD=\"password\"\n   # export PSQL_DB_PORT=\"5432\"       # optional\n   # export PSQL_DB_SSLMODE=\"require\" # optional\n\n   # Apply migrations (auto-cleans Supabase SQL for generic Postgres)\n   make psql-migrate\n   ```\n\n   Optional: generate cleaned SQL for inspection (not required to run\n   migrations):\n\n   ```bash\n   make psql-prepare PSQL_MIGRATIONS_DIR=tmp/migrations_cleaned\n   ls -1 tmp/migrations_cleaned\n   ```\n\n6. **Start Development**\n   ```bash\n   make run\n   ```\n\n### Available Make Commands\n\n```bash\nmake run          # Run bot locally\nmake build        # Build release binaries\nmake lint         # Run linters\nmake test         # Run automated regression tests\nmake tidy         # Clean dependencies\nmake vendor       # Vendor dependencies\nmake psql-migrate # Run migrations\nmake psql-prepare # Generate cleaned SQL into tmp/migrations_cleaned\nmake psql-status  # Check migration status\nmake psql-reset   # Reset database (DANGEROUS)\n```\n\n### Adding New Features\n\n1. **Database Model** - Add to `alita/db/`\n2. **Repository** - Implement in `alita/db/repositories/`\n3. **Handler** - Create in `alita/modules/`\n4. **Register** - Add to module's init function\n5. **Localize** - Add strings to `locales/`\n\n### Code Quality\n\n```bash\n# Run linters\nmake lint\n\n# Run automated tests\nmake test\n\n# Format code\ngofmt -w .\n```\n\n### Verifying Releases\n\nAll releases are cryptographically attested using GitHub's attestation feature\nfor supply chain security. To verify:\n\n```bash\n# Using GitHub CLI (gh)\ngh attestation verify alita_robot_*.tar.gz \\\n  --owner divkix \\\n  --repo Alita_Robot\n```\n\nThis verification ensures:\n\n- The artifact was built by our official GitHub Actions workflow\n- The binary hasn't been tampered with since build\n- Full build provenance and supply chain integrity\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how to get started:\n\n### Guidelines\n\n1. **Fork the repository** and create your branch from `main`\n2. **Write clean code** that follows Go best practices\n3. **Test your changes** thoroughly\n4. **Update documentation** if needed\n5. **Submit a Pull Request** with a clear description\n\n### Development Workflow\n\n```bash\n# Fork and clone\ngit clone https://github.com/YOUR_USERNAME/Alita_Robot.git\ncd Alita_Robot\n\n# Create feature branch\ngit checkout -b feature/amazing-feature\n\n# Make changes and test\nmake run\nmake lint\nmake test\n\n# Commit with conventional commits\ngit commit -m \"feat: add amazing feature\"\n\n# Push and create PR\ngit push origin feature/amazing-feature\n```\n\n### Commit Convention\n\nWe use [Conventional Commits](https://www.conventionalcommits.org/):\n\n- `feat:` New feature\n- `fix:` Bug fix\n- `docs:` Documentation\n- `refactor:` Code refactoring\n- `test:` Testing\n- `chore:` Maintenance\n\n### Need Help?\n\n- Join our [Support Group](https://t.me/DivideSupport)\n- Check [existing issues](https://github.com/divkix/Alita_Robot/issues)\n- Read the [AGENTS.md](AGENTS.md) for codebase details\n\n## 🌟 Acknowledgments\n\n### Special Thanks\n\n- **[Paul Larsen](https://github.com/PaulSonOfLars)** - For the amazing\n  [Gotgbot](https://github.com/PaulSonOfLars/gotgbot) library and inspiration\n  from Marie\n- **[ÁÑÑÍHÌLÅTØR SPÄRK](https://github.com/annihilatorrrr)** - Continuous\n  motivation and contributions\n- **[jayantkageri](https://github.com/jayantkageri)** - Support and\n  encouragement\n- **[Anony](https://github.com/anonyindian)** - Bug fixes and improvements\n- **All Contributors** - Everyone who has helped improve this project!\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file\nfor details.\n\n```\nCopyright (C) 2020-2026 Divkix\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n```\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ❤️ by \u003ca href=\"https://divkix.me\"\u003eDivkix\u003c/a\u003e and contributors\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://t.me/Alita_Robot\"\u003eTry Alita\u003c/a\u003e •\n  \u003ca href=\"https://t.me/DivideSupport\"\u003eSupport Group\u003c/a\u003e •\n  \u003ca href=\"https://t.me/DivideProjects\"\u003eUpdates Channel\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivkix%2Falita_robot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivkix%2Falita_robot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivkix%2Falita_robot/lists"}