No description
  • TypeScript 64.2%
  • Nix 35.8%
Find a file
2026-06-24 18:24:03 +01:00
src feat: collapsable reply 2026-06-24 18:14:15 +01:00
.env.example feat: collapsable reply 2026-06-24 18:14:15 +01:00
.envrc feat: allow overriding system prompt 2026-06-10 10:28:18 +01:00
.gitignore fix(nix): add packages.meta 2026-05-17 10:29:46 +01:00
bot.ts initial commit 2026-04-05 13:51:13 +01:00
flake.lock initial commit 2026-04-05 13:51:13 +01:00
flake.nix fix(nix): update hash 2026-06-24 18:24:03 +01:00
LICENSE Add LICENSE 2026-04-05 13:53:13 +01:00
package.json feat: use Telegram rich markdown messages 2026-06-24 15:52:47 +00:00
pnpm-lock.yaml feat: use Telegram rich markdown messages 2026-06-24 15:52:47 +00:00
pnpm-workspace.yaml feat(nix): Add nix package and nixos module 2026-04-09 13:07:39 +01:00
readme.md feat: allow overriding system prompt 2026-06-10 10:28:18 +01:00

Simple Telegram Inline LLM Query Bot

Build and run

nix develop
pnpm i
npx tsx bot.ts

See .env.example for configuration.

Use a custom system prompt from a file with either SYSTEM_PROMPT_FILE or --prompt-file:

SYSTEM_PROMPT_FILE=./system-prompt.txt npx tsx bot.ts
npx tsx bot.ts --prompt-file ./system-prompt.txt

Deploy

Using NixOS flake

# flake.nix
{
  inputs = {
    telegram-inline-llm-bot = {
      url = "github:js0ny/telegram-inline-llm-bot";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
}

In your NixOS Configuration:

services.tg-inline-llm-bot = {
  enable = true;
  apiBase = "https://openrouter.ai/v1";
  model = "openai/gpt-5.4";
  promptFile = "/etc/secrets/tg-inline-llm-bot-prompt.txt";
  envFile = "/etc/secrets/tg-inline-llm-bot.env";
};