DingTalk Workspace CLI (dws) is an official open-source cross-platform command-line tool from DingTalk, designed to unify the full set of DingTalk product capabilities into a single software package, serving both human users and AI agent scenarios. The project requires enterprise administrator authorization to access DingTalk enterprise data and provides a support group during the co-creation phase.
Main purposes
dws allows users to directly operate various DingTalk features via the command line, such as calendar, chat, whiteboard, AI table, etc. It is suitable for both human users for daily operations and script automation, and is also specifically designed for AI agents, providing structured JSON responses and built-in Agent Skills so that agents can directly invoke DingTalk capabilities.
Main capabilities
- For human users: provides
--helpto view usage,--dry-runto preview requests,-f table/json/rawto select output format. - For AI agents: returns structured JSON responses, with built-in Agent Skills, ready to use out of the box.
- For enterprise administrators: adopts a zero-trust architecture, including OAuth device flow authentication, domain whitelisting, and least-privilege scopes, ensuring all operations are authenticated and audited.
- Multi-platform support: provides builds for Linux, macOS, Windows (amd64/arm64), and OpenHarmony (arm64). Linux binaries are based on glibc 2.17 and do not support musl distributions (such as Alpine).
- Multi-account management: supports logging in to multiple DingTalk accounts simultaneously (including multiple accounts within the same organization), and selecting the current identity via profile.
- Whiteboard features: supports standalone whiteboards and whiteboards embedded in documents, allowing content queries, creation/updates using OpenNodes, previewing changes via
+diff, rendering local SVG previews, and managing personal/team templates or using public templates. - Skill installation: provides an Agent Skills installation mechanism, which can be installed into the project or the user's global
.agents/skillsdirectory, and linked to agent directories such as Cursor and Claude.
Usage
Installation methods are diverse:
- Quick install script (Linux/macOS):
curl -fsSL .../install.sh | sh, supports selecting the skill layout (multi or mono) via the environment variableDWS_SKILL_MODE. - npm:
npm install -g dingtalk-workspace-cli, can setDWS_NO_SKILLS=1to install only the CLI binary. - Homebrew (macOS/Linux): need to add the repository tap first, then install.
- Precompiled binaries: download from GitHub Releases.
- Build from source: requires Go 1.26+, the default CGO build includes the SafeChat backend and requires a C compiler; the OpenHarmony build uses CGO_ENABLED=0.
Users in mainland China can use the Gitee mirror or npmmirror mirror to speed up installation.
Authentication process: on first use, rundws auth login, select an organization and authorize. If the organization has not enabled CLI access, you can send an access request to the administrator. Credentials are securely stored in the system Keychain, and tokens are automatically refreshed afterward.
Command usage: view command help viadws <path> --help, and obtain the agent-oriented command specification viadws schema "<path> --compact". Supportsdws upgradeto upgrade,dws auth statusto view authentication status,dws profile listManage multiple accounts.
Applicable scenarios
- Enterprise automation scripts: batch-operate DingTalk data via the command line.
- AI agent integration: provide agents with DingTalk capability invocation interfaces.
- Developer toolchain: integrate DingTalk operations into CI/CD and development workflows.
- Cross-platform management: uniformly manage DingTalk workspaces on Linux, macOS, Windows, and OpenHarmony.
Limitations
- Requires an enterprise administrator, and the organization must enable CLI permissions.
- Linux musl distributions (such as Alpine) are not supported.
- OpenHarmony builds do not support SafeChat and runtime native.
- Windows credential export/import is rejected because DPAPI protection is used.
- Cross-organization reads must be orchestrated by the agent; there is no built-in
--all-orgsoption. - Some features (such as white SVG preview) are local previews, and fidelity must be confirmed.