CRITICAL — Before starting, you MUST first use the Read tool to read ../zentao-shared/SKILL.md, which contains authentication, environment variable configuration, error handling, and general options descriptions.
Commands
department list— List all departmentsdepartment get— Get department details
Core Concepts
- Department: An organizational structure unit in ZenTao, used to manage the department to which a user belongs.
- Parent: Departments can have hierarchical relationships; the parent field indicates the parent department ID.
- Path: The full path of the department, such as
/1/2/3/indicates the full path from the root department to the current department.
Department Fields
| Field | Type | Description |
|---|---|---|
| id | u64 | Department ID |
| name | string | Department name |
| parent | u64 | Parent department ID (0 indicates root department) |
| order | u64 | Sort order |
| path | string | Department path, such as /1/2/ |
Common Use Cases
1. View all departments
# 列出所有部门
zentao-cli department list
2. View details of a specific department
# 获取部门详情
zentao-cli department get 1
Examples
# 列出所有部门
zentao-cli department list
# 获取部门详情
zentao-cli department get 1
Gotchas
-
Department hierarchy: Departments have hierarchical relationships; you can use the
pathfield to understand the department's full hierarchical position. -
parent=0: When
parentis 0, it indicates that the department is a root department. -
Association with users: A user's
deptfield is associated with the department ID.