Skip to main content

sharepoint-cli

Agent-friendly SharePoint Online CLI with JSON output, structured exit codes, and schema introspection.

Install

From crates.io

cargo install sharepoint-cli

From PyPI

pip install sharepoint-cli-rs
# or
uv tool install sharepoint-cli-rs

From source

git clone https://github.com/rvben/sharepoint-cli
cd sharepoint-cli
cargo install --path .

Quick start

# First-time setup: configures tenant + default site, then signs in
sharepoint init

# Or sign in to an already-configured profile
sharepoint auth login

# List followed sites
sharepoint sites list

# List libraries in a site
sharepoint drives list <site>

# Browse a library
sharepoint files ls <site>:<library>/

# Stat / download / search
sharepoint files stat   <site>:<library>/path/to/file
sharepoint files download <site>:<library>/path/to/file -o ./out.bin
sharepoint files find   <site>:<library>/ --name '*.pdf'
sharepoint doctor

For a headless or staged setup, provide the tenant and public-client application ID explicitly and defer sign-in:

sharepoint init --tenant contoso.onmicrosoft.com \
  --client-id 00000000-0000-0000-0000-000000000000 \
  --default-site Marketing --read-only --no-login
sharepoint auth login

Interactive setup reuses existing profile values as defaults. Non-interactive setup never reads prompts from piped stdin; missing values produce an actionable input error instead.

Output

  • Human output on stdout, status messages on stderr.
  • --json (or non-TTY stdout) emits machine-readable JSON on stdout.
  • --quiet suppresses status messages.
  • --no-color and the standard NO_COLOR environment variable disable ANSI output.

Suite-level discovery is available without guessing: use sharepoint doctor --offline, sharepoint schema --command 'files stat', sharepoint config show, and sharepoint completions <shell>.

Authentication and profile management follow the same suite-wide commands:

sharepoint auth status
sharepoint auth status --offline
sharepoint profile list
sharepoint profile use work
sharepoint profile remove old --yes
sharepoint config path

Configuration

Config lives at $XDG_CONFIG_HOME/sharepoint/config.toml (or ~/.config/sharepoint/config.toml). Run sharepoint config path to print the resolved location.

You must supply two things before signing in:

  • A tenant (your Microsoft 365 domain or tenant GUID).
  • A client_id for an Entra public-client app you've registered. The app needs the device-code flow enabled and delegated Files.Read.All, Sites.Read.All, and offline_access scopes. sharepoint init walks you through saving both into the active profile.

Environment overrides:

  • SHAREPOINT_PROFILE — active profile name
  • SHAREPOINT_TENANT_ID — tenant override
  • SHAREPOINT_CLIENT_ID — Entra application (client) ID — required

License

MIT

Releasing

Vership owns versioning, changelog generation, release commits, and tags. See the release runbook for the verified workflow and recovery policy.

Download files

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

Source Distribution

sharepoint_cli_rs-0.0.11.tar.gz (102.7 kB view details)

Uploaded Source

Built Distributions

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

sharepoint_cli_rs-0.0.11-py3-none-win_amd64.whl (2.8 MB view details)

Uploaded Python 3Windows x86-64

sharepoint_cli_rs-0.0.11-py3-none-manylinux_2_28_x86_64.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

sharepoint_cli_rs-0.0.11-py3-none-manylinux_2_28_aarch64.whl (2.7 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

sharepoint_cli_rs-0.0.11-py3-none-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

sharepoint_cli_rs-0.0.11-py3-none-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file sharepoint_cli_rs-0.0.11.tar.gz.

File metadata

  • Download URL: sharepoint_cli_rs-0.0.11.tar.gz
  • Upload date:
  • Size: 102.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sharepoint_cli_rs-0.0.11.tar.gz
Algorithm Hash digest
SHA256 ea5d06ecd7a6baa6c3dd07c260cda6529c3abe1336ce99f609f64cbf0c46c0d4
MD5 5988ddafdcfe593e48877e0c7f4d3ec9
BLAKE2b-256 0c4f20a01d09b6742b0ea15bf1887d53cb12fb6545feff034a1971815d33f509

See more details on using hashes here.

File details

Details for the file sharepoint_cli_rs-0.0.11-py3-none-win_amd64.whl.

File metadata

  • Download URL: sharepoint_cli_rs-0.0.11-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sharepoint_cli_rs-0.0.11-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0118ab829ee9c68930f1b40d36e5d3e9a9d2fe44213ef33b5aff1bc01066ea11
MD5 e6aaf3de0f2eebbc628a0346ac7ca8a9
BLAKE2b-256 3da2e98cb5be5cdb09583f2fd200afca0022e0a8e4afd6c70da7f4048ac82291

See more details on using hashes here.

File details

Details for the file sharepoint_cli_rs-0.0.11-py3-none-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: sharepoint_cli_rs-0.0.11-py3-none-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sharepoint_cli_rs-0.0.11-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 afed904bca36bb16372180ecc2af414864607d4e96b33c10926dcb9be009fc36
MD5 a8aacde2e7e0e591910346f58f2afc31
BLAKE2b-256 47bdea94be09397dbc97488f1738fc4585bb32105d9ed2e4234285b4e535dc71

See more details on using hashes here.

File details

Details for the file sharepoint_cli_rs-0.0.11-py3-none-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: sharepoint_cli_rs-0.0.11-py3-none-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sharepoint_cli_rs-0.0.11-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e535f7b717650e41ec50f55c4189265442a409508caafd05e5b67719addac626
MD5 d49beece57037091483ec86f6ae926c1
BLAKE2b-256 c0940ed0e612e3b9b7bc7aac80c7619cfbffad9303fcbf1eca7f404fcf762535

See more details on using hashes here.

File details

Details for the file sharepoint_cli_rs-0.0.11-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: sharepoint_cli_rs-0.0.11-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sharepoint_cli_rs-0.0.11-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 84f0d3d794ddf5ad89fa44778995f8659c5e98021edd258f5ffb3ee5120687c2
MD5 e6ff3816cc96d1842492260e6a91efad
BLAKE2b-256 ffd34e9da82708a22fc6b0c668f7a69580efd4996aca314c4a3be53da0858332

See more details on using hashes here.

File details

Details for the file sharepoint_cli_rs-0.0.11-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: sharepoint_cli_rs-0.0.11-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sharepoint_cli_rs-0.0.11-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 034a4c426b513c335ce4b7fbca2658863ed609fe61e587b1d31a8cb1e65c6f8c
MD5 40014ce77558d4afbf223549336fd1b3
BLAKE2b-256 fa129a6bb2def499a3ff182b5ad4c38e89f0b7ed3db0315421114b11b2862ac1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.11 This release

6 files

0.0.10

6 files

0.0.9

6 files

0.0.8

6 files

0.0.7

6 files

0.0.6

6 files

0.0.4

6 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