DingTalk Workspace CLI—dws—is a command-line interface tool officially open-sourced by DingTalk. Built in Go, it wraps DingTalk’s enterprise collaboration platform into a cross-platform CLI designed to serve both human operators and AI agents. It is not a third-party wrapper or reverse-engineered client; it’s published by DingTalk’s Real AI team and targets enterprise use cases where automation, auditability, and structured access to workplace data are required. As of now, the project has 1,693 stars on GitHub and is licensed under Apache 2.0.

What sets dws apart is its dual-purpose design: it supports interactive, human-driven workflows with features like --help, --dry-run, and flexible output formatting (-f table/json/raw), while also delivering machine-friendly JSON responses and pre-defined “Agent Skills” for integration into AI agent pipelines. It’s built for environments where access control, domain-level allowlisting, and least-privilege scoping aren’t optional—they’re foundational. Every API call passes through OAuth device-flow authentication, and no data path bypasses this layer.

Core features

  • Unified workspace access: One binary interfaces with DingTalk’s core services—including chat, calendar, contacts, documents, and task management—via official APIs.
  • Agent-ready output: All commands emit structured JSON by default, with optional table or raw formats. Built-in “Agent Skills” provide reusable, parameterized actions (e.g., dws skill send-message --to [email protected] --text "Hello").
  • Zero-trust security model: Requires enterprise admin authorization. Authentication uses OAuth device flow; domain allowlisting and granular permission scopes are enforced server-side.
  • Cross-platform support: Pre-built binaries available for macOS (Intel/Apple Silicon), Linux (amd64/arm64), and Windows (amd64).
  • Local-first tooling: No cloud-hosted proxy or SaaS layer—dws runs locally, connects directly to DingTalk’s APIs, and stores auth tokens only on the user’s machine.

Getting it running is straightforward. On macOS or Linux, run:

curl -fsSL https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/main/scripts/install.sh | sh

Windows users can use PowerShell:

irm https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/main/scripts/install.ps1 | iex

Alternative installation methods include npm install -g dingtalk-workspace-cli (requires Node.js), downloading pre-built binaries from the GitHub Releases page, or building from source with Go 1.25+. The build command is go build -o dws ./cmd, and make package triggers cross-compilation for all supported platforms. macOS users encountering quarantine warnings can remove the attribute with xattr -d com.apple.quarantine /path/to/dws.

Who this is for depends heavily on context. Enterprise administrators evaluating CLI tooling for internal automation—especially those already using DingTalk in regulated or compliance-sensitive environments—will find the zero-trust model and audit-ready flow relevant. DevOps and internal tooling teams may use dws to script onboarding, generate compliance reports, or integrate with internal dashboards. AI agent developers working with enterprise LLM orchestration (e.g., agents that schedule meetings, fetch meeting notes, or route messages) can leverage the built-in skills and deterministic JSON responses without writing custom DingTalk API wrappers. It is not aimed at casual users or small teams without DingTalk enterprise admin access—initial setup requires explicit domain-level authorization and participation in DingTalk’s co-creation program.

How it compares depends on what��s being compared. Unlike generic HTTP CLI tools like curl or httpie, dws provides DingTalk-specific abstractions, auth handling, and skill definitions out of the box. Compared to DingTalk’s official desktop or mobile apps, it trades UI polish for scriptability and composability. It’s heavier than single-purpose tools (e.g., a calendar-only CLI), but lighter than full SDK-based integrations requiring custom auth flows and response parsing. There are no widely adopted open-source DingTalk CLIs outside this project—most existing integrations are either internal, proprietary, or built on top of DingTalk’s REST API without this level of tooling standardization.

The project is in a co-creation phase: access to enterprise data requires admin consent, and support is coordinated via a dedicated DingTalk group (a QR code is provided in the README). Documentation includes a full reference, a changelog, and language-specific guides (including Chinese). The CI pipeline is public, test coverage is tracked, and contributions follow standard GitHub PR conventions.

It is not a general-purpose productivity CLI, nor does it replace DingTalk’s web or desktop clients for day-to-day interaction. It does not support consumer DingTalk accounts—only enterprise domains with admin authorization. It does not offer a web UI, plugin system, or third-party extension API.

The source is at https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli.