CLI
OpenAPI is meant for system integration, while the CLI is meant for "a person sitting in front of a terminal." The WinNexo CLI wraps all OpenAPI capabilities into winnexo xxx commands, so you can invoke Digital Workers, run Skills, query resources, and upload knowledge with a single command—no code and no need to look up interface docs. Its alias "Qoder Work" corresponds to that "can-do-anything" partner in the AI workspace—once you install the CLI, Qoder Work gains the real ability to operate WinNexo.
For example: every morning, if you want a "summary of yesterday's customer follow-ups," just type in the terminal winnexo skill run --skill-code daily-customer-recap --arguments '{"date":"yesterday"}' --json, get results in seconds, and redirect them to Notion / Obsidian / email—fully automated. Or, to precipitate a set of minutes into the enterprise knowledge base, winnexo knowledge-base create-text -n "Weekly Meeting Minutes" --text-content "..." --json does it in one line.
The essence of the CLI is turning WinNexo capabilities into a single command on a Unix pipe that can plug into any workflow.
CLI Command Reference
Compiled from the output of
winnexo --helpand each command's--help, covering all commands and subcommands. When invoked by an Agent, always add--jsonto obtain a structured, parseable response.
Global Options
| Option | Description |
|---|---|
-v, --version | Show the version number |
--json | JSON-format output (for AI agent consumption, passing through the raw API response directly) |
--verbose | Enable verbose output (including error stack traces) |
--server-domain <url> | WinNexo API endpoint URL (overrides the config file) |
--user-token <token> | Authentication token (overrides the config file) |
--tenant-id <id> | Tenant ID (overrides the config file, corresponds to the x-tenant-id request header) |
Command Overview
A total of 19 commands, organized by capability domain.
System & Instance (2)
| Command | Description | Subcommands |
|---|---|---|
health | Check API connection and authentication status | — |
instance | Instance information | 1 |
Chat (3)
| Command | Description | Subcommands |
|---|---|---|
chat | Converse with the AI (streaming/non-streaming, attachments, multi-turn) | — |
chat-session | Manage chat sessions | 5 |
file | File management (upload chat attachments) | 1 |
Quick Skills (1)
| Command | Description | Subcommands |
|---|---|---|
skill | Manage AI Skills | 4 |
My Resources (3)
| Command | Description | Subcommands |
|---|---|---|
personal-directory | Personal directory management | 5 |
source | Manage data sources (including personal resource creation) | 13 |
output | Output query and save | 2 |
Knowledge Base (1)
| Command | Description | Subcommands |
|---|---|---|
knowledge-base | Manage knowledge bases (including enterprise KB category management and resource upload) | 17 |
Scheduled Tasks (1)
| Command | Description | Subcommands |
|---|---|---|
scheduled-task | Manage scheduled tasks | 7 |
Primary Object Data (1)
| Command | Description | Subcommands |
|---|---|---|
object | Main object data query and favorites | 2 |
User, Credit & Billing (2)
| Command | Description | Subcommands |
|---|---|---|
user | Current user info and credits | 3 |
billing | Credit consumption billing query | 1 |
User & Permission Management (2)
| Command | Description | Subcommands |
|---|---|---|
tenant-user | Tenant user management (admin) | 6 |
user-token | Self-service user API Token management | 4 |
Organization Sync (1)
| Command | Description | Subcommands |
|---|---|---|
org-sync | Organization structure sync | 4 |
Configuration & Interactive (2)
| Command | Description | Subcommands |
|---|---|---|
config | Manage CLI configuration | 3 |
repl | Enter the interactive command line | — |
Command Details
health — Check API connection and authentication status
Verify whether the API endpoint is reachable and whether the authentication credentials are valid. On success, returns the current identity information.
winnexo health
winnexo --json healthResponse fields:
| Field | Type | Description |
|---|---|---|
callerType | string | Caller type: user / aliyun_main / aliyun_ram / service |
authSource | string | Authentication source: bearer / aliyun_gateway |
tenantId | number | Effective tenant ID |
userId | number | null | Platform user ID |
digitalEmployeeName | string | null | The currently effective Digital Worker name |
chat — Send a chat message
Start a conversational interaction with WinNexo AI. The message body is passed as a positional argument; streaming output by default; supports attachments and multi-turn continuation.
winnexo chat <message> [options] --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
<message> | Yes | Message body (positional argument) | ||
--session-id <id> | -s | No | Session ID (creates a new session if not provided) | |
--digital-employee-name <name> | -e | No | Env variable | Digital Worker name |
--content-type <type> | No | Text | Message type: Text / Markdown | |
--file <fileIds> | No | Attachment file IDs (comma-separated for multiple) | ||
--no-stream | No | Streaming by default | Disable streaming output | |
--reuse-last-session | No | false | Reuse the most recent session under this Digital Worker |
Streaming mode (default)
Outputs the AI's reply content fragments in real time, suitable for interactive scenarios.
winnexo chat "Hello"
winnexo chat "Analyze this month's sales trend" -e customer --jsonJSON-mode response:
{"content": "The complete AI reply content", "sessionId": "sess-abc123"}In non-JSON mode, content is output to the terminal in real time.
Non-streaming mode
Waits for the complete reply and returns it all at once, suitable for programmatic invocation. The response is compatible with two formats:
winnexo chat "Generate a quarterly summary" --no-stream --jsonFormat 1 (OpenAI-compatible):
{
"Code": "200",
"choices": [{"message": {"content": "The complete AI reply"}}],
"session": {"id": "sess-abc123"}
}Format 2 (legacy platform):
{
"Code": "200",
"messages": [{"role": "assistant", "content": "The complete AI reply"}],
"session": {"id": "sess-abc123"}
}Attachment conversation and multi-turn conversation
# 1. Upload a file to get the fileId
winnexo file upload --file ./report.pdf --json
# → {"Code": "200", "fileRecordId": "file-001"}
# 2. Chat with attachments (separate multiple attachments with commas)
winnexo chat "Help me summarize the key points of this report" --file file-001 --json
winnexo chat "Compare these two datasets" --file file-001,file-002 --json
# 3. Multi-turn conversation: the first turn auto-creates a session, subsequent turns pass sessionId to continue
winnexo chat "Help me look up recent customer data" --json
winnexo chat "Now group it by region" --session-id sess-abc123 --jsonchat-session — Manage chat sessions
Perform CRUD operations on chat sessions.
| Subcommand | Description |
|---|---|
list [options] | List chat sessions |
get [options] | Get session details |
update [options] | Update session information |
delete [options] | Delete a session |
stop [options] | Stop a message being generated |
chat-session list
List chat sessions, supporting keyword and Digital Worker filtering, and pagination.
winnexo chat-session list --json
winnexo chat-session list --page 2 --page-size 10 --json
winnexo chat-session list --keyword "requirement" --json
winnexo chat-session list --digital-employee-name customer --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page | |
--keyword <text> | -k | No | Search keyword | |
--digital-employee-name <name> | -e | No | Filter by Digital Worker |
Response:
{
"Code": "200",
"total": 15,
"page": 1,
"pageSize": 20,
"data": [
{
"id": "sess-001",
"title": "Sales Analysis Conversation",
"operating_object_name": "customer",
"is_expired": false,
"updated_at": 1716220800
}
]
}chat-session get
Get session details and the most recent messages.
winnexo chat-session get --session-id abc123 --json
winnexo chat-session get -s abc123 --limit 5 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--session-id <id> | -s | Yes | Session ID | |
--limit <num> | -l | No | 10 | Number of recent messages to return (0–20) |
Response:
{
"Code": "200",
"session": {"id": "sess-001", "title": "Sales Analysis Conversation", "is_expired": false, "created_at": 1716220800},
"messages": [
{"role": "user", "content": "Analyze the sales data", "status": "completed"},
{"role": "assistant", "content": "Based on the data...", "status": "completed"}
]
}chat-session update
Update the session title or model.
winnexo chat-session update --session-id abc123 --title "New Title" --json
winnexo chat-session update --session-id abc123 --model model_max --json
winnexo chat-session update -s abc123 -t "New Title" -m model_flash --json| Option | Alias | Required | Description |
|---|---|---|---|
--session-id <id> | -s | Yes | Session ID |
--title <title> | -t | No | New title |
--model <model> | -m | No | Abstract model name: model_flash / model_plus / model_max |
chat-session delete
Delete a session.
winnexo chat-session delete --session-id abc123 --json| Option | Alias | Required | Description |
|---|---|---|---|
--session-id <id> | -s | Yes | Session ID |
Response:
{"Code": "200", "hardDelete": true}chat-session stop
Stop a message being generated.
winnexo chat-session stop --session-id abc123 --json
winnexo chat-session stop -s abc123 --reason "No longer needed" --json| Option | Alias | Required | Description |
|---|---|---|---|
--session-id <id> | -s | Yes | Session ID |
--reason <text> | No | Reason for stopping |
file — File management
Manage files used in chats. file upload is for chat attachments (referenced via chat --file), which is a different scenario from creating personal resources with the source create-* series.
| Subcommand | Description |
|---|---|
upload [options] | Upload a file for chat |
file upload
Upload a local file to get a fileRecordId for reference by chat --file.
winnexo file upload --file ./report.pdf --json
winnexo file upload -f ./data.csv -o customer --json| Option | Alias | Required | Description |
|---|---|---|---|
--file <path> | -f | Yes | Local file path |
--operating-object-name <name> | -o | No | Digital Worker name (auto-resolved by the CLI) |
Response:
{"Code": "200", "fileRecordId": "file-001", "fileName": "report.pdf"}
fileRecordIdis used for reference by thechat --fileparameter.file uploadis only for chat attachments and does not create a personal resource; to save as a personal resource, use thesource get-upload-signature+source create-fileflow.
skill — Manage AI Skills
Skill query and execution. list / get are for discovering Skills, and run executes a Skill (streaming supported).
| Subcommand | Description |
|---|---|
list [options] | List available Skills |
get [options] | Get Skill details |
run [options] | Execute a specified Skill |
run-status [options] | Query Skill execution status |
skill list
List the currently available Skills.
winnexo skill list --json
winnexo skill list --keyword "report" --page 1 --page-size 20 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--keyword <text> | -k | No | Search keyword | |
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page |
Response:
{
"Code": "200",
"total": 8,
"data": [
{"skillCode": "daily-report", "skillName": "Daily Report Generation", "description": "Generate a daily sales report"}
]
}skill get
Get detailed information about a Skill (parameter schema, etc.).
winnexo skill get --skill-code daily-report --json| Option | Alias | Required | Description |
|---|---|---|---|
--skill-code <code> | -c | Yes | Unique Skill identifier code |
skill run
Execute a specified Skill. Parameters are passed as a JSON string; streaming output is supported.
winnexo skill run --skill-code daily-report --json
winnexo skill run -c daily-report -a '{"date":"2024-05-01","region":"East China"}' --json
winnexo skill run -c weekly-summary --arguments '{"week":24}' --no-stream --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--skill-code <code> | -c | Yes | Unique Skill identifier code | |
--arguments <json> | -a | No | Skill parameters (JSON string) | |
--no-stream | No | Streaming by default | Disable streaming output |
skill runuses streaming output by default (showing the execution process in real time). Add--no-streamto wait for the final result in a script.
skill run-status
Query the execution status of an async Skill.
winnexo skill run-status --task-id task-abc123 --json| Option | Alias | Required | Description |
|---|---|---|---|
--task-id <id> | -t | Yes | Skill execution task ID |
scheduled-task — Manage scheduled tasks
Full lifecycle management of scheduled tasks, supporting 7 subcommands.
| Subcommand | Description |
|---|---|
list [options] | List scheduled tasks |
get [options] | Get task details |
create [options] | Create a scheduled task |
update [options] | Update a scheduled task |
delete [options] | Delete a scheduled task |
toggle [options] | Enable/disable a task |
run [options] | Run a task immediately |
scheduled-task list
List scheduled tasks.
winnexo scheduled-task list --json
winnexo scheduled-task list --page 1 --page-size 20 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page |
scheduled-task get
Get scheduled task details.
winnexo scheduled-task get --task-id task-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--task-id <id> | -t | Yes | Task ID |
scheduled-task create
Create a scheduled task.
winnexo scheduled-task create \
--name "Daily Sales Brief" \
--cron "0 9 * * *" \
--content "Generate yesterday's sales data brief and push to DingTalk" \
--json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--name <name> | -n | Yes | Task name | |
--cron <expr> | -c | Yes | Cron expression | |
--content <text> | Yes | Task content description | ||
--digital-employee-name <name> | -e | No | Digital Worker name | |
--enabled <bool> | No | true | Whether enabled |
scheduled-task update
Update a scheduled task's configuration.
winnexo scheduled-task update --task-id task-001 --name "New Name" --json
winnexo scheduled-task update -t task-001 --cron "0 18 * * *" --json| Option | Alias | Required | Description |
|---|---|---|---|
--task-id <id> | -t | Yes | Task ID |
--content <text> | No | Task content description | |
--enabled <bool> | No | Whether enabled |
scheduled-task — Manage scheduled tasks
Manage the creation, updating, querying of scheduled tasks and tracking of execution records.
| Subcommand | Description |
|---|---|
list [options] | Query the scheduled task list |
understand [options] | Parse natural-language task intent (must be called before creating) |
create [options] | Create a scheduled task |
update [options] | Update a scheduled task |
execute [options] | Execute a scheduled task immediately |
execution-records | Query execution records by Digital Worker |
execution-detail [options] | Get details of a single execution |
Common data structure · SegmentItem (rich-text message segment) — the --segments and --description fields are arrays of SegmentItem:
| Field | Type | Description |
|---|---|---|
type | string | Required. text / web_search / mention / skill |
content | string | Text content, required when type=text |
enabled | boolean | Feature toggle, optional when type=web_search |
name | string | Object or Skill name |
objectId | string | Object ID, present when type=mention |
objectType | string | Object type, present when type=mention |
skillCode | string | Skill code, present when type=skill |
Common data structure · TriggerConfig — the --trigger-config field:
| Field | Type | Description |
|---|---|---|
triggerMode | string | Required. manual / scheduled |
cron | string | Cron expression, required in scheduled mode, e.g. "00 09 * * *" |
timezoneandlanguageare automatically injected by the server.
Common data structure · TaskDetail — the --task-detail field, returned by understand and passed back as-is:
| Field | Type | Description |
|---|---|---|
taskUnderstand | string | LLM-polished task understanding |
relatedSemantics | array | Semantic entities (entity/attributes) |
relatedObjects | array | Related objects (name/objectId/objectType/mentionType) |
relatedSkills | array | Related Skills (name/displayName/skillCode/sourceIds) |
scheduled-task list
winnexo scheduled-task list --json
winnexo scheduled-task list -k "daily" --page 1 --page-size 20 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page | |
--keyword <text> | -k | No | Fuzzy search by task name | |
--digital-employee-name <name> | No | Filter by Digital Worker |
scheduled-task understand
Must be called before creating a task.
winnexo scheduled-task understand --user-input "Send sales daily at 9 AM" --json| Option | Required | Description |
|---|---|---|
--user-input <text> | Yes | Natural-language task description |
--digital-employee-name <name> | No | Digital Worker name |
--segments <json> | No | Additional rich-text segments |
Response fields correspond one-to-one with TaskDetail; pass them back as-is when creating.
scheduled-task create
winnexo scheduled-task create \
--name "Daily Sales Report" \
--description '[{"type":"text","content":"Send sales daily at 9 AM"}]' \
--trigger-config '{"triggerMode":"scheduled","cron":"00 09 * * *"}' \
--task-detail '{"taskUnderstand":"...","relatedSemantics":[],"relatedObjects":[],"relatedSkills":[]}' \
--json| Option | Alias | Required | Description |
|---|---|---|---|
--name <name> | -n | Yes | Task name (up to 50 chars) |
--digital-employee-name <name> | No | Digital Worker name | |
--description <json> | No | SegmentItem array (shown to user) | |
--segments <json> | No | Rich-text segments sent to AI | |
--trigger-config <json> | No | TriggerConfig object | |
--task-detail <json> | No | TaskDetail object (from understand) | |
--no-is-open | No | Disable after creation |
scheduled-task update
winnexo scheduled-task update --task-id task-001 \
--trigger-config '{"triggerMode":"scheduled","cron":"00 10 * * *"}' --json
winnexo scheduled-task update --task-id task-001 --is-open --json
winnexo scheduled-task update --task-id task-001 --no-is-open --json| Option | Required | Description |
|---|---|---|
--task-id <id> | Yes | Task ID |
--name <name> | No | New task name |
--description <json> | No | New task description |
--segments <json> | No | New message segments |
--trigger-config <json> | No | New trigger configuration |
--task-detail <json> | No | New task details |
--is-open | No | Enable the task |
--no-is-open | No | Disable the task |
scheduled-task execute
Manually trigger a task without waiting for Cron.
winnexo scheduled-task execute --task-id task-001 --json| Option | Required | Description |
|---|---|---|
--task-id <id> | Yes | Task ID |
scheduled-task execution-records
Query execution records by Digital Worker.
winnexo scheduled-task execution-records --jsonscheduled-task execution-detail
Get details of a single execution.
winnexo scheduled-task execution-detail --execution-id exec-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--execution-id <id> | -e | Yes | Execution ID |
object — Main object data query and favorites
| Subcommand | Description |
|---|---|
list [options] | Query main object list data |
favorite [options] | Favorite or unfavorite an object |
object list
winnexo object list --object-type company --json
winnexo object list -t company --page 1 --page-size 20 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--object-type <type> | -t | Yes | Object type identifier | |
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page |
object favorite
winnexo object favorite --object-type company --object-id obj-001 --favorite --json
winnexo object favorite -t company -i obj-001 --no-favorite --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--object-type <type> | -t | Yes | Object type identifier | |
--object-id <id> | -i | Yes | Object ID | |
--favorite | No | true | Favorite the object | |
--no-favorite | No | Unfavorite the object |
output — Output query and save
| Subcommand | Description |
|---|---|
list [options] | Query the output list |
save [options] | Save an output to a personal directory |
output list
winnexo output list --json
winnexo output list --page 1 --page-size 20 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page |
output save
winnexo output save --output-id out-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--output-id <id> | -o | Yes | Output ID |
personal-directory — Personal directory management
| Subcommand | Description |
|---|---|
list [options] | List personal directories |
create [options] | Create a directory |
rename [options] | Rename a directory |
move [options] | Move a directory |
delete [options] | Delete a directory |
personal-directory list
winnexo personal-directory list --jsonpersonal-directory create
winnexo personal-directory create --name "Project Docs" --json
winnexo personal-directory create -n "Sub" --parent-id dir-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--name <name> | -n | Yes | Directory name |
--parent-id <id> | No | Parent directory ID (root if omitted) |
personal-directory rename
winnexo personal-directory rename --directory-id dir-001 --name "New Name" --json| Option | Alias | Required | Description |
|---|---|---|---|
--directory-id <id> | -d | Yes | Directory ID |
--name <name> | -n | Yes | New name |
personal-directory move
winnexo personal-directory move --directory-id dir-002 --target-parent-id dir-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--directory-id <id> | -d | Yes | Directory to move |
--target-parent-id <id> | No | Target parent (root if omitted) |
personal-directory delete
winnexo personal-directory delete --directory-id dir-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--directory-id <id> | -d | Yes | Directory ID |
items[].outputItems[].itemIdis the output detail ID, used foroutput save's--item-ids.
output save
Batch-save output details as the current user's personal resources.
winnexo output save --item-ids item-001 --mode link --json
winnexo output save --item-ids item-001,item-002,item-003 --mode copy --json
winnexo output save --item-ids item-001 --mode link --directory-id dir-123 --json| Option | Required | Description |
|---|---|---|
--item-ids <ids> | Yes | Output detail ID list, comma-separated, max 50 per batch |
--mode <mode> | Yes | Save method: link (idempotent) / copy (snapshot) |
--directory-id <id> | No | Target personal directory ID; uses default if omitted |
link— Creates a link to the original output, idempotent, updates with the originalcopy— Creates an independent snapshot, does not change with the original
personal-directory — Personal directory management (detailed)
| Subcommand | Description |
|---|---|
create [options] | Create a directory under personal resources |
list [options] | Drill-down query of directory contents |
update [options] | Update directory info |
move-resource [options] | Move a resource between directories |
retry-failed [options] | Retry all failed data sources in a directory |
personal-directory create
winnexo personal-directory create --name "Project Files" --json
winnexo personal-directory create --name "Weekly" --parent-directory-id dir_abc123 --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Auto | Digital Worker name (auto-resolved) |
--name <name> | -n | Yes | Directory name |
--parent-directory-id <id> | No | Parent directory ID; root if omitted | |
--description <text> | No | Directory description |
personal-directory list
winnexo personal-directory list --directory-id root --json
winnexo personal-directory list --directory-id dir_abc123 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--directory-id <id> | -d | Yes | Directory ID; pass "root" for root | |
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page | |
--sort-field <field> | No | name | Sort field | |
--sort-order <order> | No | asc | Sort direction | |
--source-types <json> | No | Resource type filter JSON array |
personal-directory update
winnexo personal-directory update --directory-id dir_abc123 --name "New Name" --json| Option | Alias | Required | Description |
|---|---|---|---|
--directory-id <id> | -d | Yes | Directory unique ID |
--name <name> | -n | No | New name |
--description <text> | No | New description |
personal-directory move-resource
winnexo personal-directory move-resource \
--source-directory-id dir_abc \
--target-directory-id dir_xyz \
--source-id src-001 --json| Option | Required | Description |
|---|---|---|
--source-directory-id <id> | Yes | Source directory ID |
--target-directory-id <id> | Yes | Target directory ID |
--source-id <id> | Yes | Resource ID to move |
personal-directory retry-failed
winnexo personal-directory retry-failed --directory-id dir_abc123 --json| Option | Alias | Required | Description |
|---|---|---|---|
--directory-id <id> | -d | Yes | Directory ID (recursively includes subdirectories) |
source — Manage data sources (including personal resource creation)
Resource details, uploading various personal resources (text/file/online doc/meeting), renaming, object binding, and preview.
| Subcommand | Description |
|---|---|
get [options] | Get resource details |
get-upload-signature [options] | Get OSS direct-upload signature |
create-text [options] | Upload a text resource |
create-file [options] | Upload a file resource |
create-aliding-doc [options] | Upload an AliDing online document |
create-aliding-kb [options] | Create an AliDing knowledge base |
create-aliding-meeting [options] | Upload an AliDing meeting |
create-dingtalk-meeting [options] | Upload a DingTalk meeting |
create-feishu-minute [options] | Upload a Feishu Minute |
create-voice-meeting [options] | Upload an offline meeting |
rename [options] | Rename a data source |
replace-bindings [options] | Fully replace data source object bindings |
preview [options] | Preview personal KB knowledge content |
source get
winnexo source get --source-id src-001 --json
winnexo source get --source-id src-001 --include-details --json| Option | Required | Description |
|---|---|---|
--source-id <id> | Yes | Resource ID |
--include-details | No | Include detailed config (settings/notes/structuredTables/unstructuredDocs) |
source get-upload-signature
Get a pre-signed URL for direct PUT upload to OSS.
winnexo source get-upload-signature --filename report.pdf --json| Option | Required | Description |
|---|---|---|
--filename <name> | Yes | File name (with extension) |
--operating-object-name <name> | No | Digital Worker name |
--expires <seconds> | No | Signature expiration (60-86400, default 3600) |
--content-type <type> | No | File Content-Type (auto-inferred if omitted) |
--scope <scope> | No | Resource scope: source (personal) / knowledge (enterprise KB) |
Upload flow:
get-upload-signature→ PUT to the returneduploadSignatureUrl→ callsource create-filewithfileUrl/filePath.
source create-text
winnexo source create-text -o customer -n "Meeting Notes" --text-content "Today we discussed Q3 plans..." --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--name <name> | -n | Yes | Resource display name |
--text-content <text> | Yes | Plain text body | |
--directory-id <id> | No | Target personal directory ID | |
--description <text> | No | Resource description |
source create-file
winnexo source create-file -o customer -n "Report" \
--file-path "uploads/2026/06/file.pdf" --file-record-id record-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--name <name> | -n | Yes | Resource display name |
--file-path <path> | Yes | File OSS persistent path | |
--file-public-url <url> | No | Public file URL (with signature) | |
--file-name <name> | No | Original file name (with extension) | |
--file-ext <ext> | No | File extension (e.g. pdf, docx) | |
--file-record-id <id> | No | File record ID | |
--directory-id <id> | No | Target personal directory ID |
source create-aliding-doc
winnexo source create-aliding-doc -o customer -n "Product Design Doc" \
--file-public-url "https://alidocs.dingtalk.com/i/nodes/xxx" --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--name <name> | -n | Yes | Resource display name |
--file-public-url <url> | Yes | AliDing online document public URL | |
--directory-id <id> | No | Target personal directory ID |
source create-aliding-kb
winnexo source create-aliding-kb -o customer \
--kb-url "https://alidocs.dingtalk.com/i/nodes/xxx" --sync-enabled --sync-cron "0 0 * * *" --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--kb-url <url> | Yes | AliDing knowledge base public URL | |
--kb-name <name> | No | KB display name; back-filled by server if omitted | |
--directory-id <id> | No | Target personal directory ID | |
--sync-enabled | No | Enable scheduled sync | |
--sync-cron <cron> | No | Cron expression (required when --sync-enabled) |
source create-aliding-meeting
winnexo source create-aliding-meeting -o customer -n "Weekly Meeting" \
--oss-url "https://oss.example.com/audio.mp3" --shanji-url "https://shanji.example.com/xxx" --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--name <name> | -n | Yes | Resource display name |
--oss-url <url> | Yes | Public audio/video OSS URL | |
--shanji-url <url> | Yes | Original Shanji link | |
--directory-id <id> | No | Target personal directory ID | |
--notes <text> | No | Meeting notes (optional, assists analysis) |
source create-dingtalk-meeting
winnexo source create-dingtalk-meeting -o customer -n "DingTalk Weekly" --room-code 123456789 --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--name <name> | -n | Yes | Resource display name |
--room-code <code> | Yes | DingTalk meeting room code | |
--credential-id <id> | No | Credential ID (uses system default if omitted) | |
--directory-id <id> | No | Target personal directory ID | |
--notes <text> | No | Meeting notes (optional) |
source create-feishu-minute
winnexo source create-feishu-minute -o customer -n "Feishu Minute" \
--minute-token abc123token --credential-id cred-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--name <name> | -n | Yes | Resource display name |
--minute-token <token> | Yes | Feishu Minute token (unique identifier) | |
--credential-id <id> | Yes | Credential ID | |
--directory-id <id> | No | Target personal directory ID |
source create-voice-meeting
Upload an offline meeting.
winnexo source create-voice-meeting -o customer -n "Offline Recording" \
--file-url "https://oss.example.com/meeting.mp3" --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--name <name> | -n | Yes | Resource display name |
--file-url <url> | Yes | Offline meeting audio file URL | |
--directory-id <id> | No | Target personal directory ID |
source rename
winnexo source rename --source-id src-001 --new-name "New Name" --json| Option | Alias | Required | Description |
|---|---|---|---|
--source-id <id> | -s | Yes | Data source ID |
--new-name <name> | -n | Yes | New data source name |
source replace-bindings
Fully replace data source object bindings.
winnexo source replace-bindings --source-id src-001 \
--object-bindings '[{"objectType":"customer","objectId":"c1"}]' --json
# Clear all bindings
winnexo source replace-bindings --source-id src-001 --object-bindings '[]' --json| Option | Alias | Required | Description |
|---|---|---|---|
--source-id <id> | -s | Yes | Data source ID |
--object-bindings <json> | Yes | JSON array with objectType/objectId; pass [] to clear |
source preview
Preview personal KB knowledge content (only your own resources).
winnexo source preview --source-id src-001 --json| Option | Required | Description |
|---|---|---|
--source-id <id> | Yes | Knowledge ID (data source unique identifier) |
Key fields: previewType (OSS_IMM / IMAGE / AUDIO / VIDEO / HTML / DING_TALK / VOICE_MEETING / CONTENT), previewUrl (preview link for non-CONTENT types), content (text content for CONTENT type), publicUrl (public file URL).
All
create-*resource commands are async; initial status is usuallyPENDING, then transitions toREADYorFAILED; poll withsource get --source-id <id>.
knowledge-base — Manage knowledge bases
Query, categorize, and upload resources to enterprise knowledge bases.
| Subcommand | Description |
|---|---|
list [options] | Admin query of enterprise KBs (no permission filtering) |
visible-list [options] | Query KBs visible to a Digital Worker (USE permission filtered) |
visible-contents [options] | Drill-down query of visible KB contents |
submit-source [options] | Submit a personal resource to an enterprise KB |
create-aliding [options] | Create an AliDing KB to personal resources |
move-resource [options] | Move a resource between enterprise KB directories |
rename-source [options] | Rename an enterprise KB data source |
retry-failed [options] | Retry all failed data sources in a directory |
update-source-tags [options] | Update data source tags |
create-directory [options] | Create an enterprise KB category |
update-directory [options] | Update an enterprise KB category |
list-directories [options] | Get enterprise KB category list |
get-source [options] | Get enterprise KB knowledge details |
preview-source [options] | Preview enterprise KB knowledge content |
create-text [options] | Upload plain text to enterprise KB |
create-file [options] | Upload a file to enterprise KB |
create-aliding-doc [options] | Upload an AliDing doc to enterprise KB |
knowledge-base list
Admin query, no permission filtering, supports directory drill-down.
winnexo knowledge-base list --json
winnexo knowledge-base list --keyword "product" --json
winnexo knowledge-base list --directory-id kb-dir-001 --source-types '["FILE"]' --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--directory-id <id> | -d | No | Directory ID; empty or root returns KB list, otherwise drills down | |
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page | |
--sort-field <field> | No | name | Sort field | |
--sort-order <order> | No | asc | Sort direction | |
--keyword <text> | -k | No | Search keyword (only effective at KB list level) | |
--source-types <json> | No | Resource type filter, JSON array |
knowledge-base visible-list
Filtered by USE permission, returns the KBs accessible to a Digital Worker.
winnexo knowledge-base visible-list -o customer --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
directoryIdis used forvisible-contentsdrill-down.
knowledge-base visible-contents
Drill-down query of visible KB contents.
winnexo knowledge-base visible-contents -o customer -d kb-001 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name | |
--directory-id <id> | -d | Yes | KB directory ID | |
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page | |
--sort-field <field> | No | name | Sort field | |
--sort-order <order> | No | asc | Sort direction | |
--source-types <json> | No | Resource type filter |
knowledge-base submit-source
Submit a personal resource to an enterprise KB directory.
winnexo knowledge-base submit-source --source-id src-001 --target-directory-id kb-dir-002 --json| Option | Alias | Required | Description |
|---|---|---|---|
--source-id <id> | -s | Yes | Personal resource ID |
--target-directory-id <id> | -t | Yes | Target enterprise KB directory ID |
knowledge-base create-aliding
Create an AliDing KB from a URL to personal resources; content synced asynchronously.
winnexo knowledge-base create-aliding -o customer --kb-url "https://alidocs.dingtalk.com/i/nodes/xxx" --json| Option | Alias | Required | Description |
|---|---|---|---|
--operating-object-name <name> | -o | Yes | Digital Worker name |
--kb-url <url> | Yes | AliDing KB public URL | |
--kb-name <name> | No | Display name (fetched remotely if omitted) | |
--directory-id <id> | No | Target personal directory ID | |
--object-bindings <json> | No | Object bindings JSON array | |
--sync-config <json> | No | Scheduled sync config, e.g. {"enabled":true,"cron":"0 0 * * *"} |
Initial status is
RUNNING; transitions toREADYorFAILEDafter sync. Poll viapersonal-directory list.
knowledge-base move-resource
winnexo knowledge-base move-resource \
--source-directory-id kb-dir-001 --target-directory-id kb-dir-002 \
--source-id src-001 --knowledge-id kb-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--source-directory-id <id> | Yes | Source directory ID | |
--target-directory-id <id> | Yes | Target directory ID | |
--source-id <id> | -s | Yes | Resource ID to move |
--knowledge-id <id> | -k | Yes | Target KB ID |
knowledge-base rename-source
winnexo knowledge-base rename-source --source-id src-001 --new-name "New Name" --json| Option | Alias | Required | Description |
|---|---|---|---|
--source-id <id> | -s | Yes | Data source ID |
--new-name <name> | -n | Yes | New name |
knowledge-base retry-failed
winnexo knowledge-base retry-failed --directory-id kb-dir-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--directory-id <id> | -d | Yes | Enterprise KB directory ID (recursive) |
knowledge-base update-source-tags
winnexo knowledge-base update-source-tags --source-id src-001 --source-tags '["FAQ","Important"]' --json| Option | Alias | Required | Description |
|---|---|---|---|
--source-id <id> | -s | Yes | Data source ID |
--source-tags <json> | No | JSON string list; pass empty to clear tags |
knowledge-base create-directory
winnexo knowledge-base create-directory --name "Product Docs" --json| Option | Alias | Required | Description |
|---|---|---|---|
--name <name> | -n | Yes | Category name |
--parent-directory-id <id> | No | Parent category ID; root if omitted | |
--description <text> | No | Category description |
knowledge-base update-directory
winnexo knowledge-base update-directory --directory-id kb-dir-001 --name "New Category" --json| Option | Alias | Required | Description |
|---|---|---|---|
--directory-id <id> | -d | Yes | Category ID to update |
--name <name> | -n | No | New category name |
--description <text> | No | New description | |
--parent-directory-id <id> | No | New parent category ID |
knowledge-base list-directories
winnexo knowledge-base list-directories --json
winnexo knowledge-base list-directories --directory-id kb-dir-001 --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--directory-id <id> | -d | No | Parent category ID; returns root tree if omitted | |
--sort-field <field> | No | gmt_create | Sort field | |
--sort-order <order> | No | desc | Sort direction |
knowledge-base get-source
winnexo knowledge-base get-source --source-id src-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--source-id <id> | -s | Yes | Knowledge ID |
knowledge-base preview-source
Preview enterprise KB knowledge content (requires DEVELOPMENT_KB_VIEW permission).
winnexo knowledge-base preview-source --source-id src-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--source-id <id> | -s | Yes | Knowledge ID |
Key fields: previewType (OSS_IMM / IMAGE / AUDIO / VIDEO / HTML / DING_TALK / VOICE_MEETING / CONTENT), previewUrl, content, fileName, fileExt, publicUrl.
knowledge-base create-text
winnexo knowledge-base create-text -n "FAQ" --text-content "Frequently asked questions..." --json| Option | Alias | Required | Description |
|---|---|---|---|
--name <name> | -n | Yes | Resource display name |
--text-content <text> | Yes | Plain text body | |
--operating-object-name <name> | -o | No | Digital Worker name |
--directory-id <id> | -d | No | Target directory ID |
--knowledge-id <id> | No | Knowledge base ID | |
--source-tags <json> | No | Resource tags JSON list |
knowledge-base create-file
winnexo knowledge-base create-file -n "Manual.pdf" --file-path "uploads/2026/06/manual.pdf" --directory-id kb-dir-001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--name <name> | -n | Yes | Resource display name |
--file-path <path> | Yes | File OSS persistent path | |
--operating-object-name <name> | -o | No | Digital Worker name |
--file-public-url <url> | No | Public file URL | |
--file-name <name> | No | Original file name | |
--file-ext <ext> | No | File extension | |
--file-record-id <id> | No | File record ID | |
--directory-id <id> | -d | No | Target directory ID |
--knowledge-id <id> | No | Knowledge base ID | |
--source-tags <json> | No | Resource tags JSON list |
knowledge-base create-aliding-doc
winnexo knowledge-base create-aliding-doc -n "Product Design" --file-public-url "https://alidocs.dingtalk.com/i/nodes/xxx" --json| Option | Alias | Required | Description |
|---|---|---|---|
--name <name> | -n | Yes | Resource display name |
--file-public-url <url> | Yes | AliDing online document public URL | |
--operating-object-name <name> | -o | No | Digital Worker name |
--directory-id <id> | -d | No | Target directory ID |
--knowledge-id <id> | No | Knowledge base ID | |
--source-tags <json> | No | Resource tags JSON list |
user — Current user info and credits
Manage the current logged-in user's own info and credits (for managing other users in the tenant, use tenant-user).
| Subcommand | Description |
|---|---|
get | Get current user info |
update [options] | Update user info |
credits | Query credit usage |
user get
winnexo user get --jsonuser update
Update user info. At least one option must be provided.
winnexo user update --name "New Name" --json
winnexo user update --language-preference zh-CN --profile-role-info "Product Manager" --json| Option | Alias | Required | Description |
|---|---|---|---|
--name <name> | -n | No | Display name |
--avatar <url> | No | Avatar URL | |
--language-preference <lang> | No | Language preference (zh-CN / en-US) | |
--profile-role-info <text> | No | User role description (max 100 chars) | |
--offering <text> | No | Capabilities/service description (max 1000 chars) | |
--self-introduction <text> | No | Self-introduction (max 1000 chars) |
user credits
Query credit usage.
winnexo user credits --json| Field | Type | Description |
|---|---|---|
creditLimit | number | Formal credit limit |
usedCredits | number | Used formal credits |
remainingCredits | number | Remaining formal credits |
shadowCreditLimit | number | Shadow credit limit (trial credits not actually charged) |
shadowUsedCredits | number | Used shadow credits |
shadowRemainingCredits | number | Remaining shadow credits |
instance — Instance information
| Subcommand | Description |
|---|---|
expire-time | Query instance expiration time |
instance expire-time
winnexo instance expire-time --jsonbilling — Credit billing query
Billing records the credit details consumed by every operation on the platform.
| Subcommand | Description |
|---|---|
list [options] | Paginated billing list query |
billing list
Paginated billing query with filters for user, operation type, status, time range, and biz source.
winnexo billing list --json
winnexo billing list --page 2 --page-size 50 --no-ignore-zero --json
winnexo billing list --start-time 2026-05-01T00:00:00Z --end-time 2026-05-31T23:59:59Z --json
winnexo billing list --operation CHAT --status COMPLETED --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page | |
--user-id <id> | No | Filter by user ID | ||
--operation <type> | No | Filter by operation type | ||
--status <status> | No | Filter by status | ||
--start-time <datetime> | No | Start time (ISO 8601) | ||
--end-time <datetime> | No | End time (ISO 8601) | ||
--biz-type <type> | No | Filter by biz source type | ||
--biz-id <id> | No | Filter by biz source ID | ||
--no-ignore-zero | No | Show all records (including credit=0); by default credit=0 records are filtered out |
totalCreditCostis a string decimal (e.g."1.5") for precision;isShadow=truemeans shadow billing (not actually charged). Default filters out credit=0 records.
config — Manage CLI configuration
Manages configuration stored in ~/.winnexo/config.json.
| Subcommand | Description |
|---|---|
set <key> <value> | Set a config value |
get <key> | Get a config value |
list | List all config |
config set
winnexo config set server_domain https://api.winnexo.com
winnexo config set user_token wn_xxxxxxxxxxxxconfig get
winnexo config get server_domainconfig list
winnexo config listrepl — Enter the interactive command line
Enter REPL interactive mode; text input is sent as a message (streamed), first input auto-creates a session.
winnexo replBuilt-in commands:
| Command | Description |
|---|---|
/help | Show help |
/status | View current session state (session ID, Digital Worker, message count) |
/new | Start a new session (clear current sessionId) |
/clear | Clear screen |
/e <name> | Set Digital Worker (aliases: /employee, /digital-employee-name) |
/exit | Exit REPL (alias: /quit, or press Ctrl+D) |
Agents should not use
repl; use thechatcommand with--jsoninstead.
org-sync — Organization structure sync
Enumerate sync configs, register custom organizations, push department trees and member relationships, and query sync task results.
| Subcommand | Description |
|---|---|
list-configs | Enumerate available sync configs (saml/oauth2/wecom/custom) |
create-custom [options] | Register a purely custom organization |
sync [options] | Push department tree + member relationships (async task) |
query [options] | Query sync task results |
org-sync list-configs
winnexo org-sync list-configs --jsonorg-sync create-custom
Register a purely custom organization. Note: custom organizations only support department tree sync, not member relationship sync.
winnexo org-sync create-custom --corp-id my-org --corp-name "My Organization" --json| Option | Required | Description |
|---|---|---|
--corp-id <id> | Yes | Custom org identifier (format: ^[a-z0-9][a-z0-9\-]{2,63}$) |
--corp-name <name> | No | Org display name (same as corpId if omitted) |
org-sync sync
Accept department tree and member data, create an async sync task. Returns taskId for query polling.
winnexo org-sync sync --platform-type custom --corp-id my-org \
--departments '[{"deptId":"root","deptName":"HQ","parentDeptId":null,"order":0}]' --json
# Sync members (SAML/OAuth2 scenario)
winnexo org-sync sync --platform-type saml --corp-id "https://idp.example.com" --sync-members \
--departments '[{"deptId":"root","deptName":"Root"}]' \
--members '[{"deptId":"root","accountId":"user@example.com","name":"Alice"}]' --json| Option | Required | Description |
|---|---|---|
--platform-type <type> | Yes | Platform type: saml / oauth2 / custom |
--corp-id <id> | Yes | Corp identifier (must match list-configs result) |
--departments <json> | Yes | Department list JSON |
--sso-settings-id <id> | No | SSO config ID (auto-inferred for SAML/OAuth2) |
--sync-members | No | Sync member relationships (not supported in custom mode) |
--members <json> | No | Member list JSON (required when syncMembers=true) |
org-sync query
Query sync task status by taskId. Status flow: PENDING → RUNNING → COMPLETED / FAILED / TIMEOUT / CANCELED. Recommended polling interval: 3–5 seconds.
winnexo org-sync query --task-id 12345 --json| Option | Required | Description |
|---|---|---|
--task-id <id> | Yes | Sync task ID (returned by sync command) |
custommode does not support member sync; total departments + members capped at 50,000.
tenant-user — Tenant user management (admin)
Manage any user under the current tenant (admin operations). Distinct from user (manage self).
| Subcommand | Description |
|---|---|
create [options] | Create a user and add to current tenant |
update [options] | Update user info (including enable/disable, role change, user group adjustment) |
remove [options] | Remove user from current tenant (preserves user entity) |
get [options] | Query user details |
list [options] | Paginated query of tenant members |
reset-password [options] | Admin reset of user password |
System role codes: SUPER_ADMIN / SYSTEM_ADMIN / SEMANTIC_ADMIN / SKILL_ADMIN / KB_ADMIN / AGENT_ADMIN / APPLICATION_USER (default).
tenant-user create
winnexo tenant-user create -a user001 -n "Alice" --json
winnexo tenant-user create -a user001 -n "Alice" -r '["APPLICATION_USER","SEMANTIC_ADMIN"]' --json| Option | Alias | Required | Description |
|---|---|---|---|
--account-id <id> | -a | Yes | WINNEXO login account (unique) |
--display-name <name> | -n | Yes | Display name (unique within tenant) |
--role-codes <json> | -r | No | System role codes JSON list; defaults to APPLICATION_USER |
--password-encrypted <cipher> | -p | No | RSA-OAEP-SHA256 encrypted password; uses system default if omitted |
tenant-user update
All fields optional; roleCodes and userGroupIds use full-replacement semantics.
winnexo tenant-user update -u 123 --active false --json
winnexo tenant-user update -u 123 -n "New Name" -r '["APPLICATION_USER"]' --json
winnexo tenant-user update -u 123 -g '["group1","group2"]' --json| Option | Alias | Required | Description |
|---|---|---|---|
--user-id <id> | -u | Yes | Target user ID |
--display-name <name> | -n | No | New display name |
--role-codes <json> | -r | No | New role list JSON (full replacement) |
--active <bool> | No | Enable/disable (true/false) | |
--user-group-ids <json> | -g | No | New user group ID list JSON (full replacement) |
Disabling a user is subject to "last super admin protection": cannot disable the tenant's last super administrator.
tenant-user remove
Remove a user from the current tenant. User entity is preserved; only removes tenant association.
winnexo tenant-user remove -u 123 --json| Option | Alias | Required | Description |
|---|---|---|---|
--user-id <id> | -u | Yes | User ID to remove |
tenant-user get
Query user details by userId or accountId.
winnexo tenant-user get -u 123 --json
winnexo tenant-user get -a user001 --json| Option | Alias | Required | Description |
|---|---|---|---|
--user-id <id> | -u | One of | User ID |
--account-id <id> | -a | One of | WINNEXO login account |
tenant-user list
winnexo tenant-user list --json
winnexo tenant-user list -k "Zhang" --active true --json
winnexo tenant-user list -r '["APPLICATION_USER"]' --json| Option | Alias | Required | Default | Description |
|---|---|---|---|---|
--page <num> | -p | No | 1 | Page number |
--page-size <num> | No | 20 | Items per page (max 100) | |
--keyword <text> | -k | No | Search keyword (fuzzy match on name and account) | |
--active <bool> | No | Enable/disable status filter | ||
--role-codes <json> | -r | No | Filter by roles JSON array |
tenant-user reset-password
Reset user password. Without --password-encrypted, resets to system default.
winnexo tenant-user reset-password -u 123 --json
winnexo tenant-user reset-password -u 123 -p '<rsa_encrypted_password>' --json| Option | Alias | Required | Description |
|---|---|---|---|
--user-id <id> | -u | Yes | Target user ID |
--password-encrypted <cipher> | -p | No | RSA-OAEP-SHA256 encrypted new password |
user-token — User API Token self-service management
Self-service API Token management for end users; only caller_type=user may call; operations are bound to the Token holder.
| Subcommand | Description | Endpoint |
|---|---|---|
info | Query current user’s Token status | POST /openapi/getTokenInfo |
enable | Enable API Token (idempotent) | POST /openapi/enableToken |
disable | Disable API Token | POST /openapi/disableToken |
reset | Reset API Token (old invalidated + new issued) | POST /openapi/resetToken |
user-token info
winnexo user-token info --json| Field | Type | Description |
|---|---|---|
enabled | boolean | Whether Token is enabled (ACTIVE Token exists) |
tokenMasked | string | null | Masked Token value |
gmtCreate | string | null | Token creation time (ISO 8601) |
user-token enable
Enable API Token (idempotent if ACTIVE Token already exists).
winnexo user-token enable --json| Field | Type | Description |
|---|---|---|
token | string | Token plaintext (returned only this once; store securely) |
tokenMasked | string | Masked Token value |
user-token disable
winnexo user-token disable --json| Field | Type | Description |
|---|---|---|
disabled | boolean | Whether operation succeeded |
user-token reset
Reset API Token (old permanently invalidated + new issued).
winnexo user-token reset --json| Field | Type | Description |
|---|---|---|
token | string | New Token plaintext (returned only this once) |
tokenMasked | string | Masked new Token value |
After reset, the old Token is permanently invalidated and unrecoverable. The new Token plaintext is only returned in this response; store it securely.
Output Format
Human-readable mode (default)
Default output with colors and icons for the terminal; tables formatted with cli-table3.
JSON mode (--json)
With the --json flag, output passes through the raw API response (POP gateway format) without additional wrapping.
winnexo --json healthOn error:
{
"status": "error",
"message": "Health check failed",
"error": "Unauthorized"
}Exit Codes
| Exit code | Meaning |
|---|---|
| 0 | Success |
| 1 | API error |
| 2 | Parameter validation error |
| 3 | Authentication error |
Credential Configuration
WinNexo CLI supports three credential configuration methods, from highest to lowest priority:
- CLI arguments:
--server-domain/--user-token/--tenant-id - Environment variables:
WINNEXO_SERVER_DOMAIN/WINNEXO_USER_TOKEN/WINNEXO_DEFAULT_TENANT_ID/WINNEXO_DEFAULT_DIGITAL_EMPLOYEE_NAME - Config file:
~/.winnexo/config.json
{
"server_domain": "https://your-api-endpoint.com",
"user_token": "wn_xxxxxxxxxxxx",
"tenant_id": "10001",
"digital_employee_name": "customer"
}How It Works
graph LR
A[Your terminal / script / IDE] --> B[winnexo CLI]
B -->|Env-var identity| C[WinNexo OpenAPI]
C --> D[Digital Workers / Skills / Resources / Knowledge]The CLI obtains identity and service address via four environment variables:
| Env variable | Meaning | Source |
|---|---|---|
WINNEXO_SERVER_DOMAIN | WinNexo server address | Personal Settings → Open Integration |
WINNEXO_USER_TOKEN | Bearer Token (wn_ prefix) | Personal Settings → Open Integration → Enable UserToken |
WINNEXO_DEFAULT_TENANT_ID | Default tenant ID (x-tenant-id header) | Personal Settings → Open Integration |
WINNEXO_DEFAULT_DIGITAL_EMPLOYEE_NAME | Default Digital Worker name | Personal Settings → Open Integration |
Credentials resolve in priority: CLI arguments → environment variables → config file (~/.winnexo/config.json).
Module Composition
For installation instructions, see Use WinNexo in External AI Workspaces.
Manual Installation
If you prefer not to let the AI operate on your system:
# macOS Apple Silicon
curl -L -o /tmp/winnexo \
"https://winnexo-common.oss-cn-shanghai.aliyuncs.com/1.7.20260709/cli/release/winnexo-v1.0.0-darwin-arm64"
sudo mv /tmp/winnexo /usr/local/bin/winnexo
sudo chmod +x /usr/local/bin/winnexo
# macOS only: remove quarantine + ad-hoc codesign (avoid "damaged" prompt)
sudo xattr -rd com.apple.quarantine /usr/local/bin/winnexo
sudo codesign --sign - /usr/local/bin/winnexo
# Configure env variables (write to ~/.zshrc then source)
export WINNEXO_SERVER_DOMAIN="https://your-api-endpoint.com"
export WINNEXO_USER_TOKEN="wn_your-token-here"
export WINNEXO_DEFAULT_TENANT_ID="10001"
export WINNEXO_DEFAULT_DIGITAL_EMPLOYEE_NAME="customer"
winnexo --version
winnexo health --jsonFor other platforms, replace the binary name with darwin-x64 / linux-x64 / linux-arm64 / win-x64.exe. Without sudo, install to ~/.local/bin/ and add to PATH.
Typical Scenarios
Scenario 1: Daily automated customer summary
Add a line to crontab:
0 9 * * 1-5 winnexo skill run --skill-code customer-daily-recap \
--arguments '{"date": "yesterday"}' --json \
> ~/Documents/notes/$(date +%Y%m%d).jsonEvery weekday at 9 AM, a local copy of yesterday’s customer follow-up summary is auto-generated (JSON, can be piped to Markdown).
Scenario 2: Bulk ingest
50 PDFs in a folder to upload to the KB:
for f in ./contracts/*.pdf; do
winnexo knowledge-base create-file -n "$(basename "$f")" \
--file-path "$f" --directory-id kb-dir-001 --json
doneThe CLI uploads one by one, auto-ingests—10x faster than manual drag.
Scenario 3: IDE workflow
Writing a tech proposal in VS Code and want to reference last week’s meeting minutes:
winnexo output list --keyword "weekly meeting" --json
# Get a source-id from the output list
winnexo source preview --source-id $ID --jsonPaste the output into your proposal.
Scenario 4: CI/CD pipeline
After deployment, have the Digital Worker write a release note:
winnexo skill run --skill-code release-note-writer \
--arguments "{\"version\": \"$VERSION\", \"diff\": \"$(git log --oneline ...)\"}" --json \
| tee CHANGELOG.mdBest Practices
Try It
winnexo --version
winnexo health --json If it returns `callerType: user` and `authSource: bearer`, you’re set. winnexo skill list --json # See available Skills
winnexo skill run --skill-code $CODE --arguments '{}' --json # Run onecrontab, Makefile, CI, IDE Tasks—all can use it directly.
Related reading: OpenAPI, Custom Skills
