Fast start project
With npm create gramio you can quickly start a project in various configurations without wasting time on boring setup
Testing Gets Richer, CallbackData Gets Safer, TypeScript API Reference Launches — February 18–22, 2026
@gramio/test v0.3.0 adds 9 new methods: edit messages, forward, pin, send media groups, and click inline buttons by label text. @gramio/callback-data v0.1.0 ships safeUnpack() — never crash on stale buttons. The full TypeScript API reference launches at /api/.
This command will help you create a project with GramIO (and ORM, linters and plugins) the easiest way.
npm create gramio@latest ./botyarn create gramio@latest ./botpnpm create gramio@latest ./botbun create gramio@latest ./botTODO:// Deno is supported but not in scaffoldingFor more information, see the «Get started» section.
Example which uses some interesting features.
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; });user: {
id: number;
name: string;
balance: number;
}