
Dingtalk Workspace Cli
Automate DingTalk contacts, calendar, todos, attendance, and approvals from the terminal or inside an AI agent workflow with JSON-first CLI output.
Overview
DingTalk Workspace CLI is an agent skill for the Build phase that manages DingTalk workspace features through the official dws CLI with JSON output for terminal and agent workflows.
Install
npx skills add https://github.com/aradotso/trending-skills --skill dingtalk-workspace-cliWhat is this skill?
- Official cross-platform DingTalk Workspace CLI with structured JSON responses for humans and LLMs
- One-line install scripts for macOS/Linux and PowerShell on Windows into ~/.local/bin
- Built-in Agent Skills installed to ~/.agents/skills/dws for out-of-the-box agent use
- Covers contacts, calendar, todos, attendance, approvals, and messaging from the command line
- Triggers include search contacts, create todos/events, and send messages via CLI
- Installs Agent Skills to ~/.agents/skills/dws
- Cross-platform installer targets ~/.local/bin
Adoption & trust: 857 installs on skills.sh; 31 GitHub stars; 0/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need DingTalk calendar, contacts, todos, or approvals in a script or agent without brittle UI automation or undocumented APIs.
Who is it for?
Solo builders automating DingTalk-heavy teams in China or hybrid orgs using CLI plus Claude Code, Cursor, or Codex.
Skip if: Teams not on DingTalk, products that only need email/Slack, or builders who refuse local binaries and PATH setup.
When should I use this skill?
Use dws when you need DingTalk from the command line, agent workflows, contact search, todos, calendar, messaging, or programmatic workspace management.
What do I get? / Deliverables
You install dws, run documented commands from the shell or agent, and get predictable JSON you can chain into larger automations.
- Working dws binary and optional ~/.agents/skills/dws agent skill install
- Scriptable JSON responses for contacts, calendar, todos, and related workspace actions
Recommended Skills
Journey fit
Dws is an integration surface you wire into products and agent stacks during implementation, not a launch or growth tactic. Canonical shelf is integrations because the skill centers on programmatic DingTalk Workspace access via the dws binary and Agent Skills install path.
How it compares
Use instead of ad-hoc browser macros when you want an official CLI with agent-oriented skills rather than a generic REST wrapper skill.
Common Questions / FAQ
Who is dingtalk-workspace-cli for?
Indie developers and small teams who standardize on DingTalk and want workspace actions callable from the terminal or from coding agents with JSON responses.
When should I use dingtalk-workspace-cli?
During Build integrations when you wire DingTalk into agents or cron jobs—search contacts, create todos or calendar events, send messages, or manage attendance and approvals programmatically.
Is dingtalk-workspace-cli safe to install?
It pulls an official installer from the DingTalk Real AI GitHub project; review the Security Audits panel on this Prism page and verify org auth policies before storing credentials on a machine.
SKILL.md
READMESKILL.md - Dingtalk Workspace Cli
# DingTalk Workspace CLI (dws) > Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection. `dws` is an officially open-sourced cross-platform CLI tool from DingTalk that unifies DingTalk's full product suite into a single binary. It is designed for both human users and AI agent workflows. Every response is structured JSON, and built-in Agent Skills let LLMs use DingTalk out of the box. --- ## Installation ### One-liner (recommended) **macOS / Linux:** ```bash curl -fsSL https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/main/scripts/install.sh | sh ``` **Windows (PowerShell):** ```powershell irm https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/main/scripts/install.ps1 | iex ``` The installer: - Auto-detects OS and architecture - Downloads a pre-compiled binary to `~/.local/bin` - Installs Agent Skills to `~/.agents/skills/dws` Add to PATH if needed: ```bash export PATH="$HOME/.local/bin:$PATH" # Add to ~/.bashrc or ~/.zshrc to persist ``` ### Build from source ```bash git clone https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli.git cd dingtalk-workspace-cli make build ./dws version ``` --- ## Prerequisites & Setup ### 1. Create a DingTalk app Go to [DingTalk Open Platform](https://open-dev.dingtalk.com/fe/app?hash=%23%2Fcorp%2Fapp#/corp/app), create an enterprise internal app, and note the **Client ID (AppKey)** and **Client Secret (AppSecret)**. ### 2. Configure redirect URL In the app's **Security Settings**, add `http://127.0.0.1` as a redirect URL. ### 3. Publish the app Go to **App Release → Version Management** and publish the app so it is active. ### 4. Whitelist (beta) During the co-creation phase, join the DingTalk DWS group and provide your Client ID and enterprise admin confirmation to be whitelisted. ### 5. Authenticate ```bash # Via CLI flags dws auth login --client-id $DWS_CLIENT_ID --client-secret $DWS_CLIENT_SECRET # Or set env vars first, then login export DWS_CLIENT_ID=your-app-key export DWS_CLIENT_SECRET=your-app-secret dws auth login ``` Tokens are stored encrypted with **PBKDF2 (600,000 iterations) + AES-256-GCM**, keyed to your device MAC address. --- ## Environment Variables | Variable | Purpose | |---|---| | `DWS_CLIENT_ID` | OAuth Client ID (DingTalk AppKey) | | `DWS_CLIENT_SECRET` | OAuth Client Secret (DingTalk AppSecret) | | `DWS_CONFIG_DIR` | Override default config directory | | `DWS_SERVERS_URL` | Custom server registry endpoint | | `DWS_TRUSTED_DOMAINS` | Comma-separated domains for bearer token (default: `*.dingtalk.com`) | | `DWS_ALLOW_HTTP_ENDPOINTS` | Set to `1` to allow HTTP on loopback (dev only) | --- ## Key Commands ### Authentication ```bash dws auth login # Authenticate via OAuth device flow dws auth logout # Remove stored credentials dws auth status # Show current auth status ``` ### Contacts ```bash # Search users dws contact user search --keyword "Alice" # List departments dws contact department list # Get user details dws contact user get --user-id <userId> ``` ### Calendar ```bash # List events dws calendar event list # Create an event dws calendar event create \ --title "Q2 Planning" \ --start "2026-04-01T10:00:00+08:00" \ --end "2026-04-01T11:00:00+08:00" \ --attendees "<userId1>,<userId2>" # Check room availability dws calendar room list ``` ### Todo ```bash # List tasks dws todo task list # Create a task dws