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-cli → jira and confluence-cli → confluence 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:
- In Microsoft Entra app registrations, register an app for organizational accounts.
- Under Authentication, add the Mobile and desktop applications redirect URI
http://localhostand enable public client flows. - 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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe2b89ed098ca627ef0fad21570c96665af92e6e0318b818f01325b6db75e896
|
|
| MD5 |
17700972bb5fef52f4fa42b2d2fa1984
|
|
| BLAKE2b-256 |
2e2ca37a1b5f622699e13d5f92df9c8615fc969f87fc5cc49113555758fecc9b
|
Provenance
The following attestation bundles were made for teams_cli-0.1.0.tar.gz:
Publisher:
release.yml on rvben/teams-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teams_cli-0.1.0.tar.gz -
Subject digest:
fe2b89ed098ca627ef0fad21570c96665af92e6e0318b818f01325b6db75e896 - Sigstore transparency entry: 2581058438
- Sigstore integration time:
-
Permalink:
rvben/teams-cli@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rvben
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e35f11a52fa425a02cbb228a941eb6611c153c5563c70a2c1a748ff77a959de4
|
|
| MD5 |
d81d30668adacbf27370134ec2265a8b
|
|
| BLAKE2b-256 |
2078deb15c9c631648ec9acee2ed71ff8c80b7e62c1b8f4d5d1d3da86ec7b362
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teams_cli-0.1.0-py3-none-win_amd64.whl -
Subject digest:
e35f11a52fa425a02cbb228a941eb6611c153c5563c70a2c1a748ff77a959de4 - Sigstore transparency entry: 2581058444
- Sigstore integration time:
-
Permalink:
rvben/teams-cli@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rvben
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Trigger Event:
push
-
Statement type:
File details
Details for the file teams_cli-0.1.0-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: teams_cli-0.1.0-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8302b331dc2fe63ad579514cf46be2388dea7def3791bf1bf5f246247f52f931
|
|
| MD5 |
f6ab7e663fd1c71c4ae7859e2fd8be56
|
|
| BLAKE2b-256 |
fc80b0a5967b3b95767232dbd59bca4496ee2948b004dfc8024df81f6bdd6157
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teams_cli-0.1.0-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
8302b331dc2fe63ad579514cf46be2388dea7def3791bf1bf5f246247f52f931 - Sigstore transparency entry: 2581058460
- Sigstore integration time:
-
Permalink:
rvben/teams-cli@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rvben
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Trigger Event:
push
-
Statement type:
File details
Details for the file teams_cli-0.1.0-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: teams_cli-0.1.0-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2708dad4bb325a8f1c65e737ab093de309ad8ed0e7d66bb69ea8cb6364b06829
|
|
| MD5 |
374a7c3c66d1afbd944a98060bf466ca
|
|
| BLAKE2b-256 |
438900fe6ddcbfa5d57c031b86fa150955fbbad51589c21bba02a2f655c622ea
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teams_cli-0.1.0-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
2708dad4bb325a8f1c65e737ab093de309ad8ed0e7d66bb69ea8cb6364b06829 - Sigstore transparency entry: 2581058449
- Sigstore integration time:
-
Permalink:
rvben/teams-cli@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rvben
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Trigger Event:
push
-
Statement type:
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
- Download URL: teams_cli-0.1.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 6.3 MB
- Tags: Python 3, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55b5884e8b58c26ff9e0d8af53c46193180a04dcf88ea673cc7f049fed2732b3
|
|
| MD5 |
7443d4850e32dd5bec2ad14e777d54d0
|
|
| BLAKE2b-256 |
f0b3960c30f991e8c9725e212bba128470f51a12482fcf67b1ab8eed0c925b1f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teams_cli-0.1.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
55b5884e8b58c26ff9e0d8af53c46193180a04dcf88ea673cc7f049fed2732b3 - Sigstore transparency entry: 2581058455
- Sigstore integration time:
-
Permalink:
rvben/teams-cli@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rvben
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@da4e140ae6f72dbddde558aa9822d75dd2242b87 -
Trigger Event:
push
-
Statement type: