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.0.tar.gz (55.1 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.0-py3-none-win_amd64.whl (3.0 MB view details)

Uploaded Python 3Windows x86-64

teams_cli-0.1.0-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.0-py3-none-manylinux_2_28_aarch64.whl (3.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

teams_cli-0.1.0-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.0.tar.gz.

File metadata

  • Download URL: teams_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 55.1 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.0.tar.gz
Algorithm Hash digest
SHA256 fe2b89ed098ca627ef0fad21570c96665af92e6e0318b818f01325b6db75e896
MD5 17700972bb5fef52f4fa42b2d2fa1984
BLAKE2b-256 2e2ca37a1b5f622699e13d5f92df9c8615fc969f87fc5cc49113555758fecc9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.0.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.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: teams_cli-0.1.0-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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e35f11a52fa425a02cbb228a941eb6611c153c5563c70a2c1a748ff77a959de4
MD5 d81d30668adacbf27370134ec2265a8b
BLAKE2b-256 2078deb15c9c631648ec9acee2ed71ff8c80b7e62c1b8f4d5d1d3da86ec7b362

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.0-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.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for teams_cli-0.1.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8302b331dc2fe63ad579514cf46be2388dea7def3791bf1bf5f246247f52f931
MD5 f6ab7e663fd1c71c4ae7859e2fd8be56
BLAKE2b-256 fc80b0a5967b3b95767232dbd59bca4496ee2948b004dfc8024df81f6bdd6157

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.0-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.0-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for teams_cli-0.1.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2708dad4bb325a8f1c65e737ab093de309ad8ed0e7d66bb69ea8cb6364b06829
MD5 374a7c3c66d1afbd944a98060bf466ca
BLAKE2b-256 438900fe6ddcbfa5d57c031b86fa150955fbbad51589c21bba02a2f655c622ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.0-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.0-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.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 55b5884e8b58c26ff9e0d8af53c46193180a04dcf88ea673cc7f049fed2732b3
MD5 7443d4850e32dd5bec2ad14e777d54d0
BLAKE2b-256 f0b3960c30f991e8c9725e212bba128470f51a12482fcf67b1ab8eed0c925b1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for teams_cli-0.1.0-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

0.1.1

5 files

This release

0.1.0 This release

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