vimgram-0.1.3 is not a library.
⚡️ Vimgram
A blazing fast, Vim-native Telegram client for your terminal.
Vimgram fills the gap between heavy GUI clients and limited CLI tools. It brings the full power of Telegram DMs, groups, and channels into your terminal with a focus on speed and keyboard-driven efficiency.
✨ Features
- 🚀 Instant Startup: Lazy-loads chats for immediate access, handling hundreds of conversations without breaking a sweat.
- ⚡️ Real-time: Messages stream in effectively instantly. No manual refreshing needed.
- ⌨️ Vim-Native: Navigate entirely with
hjkl. If you know Vim, you already know Vimgram. - 📜 Smart Scrolling:
- Auto-scrolls to the newest message.
- "Stick-to-bottom" behavior while reading live chats.
- Infinite history scrolling (up/down).
- 🔒 Secure: Full MTProto encryption using
grammers. Supports 2FA (Password) login. - 🎨 Beautiful TUI: Clean, bottom-aligned chat view with color-coded senders and robust handling of emojis/formatting.
🛠 Installation
Option 1: Install via Cargo (Recommended)
If you have Rust installed, just run:
Then run it:
Option 2: Build from Source
Prerequisites
- Rust (latest stable)
- A Telegram API ID and API Hash (get them from my.telegram.org)
1. Clone & Config
# Create .env file
2. Run
On first run, you will be prompted to enter your phone number and login code.
🎮 Keybindings
Vimgram is modal, just like Vim.
NORMAL Mode (Default)
| Key | Action |
|---|---|
j / k |
Scroll history down (newer) / up (older) |
h / l |
Switch focus between Friends List and Chat |
i |
Enter INSERT mode (start typing) |
q |
Quit Vimgram |
INSERT Mode
| Key | Action |
|---|---|
Type |
Type your message |
Enter |
Send message |
Esc |
Return to NORMAL mode |
🏗 Architecture
Vimgram is built on a robust Rust stack:
- Grammers: Pure Rust MTProto client implementation.
- Ratatui: Advanced terminal UI rendering.
- Tokio: Async runtime for handling concurrent updates and input.
Project Structure
src/main.rs: Entry point & event loop.src/app.rs: State management (Redux-style).src/ui/: Drawing logic & layout.src/telegram/: Auth & networking layer.