Skip to content

GramIOCreate your Telegram bots with convenience!

Latest Updates

GramIO v0.5.0 — Composer Rearchitecture, Observability & Testing Superpowers — February 16–18, 2026

GramIO v0.5.0 drops middleware-io and builds on @gramio/composer v0.2.0 with decorate(), when(), inspect(), trace(), and custom framework methods. @gramio/test reaches v0.1.0 with reactions, inline queries, and a fluent scope API. @gramio/session v0.2.0 adds lazy session loading — reducing storage reads by up to 90%.

All changelogs →

Get started

This command will help you create a project with GramIO (and ORM, linters and plugins) the easiest way.

bash
npm create gramio@latest ./bot
bash
yarn create gramio@latest ./bot
bash
pnpm create gramio@latest ./bot
bash
bun create gramio@latest ./bot
bash
TODO:// Deno is supported but not in scaffolding

For more information, see the «Get started» section.

GramIO in action

Example which uses some interesting features.

ts
import { 
Bot
,
format
,
bold
,
code
} from "gramio";
import {
findOrRegisterUser
} from "./utils";
const
bot
= new
Bot
(
process
.
env
.
BOT_TOKEN
as string)
.
derive
("message", async () => {
const
user
= await
findOrRegisterUser
();
return {
user
,
}; }) .
on
("message", (
context
) => {
context
.
user
;
// // // // // // // return
context
.
send
(
format
`
Hi, ${
bold
(
context
.
user
.
name
)}!
You balance: ${
code
(
context
.
user
.
balance
)}`);
}) .
on
("callback_query", (
context
) => {
// //
context
.user;
Property 'user' does not exist on type 'CallbackQueryContext<Bot<{}, DeriveDefinitions & { message: { user: { id: number; name: string; balance: number; }; }; }>>'.
});
user: {
    id: number;
    name: string;
    balance: number;
}