Rusty Teams
A fast native Microsoft Teams chat client written in Rust with GPUI. It does chats and channels. Calls, meetings and channel tabs are planned (see ROADMAP.md).

> Unofficial. Not affiliated with or endorsed by Microsoft. It uses the same web APIs as the Teams web app, which can change at any time.
Features
- Chats and channels, with the Teams pin order, chat folders and hidden teams
- Chat menu: pin, move to folder, mark as unread, mute, hide, leave
- Live updates over the Teams realtime socket, no polling
- Send, edit, delete, react, quote-reply, @mentions
- Rich text composer: format bar over a selection,
Ctrl+B/Ctrl+I/Ctrl+U, lists, quotes, code; Markdown converts as you type or paste - Emoji by
:code with English codes and German aliases,:thumbsup:and:)convert as you type - Inline images, file cards, Adaptive Cards (layout, links, images, buttons: submit, execute, show card, toggle; task dialogs)
- Read receipts, presence (last known status shown at start), unread jump
- Select and copy message text,
Ctrl+Ain the composer - Local full-text search and a
Ctrl+Kswitcher, served from the cache - Activity bell: feed of new messages, @mentions and reactions to your messages, kept for 14 days
- Dark theme, opens instantly from the local cache
- Self-update from an update folder
Status
| Platform | State |
|---|---|
| Windows | Main target. Login through an embedded WebView2 |
| Linux | Connects to a Chrome you start with --remote-debugging-port=9222. Built-in login is planned |
How it works
Rusty Teams never sees your password and never stores a token. It signs you in through a real Teams web page and lets that page make the API calls.
+--------------------------- Rusty Teams (Rust) ---------------------------+
| app GPUI window: sidebar, chat view, composer, Ctrl+K |
| core sync engine, actions, mapping to view models |
| store SQLite cache + FTS5 search index |
| graph Microsoft Graph: chats, channels, messages, people, sending |
| chatsvc Teams chat service: realtime, pins, folders, read receipts |
| session runs requests inside the Teams page, one Transport trait |
+------------------------------------|-------------------------------------+
| DevTools protocol (CDP)
+------------------------------------v-------------------------------------+
| Hidden browser page on teams.cloud.microsoft, own profile |
| webview: WebView2 (Windows) or browser: Chrome with a debug port |
+------------------------------------|-------------------------------------+
| HTTPS with the page's own MSAL tokens
Graph | chat service (ic3) | presence | Trouter socket
Sign-in and tokens
1. A hidden browser page loads Teams web with its own profile. On Windows this is WebView2, so single sign-on with the Windows account usually just works. 2. If Teams asks for a login, the login window shows itself. After that the page stays parked in the background. 3. Every API call is sent to that page over CDP. A small script (crates/session/assets/fetch.js) picks the matching token from the page's MSAL cache, refreshes it when needed, and runs the fetch. 4. Only the response goes back to Rust. Tokens never leave the page.
Data flow
| Step | What happens |
|---|---|
| Start | The UI renders from the SQLite cache right away. A chat still syncing shows a progress line in its header and skeleton bubbles |
| Sync | core fetches chats and channels from Graph with delta queries, pins and folders from the chat service |
| Live | chatsvc keeps the Trouter WebSocket open. An event only says "something changed", the content is then fetched fresh |
| Write | Sends, edits and reactions go out through Graph or the chat service, then the cache updates |
| Search | Local FTS5 index over cached messages, no server round trip |
Crates
| Crate | Job |
|---|---|
app | GPUI desktop app, binary teams |
core | Sync engine, actions, people ranking, markdown and card rendering |
store | SQLite cache, migrations, search, image file cache |
graph | Typed Microsoft Graph client with batching and paging |
chatsvc | Teams chat service: Trouter realtime, pins, folders, receipts |
session | Transport trait, CDP session, in-page fetch |
webview | Hidden WebView2 host (Windows only) |
browser | Chrome lifecycle and watchdog for the CDP transport |
cli | teams-probe, a read-only end-to-end check |
Build and run
| Task | Command |
|---|---|
| Demo data, no account | cargo run -p app -- --demo |
| Against Chrome on a debug port | cargo run -p app -- --endpoint http://127.0.0.1:9222 |
| Windows exe from WSL/Linux | scripts/build-windows.sh crates/app teams, see docs/build-windows.md |
| Tests | cargo test |
| Screenshot without a desktop (Xvfb, xdotool, xclip, mesa-vulkan-drivers) | cargo build -p app && scripts/headless-shot.sh shot.png -- "mousemove 450 740" "click 1" "type hello" |
Docs
- ROADMAP.md - open and finished features by priority
- docs/research - how Teams does realtime, pins, read receipts and edits
- docs/design - mockups
- docs/build-windows.md - cross-compiling without admin rights
License
Source
| 1 | # Rusty Teams |
| 2 | |
| 3 | A fast native Microsoft Teams chat client written in Rust with [GPUI](https://www.gpui.rs/). |
| 4 | It does chats and channels. Calls, meetings and channel tabs are planned (see [ROADMAP.md](ROADMAP.md)). |
| 5 | |
| 6 |  |
| 7 | |
| 8 | > Unofficial. Not affiliated with or endorsed by Microsoft. It uses the same web APIs as the Teams web app, which can change at any time. |
| 9 | |
| 10 | ## Features |
| 11 | |
| 12 | - Chats and channels, with the Teams pin order, chat folders and hidden teams |
| 13 | - Chat menu: pin, move to folder, mark as unread, mute, hide, leave |
| 14 | - Live updates over the Teams realtime socket, no polling |
| 15 | - Send, edit, delete, react, quote-reply, @mentions |
| 16 | - Rich text composer: format bar over a selection, `Ctrl+B` / `Ctrl+I` / `Ctrl+U`, lists, quotes, code; Markdown converts as you type or paste |
| 17 | - Emoji by `:` code with English codes and German aliases, `:thumbsup:` and `:)` convert as you type |
| 18 | - Inline images, file cards, Adaptive Cards (layout, links, images, buttons: submit, execute, show card, toggle; task dialogs) |
| 19 | - Read receipts, presence (last known status shown at start), unread jump |
| 20 | - Select and copy message text, `Ctrl+A` in the composer |
| 21 | - Local full-text search and a `Ctrl+K` switcher, served from the cache |
| 22 | - Activity bell: feed of new messages, @mentions and reactions to your messages, kept for 14 days |
| 23 | - Dark theme, opens instantly from the local cache |
| 24 | - Self-update from an update folder |
| 25 | |
| 26 | ## Status |
| 27 | |
| 28 | | Platform | State | |
| 29 | |---|---| |
| 30 | | Windows | Main target. Login through an embedded WebView2 | |
| 31 | | Linux | Connects to a Chrome you start with `--remote-debugging-port=9222`. Built-in login is planned | |
| 32 | |
| 33 | ## How it works |
| 34 | |
| 35 | Rusty Teams never sees your password and never stores a token. |
| 36 | It signs you in through a real Teams web page and lets that page make the API calls. |
| 37 | |
| 38 | ``` |
| 39 | +--------------------------- Rusty Teams (Rust) ---------------------------+ |
| 40 | | app GPUI window: sidebar, chat view, composer, Ctrl+K | |
| 41 | | core sync engine, actions, mapping to view models | |
| 42 | | store SQLite cache + FTS5 search index | |
| 43 | | graph Microsoft Graph: chats, channels, messages, people, sending | |
| 44 | | chatsvc Teams chat service: realtime, pins, folders, read receipts | |
| 45 | | session runs requests inside the Teams page, one Transport trait | |
| 46 | +------------------------------------|-------------------------------------+ |
| 47 | | DevTools protocol (CDP) |
| 48 | +------------------------------------v-------------------------------------+ |
| 49 | | Hidden browser page on teams.cloud.microsoft, own profile | |
| 50 | | webview: WebView2 (Windows) or browser: Chrome with a debug port | |
| 51 | +------------------------------------|-------------------------------------+ |
| 52 | | HTTPS with the page's own MSAL tokens |
| 53 | Graph | chat service (ic3) | presence | Trouter socket |
| 54 | ``` |
| 55 | |
| 56 | ### Sign-in and tokens |
| 57 | |
| 58 | 1. A hidden browser page loads Teams web with its own profile. On Windows this is WebView2, so single sign-on with the Windows account usually just works. |
| 59 | 2. If Teams asks for a login, the login window shows itself. After that the page stays parked in the background. |
| 60 | 3. Every API call is sent to that page over CDP. A small script (`crates/session/assets/fetch.js`) picks the matching token from the page's MSAL cache, refreshes it when needed, and runs the `fetch`. |
| 61 | 4. Only the response goes back to Rust. Tokens never leave the page. |
| 62 | |
| 63 | ### Data flow |
| 64 | |
| 65 | | Step | What happens | |
| 66 | |---|---| |
| 67 | | Start | The UI renders from the SQLite cache right away. A chat still syncing shows a progress line in its header and skeleton bubbles | |
| 68 | | Sync | `core` fetches chats and channels from Graph with delta queries, pins and folders from the chat service | |
| 69 | | Live | `chatsvc` keeps the Trouter WebSocket open. An event only says "something changed", the content is then fetched fresh | |
| 70 | | Write | Sends, edits and reactions go out through Graph or the chat service, then the cache updates | |
| 71 | | Search | Local FTS5 index over cached messages, no server round trip | |
| 72 | |
| 73 | ### Crates |
| 74 | |
| 75 | | Crate | Job | |
| 76 | |---|---| |
| 77 | | `app` | GPUI desktop app, binary `teams` | |
| 78 | | `core` | Sync engine, actions, people ranking, markdown and card rendering | |
| 79 | | `store` | SQLite cache, migrations, search, image file cache | |
| 80 | | `graph` | Typed Microsoft Graph client with batching and paging | |
| 81 | | `chatsvc` | Teams chat service: Trouter realtime, pins, folders, receipts | |
| 82 | | `session` | `Transport` trait, CDP session, in-page fetch | |
| 83 | | `webview` | Hidden WebView2 host (Windows only) | |
| 84 | | `browser` | Chrome lifecycle and watchdog for the CDP transport | |
| 85 | | `cli` | `teams-probe`, a read-only end-to-end check | |
| 86 | |
| 87 | ## Build and run |
| 88 | |
| 89 | | Task | Command | |
| 90 | |---|---| |
| 91 | | Demo data, no account | `cargo run -p app -- --demo` | |
| 92 | | Against Chrome on a debug port | `cargo run -p app -- --endpoint http://127.0.0.1:9222` | |
| 93 | | Windows exe from WSL/Linux | `scripts/build-windows.sh crates/app teams`, see [docs/build-windows.md](docs/build-windows.md) | |
| 94 | | Tests | `cargo test` | |
| 95 | | Screenshot without a desktop (Xvfb, xdotool, xclip, mesa-vulkan-drivers) | `cargo build -p app && scripts/headless-shot.sh shot.png -- "mousemove 450 740" "click 1" "type hello"` | |
| 96 | |
| 97 | ## Docs |
| 98 | |
| 99 | - [ROADMAP.md](ROADMAP.md) - open and finished features by priority |
| 100 | - [docs/research](docs/research) - how Teams does realtime, pins, read receipts and edits |
| 101 | - [docs/design](docs/design) - mockups |
| 102 | - [docs/build-windows.md](docs/build-windows.md) - cross-compiling without admin rights |
| 103 | |
| 104 | ## License |
| 105 | |
| 106 | [MIT](LICENSE) |