{"id":20948291,"url":"https://github.com/raine/telegram-tori-bot","last_synced_at":"2026-04-05T21:06:27.398Z","repository":{"id":57706963,"uuid":"472521849","full_name":"raine/telegram-tori-bot","owner":"raine","description":"Telegram bot created with the intent of making selling stuff on tori.fi as streamlined as possible.","archived":false,"fork":false,"pushed_at":"2026-01-31T14:19:22.000Z","size":3632,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T20:58:03.397Z","etag":null,"topics":["telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-21T21:42:05.000Z","updated_at":"2026-01-31T14:18:24.000Z","dependencies_parsed_at":"2024-06-21T02:26:46.424Z","dependency_job_id":null,"html_url":"https://github.com/raine/telegram-tori-bot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/raine/telegram-tori-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raine%2Ftelegram-tori-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raine%2Ftelegram-tori-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raine%2Ftelegram-tori-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raine%2Ftelegram-tori-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raine","download_url":"https://codeload.github.com/raine/telegram-tori-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raine%2Ftelegram-tori-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31449874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["telegram","telegram-bot"],"created_at":"2024-11-19T00:17:03.940Z","updated_at":"2026-04-05T21:06:27.392Z","avatar_url":"https://github.com/raine.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram-tori-bot\n\nTelegram bot created with the intent of making selling stuff on tori.fi as\nstreamlined as possible. Putting stuff for sale with this thing is actually a\njoy. Takes advantage of Telegram's photo sending and bot features like Custom\nReply Keyboards and Inline Keyboards.\n\n## Features\n\n### Vision-based listing creation\n\nSend a photo and the bot uses Gemini Vision API to automatically generate a\ntitle and description for your listing. Multiple photos (albums) are analyzed\ntogether for better context.\n\n### AI-powered automation\n\n- **Auto-category selection**: LLM automatically selects the most appropriate\n  category based on the item\n- **Auto-attribute selection**: Category-specific attributes (size, color,\n  condition, etc.) are automatically filled in\n- **Price recommendations**: Shows prices of similar listings to help you price\n  your item competitively\n\n### Natural language editing\n\nEdit your listing draft by typing in Finnish, e.g., \"vaihda hinnaksi 40e\" or\n\"lisää että koirataloudesta\". The bot understands and applies the changes.\n\n### Giveaway mode\n\nList items for free by selecting the \"Annetaan\" button when prompted for price.\nThe description is automatically rewritten to use \"Annetaan\" language.\n\n### Tori Diili shipping\n\nEnable Tori Diili shipping to offer buyers secure shipping with integrated\npayment. When you select \"Kyllä\" for shipping, the bot fetches your saved\nshipping address from Tori and prompts you to select a package size:\n\n- **S** (max 4kg, 40×32×15cm) - 2.99€\n- **M** (max 25kg, 40×32×26cm) - 4.99€\n- **L** (max 25kg, 100×60×60cm) - 12.99€\n\nPrices shown are examples and may change.\n\n**Note**: You must have a saved shipping profile in Tori. Set this up by\ncreating a Tori Diili listing in the official Tori app first.\n\n### Description templates\n\nSave a description template with `/malli` that gets appended to all your\nlistings. Supports conditional text using Go's\n[text/template](https://pkg.go.dev/text/template) syntax.\n\nVariables:\n\n- `{{.shipping}}` - shipping enabled (true/false)\n- `{{.giveaway}}` - giving away for free (true/false)\n- `{{.price}}` - price in euros (0 if giveaway)\n\n```\n/malli Nouto Kannelmäestä{{if .shipping}} tai postitus{{end}}. Mobilepay/käteinen.\n```\n\n### Listing management\n\nUse `/ilmoitukset` to browse and manage your existing Tori listings directly in\nTelegram:\n\n- View all your active and pending listings with click/favorite stats\n- Mark items as sold or reactivate sold listings\n- Delete listings with confirmation\n- Toggle between active listings and older/expired ones\n- Republish expired listings with a single button click (copies all data\n  including images)\n\n### Other features\n\n- **Built-in login flow**: Login directly through the bot with `/login` (email\n  verification code)\n\n## Quick start\n\n1. **Download** the\n   [latest release](https://github.com/raine/telegram-tori-bot/releases/latest)\n   for your platform:\n\n   | Platform              | Download                                                                                                                                       |\n   | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |\n   | Linux (x64)           | [telegram-tori-bot-linux-amd64](https://github.com/raine/telegram-tori-bot/releases/latest/download/telegram-tori-bot-linux-amd64)             |\n   | Linux (ARM64)         | [telegram-tori-bot-linux-arm64](https://github.com/raine/telegram-tori-bot/releases/latest/download/telegram-tori-bot-linux-arm64)             |\n   | macOS (Apple Silicon) | [telegram-tori-bot-darwin-arm64](https://github.com/raine/telegram-tori-bot/releases/latest/download/telegram-tori-bot-darwin-arm64)           |\n   | Windows (x64)         | [telegram-tori-bot-windows-amd64.exe](https://github.com/raine/telegram-tori-bot/releases/latest/download/telegram-tori-bot-windows-amd64.exe) |\n\n2. **Run** the downloaded file (double-click or run from terminal)\n\n3. **Follow the setup wizard** - it will guide you through:\n   - Creating a Telegram bot via @BotFather\n   - Getting a Gemini API key\n   - Finding your Telegram user ID\n\n4. **Start using the bot**\n   - Find your bot on Telegram by its username\n   - Send `/start`, then `/login` to connect your Tori account\n   - Send a photo of something you want to sell\n\n### Windows users\n\nWindows may show a \"Windows protected your PC\" warning for unsigned executables.\nClick \"More info\" then \"Run anyway\" to proceed.\n\n### Alternative: Install with Go\n\nIf you have Go installed, you can also install via:\n\n```sh\ngo install github.com/raine/telegram-tori-bot@latest\n```\n\n## LLM costs\n\nThe bot uses Google's Gemini API for vision and text processing. The free tier\nmay work fine (10 RPM, 250 requests/day). Costs on paid tier are minimal - a\ntypical listing creation costs well under $0.01 USD:\n\n```\nINF image(s) analyzed cost=0.0008925 imageCount=1 title=\"LUMI Recovery Pod kylmäallas\"\nINF category selection llm call costUSD=0.000019725 inputTokens=223 model=gemini-2.5-flash-lite outputTokens=10\n```\n\n## Configuration\n\nThe setup wizard automatically creates a `.env` file with your configuration.\nYou can also set these as environment variables:\n\n| Variable            | Required | Description                                       |\n| ------------------- | -------- | ------------------------------------------------- |\n| `BOT_TOKEN`         | Yes      | Telegram bot token from @BotFather                |\n| `GEMINI_API_KEY`    | Yes      | Google Gemini API key for vision/LLM features     |\n| `TORI_TOKEN_KEY`    | Yes      | Secret passphrase for encrypting Tori auth tokens |\n| `ADMIN_TELEGRAM_ID` | Yes      | Your Telegram user ID (becomes admin)             |\n| `TORI_DB_PATH`      | No       | SQLite database path (default: `sessions.db`)     |\n\n## Deployment\n\nTori's login uses reCAPTCHA validation based on IP reputation. The bot must run\nfrom an IP address where you have previously logged into Tori via browser or the\nofficial app. Untrusted IPs will fail with \"reCaptcha was invalid\" errors during\nlogin. A Raspberry Pi on your home network is an easy option since you likely\nalready use Tori from that IP.\n\n### Raspberry Pi deployment\n\nThe [`deployment/`](deployment/) directory contains an example setup for\ndeploying to a Raspberry Pi as a systemd service.\n\n## User access control\n\nThe bot uses a whitelist system. Only the admin (specified by\n`ADMIN_TELEGRAM_ID`) and explicitly allowed users can interact with the bot.\nUnauthorized users receive no response.\n\n### Admin commands\n\nThe admin can manage allowed users with these commands (not shown in bot menu):\n\n- `/admin users add \u003cuser_id\u003e` - Add a user to the whitelist\n- `/admin users remove \u003cuser_id\u003e` - Remove a user from the whitelist\n- `/admin users list` - List all allowed users\n\n## Commands\n\n| Command        | Description                         |\n| -------------- | ----------------------------------- |\n| `/login`       | Login to your Tori account          |\n| `/peru`        | Cancel current listing creation     |\n| `/laheta`      | Publish the listing                 |\n| `/era`         | Enter bulk mode (multiple listings) |\n| `/valmis`      | Finish adding photos in bulk mode   |\n| `/poistakuvat` | Remove listing photos               |\n| `/osasto`      | Change category                     |\n| `/malli`       | View or set description template    |\n| `/poistamalli` | Remove description template         |\n| `/postinumero` | View or change postal code          |\n| `/ilmoitukset` | Manage your Tori listings           |\n\n## FAQ\n\n### How do I start over when making some kind of mistake that cannot be reversed?\n\nUse the command `/peru`. It will forget everything from the current listing\ncreation and delete any draft created on Tori.\n\n### Which of the uploaded photos will be used as primary picture in listing?\n\nThe first uploaded picture. When uploading multiple photos in Telegram client,\nphotos can be reordered.\n\n## Development\n\nThe project uses [`just`](https://github.com/casey/just) as a command runner.\n\n```sh\ngit clone https://github.com/raine/telegram-tori-bot.git\ncd telegram-tori-bot\njust build    # Build the project\njust check    # Run format, vet, build, and tests\njust test     # Run tests only\njust run      # Run the bot\n```\n\nRun `just -l` to see all available commands.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraine%2Ftelegram-tori-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraine%2Ftelegram-tori-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraine%2Ftelegram-tori-bot/lists"}