Skip to main content

teams-cli

Microsoft Teams from your terminal—human-first and agent-first.

teams-cli is a Rust CLI and TUI for everyday Microsoft Teams work through supported Microsoft Graph APIs. It is designed as two equally first-class experiences over one typed core: a fast, calm terminal interface for people and a deterministic, introspectable command contract for agents. It signs in as you with delegated OAuth, protects refresh credentials in your operating system's credential store, emits readable terminal output on a TTY, and defaults to structured JSON when piped.

For humans, no arguments open guided onboarding on first use and the TUI afterward. For agents, no command ever waits for an undeclared prompt: teams schema works offline, collection sizes are caller-bounded, writes declare their effects, errors have stable kinds and exit codes, and stdout contains data only.

Install

pipx install teams-cli
# or
cargo install teams-cli --locked

The PyPI distribution is named teams-cli; the executable is teams, matching the jira-clijira and confluence-cliconfluence family.

To work from source:

cargo install --path .
# or build a local wheel
maturin build

Explore before configuring Microsoft 365

teams tui --demo
teams tui --demo --snapshot
teams capabilities
teams schema --command "messages send"

Onboarding

Run teams in a terminal on first use, or start explicitly:

teams init

You need a Microsoft Entra public-client application:

  1. In Microsoft Entra app registrations, register an app for organizational accounts.
  2. Under Authentication, add the Mobile and desktop applications redirect URI http://localhost and enable public client flows.
  3. Under API permissions, add these delegated Microsoft Graph permissions (plus the standard OpenID scopes requested at sign-in):
openid profile offline_access User.Read Team.ReadBasic.All
Channel.ReadBasic.All Chat.Read Chat.Create ChatMessage.Send
ChannelMessage.Send ChannelMessage.Read.All

Reading channel messages requires the administrator-consented ChannelMessage.Read.All permission. If the tenant has not granted it, Microsoft may require an administrator during sign-in. The CLI surfaces missing consent as a stable permission_denied error instead of silently reaching for undocumented Teams APIs.

Headless setup is explicit and never prompts:

teams init --client-id "$TEAMS_CLIENT_ID" --tenant organizations --no-login
teams auth login --device-code
teams whoami --output json

For short-lived automation, TEAMS_ACCESS_TOKEN overrides the stored credential. Refresh credentials are never written to the config file.

Everyday commands

teams list
teams channels list TEAM_ID
teams chats list --limit 25
teams messages list --chat CHAT_ID
teams messages send --chat CHAT_ID --body "On it."
printf 'Status update' | teams messages send --chat CHAT_ID --body -
teams doctor

Collection commands expose --limit and --fields; Graph-native collections use --cursor, while joined teams and channels use --offset because those endpoints do not accept $top. With a terminal they render concise text; when stdout is piped they emit JSON envelopes with continuation metadata and truncated.

Boundaries

  • Microsoft 365 work or school accounts only. The relevant Teams Graph endpoints do not support personal Microsoft accounts.
  • Calling and screen sharing are not available as a delegated user CLI; Graph calling is built around bot/application scenarios.
  • No extracted desktop tokens, browser interception, or private Teams protocols.
  • Tenant policy and admin consent can restrict delegated capabilities.

CLI Spec

teams schema is offline, unauthenticated, and follows CLI Spec v0.3: flat invocable command paths, declared effects and cardinality, bounded collections, stable error kinds and exit codes, stdout/stderr separation, and safe noninteractive behavior.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teams_cli-0.1.1.tar.gz (55.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

teams_cli-0.1.1-py3-none-win_amd64.whl (3.0 MB view details)

Uploaded Python 3Windows x86-64

teams_cli-0.1.1-py3-none-manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

teams_cli-0.1.1-py3-none-manylinux_2_28_aarch64.whl (3.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

teams_cli-0.1.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (6.3 MB view details)

Uploaded Python 3macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file teams_cli-0.1.1.tar.gz.

File metadata

  • Download URL: teams_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 55.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for teams_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8b3c5c8eec0a1543177b021ca767ca83a631b852177e416d1d2caea4c41bfe02
MD5 4777e0674bed384ddeb9273278a87cf5
BLAKE2b-256 fa8cdcf3e470480cd24d64844df936eb2892c034825f82f602b75cd9f8f4c010

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.1.tar.gz:

Publisher: release.yml on rvben/teams-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file teams_cli-0.1.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: teams_cli-0.1.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for teams_cli-0.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b8bafcd8c82751c2ed8cb93e432ea2d4e703637798d582c21716aec9991ad0c3
MD5 e8fa823ae1a61be6a6692e0e73afa126
BLAKE2b-256 a0990595178c18b2587605e40e1552bb5ab73fc20800db41dd31447a60e7a560

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.1-py3-none-win_amd64.whl:

Publisher: release.yml on rvben/teams-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file teams_cli-0.1.1-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for teams_cli-0.1.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3568dceb0edd7affeb5610f07b9775a08108b6729c8d88019ccb61d83645aa48
MD5 7c0ecea46de85cc4b1abd692a3bbe906
BLAKE2b-256 10e45e9a6d2e81be493479bb4012be091552bb1e570f933b7edec6a9c9f6f4fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.1-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on rvben/teams-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file teams_cli-0.1.1-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for teams_cli-0.1.1-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3f4d706af9b463161c75040429a8e9812b6af78fe5eb03e3d421348732a4c8de
MD5 a89375b0b5244d64d32dd71c63d52a94
BLAKE2b-256 5885e0e333cb3261b50858d2e8dd273970e1f5de3e3405a0433252d9a0458ef1

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.1-py3-none-manylinux_2_28_aarch64.whl:

Publisher: release.yml on rvben/teams-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file teams_cli-0.1.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for teams_cli-0.1.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e4729b61a1847f267ec66ca5a3d03de183a5a9d6bdede5563bca6eba11622c06
MD5 9f1590a66a60936507b8c234755f88df
BLAKE2b-256 8814bf8a52d221048d78c8aeca249e39ac3de4fe36438744e0a136929429e36e

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on rvben/teams-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.5

5 files

0.1.4

5 files

0.1.3

5 files

0.1.2

5 files

This release

0.1.1 This release

5 files

0.1.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page