OpenYida
AI-native CLI for building DingTalk Yida low-code applications.
OpenYida connects AI coding agents with Yida's low-code platform, so developers can create apps, forms, workflows, custom pages, reports, integrations, and deployment configuration from a normal chat-driven development workflow.
Quick Start · 帮助网站&文档 · Capabilities · Full Capability List · CLI Reference · Examples · Contributing · Changelog
帮助网站&文档: 帮助网站&文档
What OpenYida Provides
OpenYida is a bridge between AI coding tools and Yida. It gives agents a stable command-line interface for the full application lifecycle:
| Area | What you can do | |------|-----------------| | Application delivery | Create, update, export, and import Yida applications | | Form modeling | Create forms, update fields, inspect schemas, and manage permissions | | Custom pages | Generate React-based pages, lint Yida runtime rules, compile, and publish | | Workflow automation | Create process forms, configure approval flows, preview process instances | | Data operations | Query form/process/task/subform data and run anomaly checks | | Integrations | Manage HTTP connectors, connector actions, auth accounts, and automation flows | | Operations | Diagnose environment issues, manage login state, configure sharing, upload CDN assets |
The result remains a native Yida application: teams can continue editing it in Yida, use existing enterprise security controls, and deploy through the Yida platform.
Quick Start
1. Install
npm install -g openyida
OpenYida requires Node.js 18 or later. The package exposes both openyida and yida commands.
For npm global installations, OpenYida checks the npm registry before a normal command at most once every 24 hours. When a newer version is available, it installs that exact version and then reruns the original command. This behavior is identical whether the local command is launched from a terminal, Codex, Claude Code, or Qoder. Managed cloud Agent runtimes are excluded before any cache access, registry request, or npm invocation.
Set OPENYIDA_NO_AUTO_UPDATE=1 to disable automatic updates. OPENYIDA_AUTO_UPDATE_SECS can override the check interval for development and testing. The explicit openyida update command remains available.
If Codex is already installed, OpenYida also imports a local Codex plugin during postinstall. Restart Codex after installation, then type @宜搭 or @openyida in the composer to attach the OpenYida context.
2. Check Your Environment
Run this from the AI coding workspace where you want OpenYida to operate:
openyida agent-capabilities --summary-json
OpenYida returns a compact machine-readable summary with the version, login state, workspace/cache paths, and command manifest digest. openyida agent-capabilities --json is the full diagnostic snapshot, where compact workdir maps to active.projectRoot and workdir_exists maps to active.projectRootExists. openyida commands --json remains available when an agent only needs the command manifest.
3. Log In
openyida login
OpenYida login defaults to OAuth token mode. It opens the DingTalk OAuth authorization page, receives the local loopback callback, exchanges code / authCode with the Yida server, and stores access_token / refresh_token in the user auth store when available. If the user auth store is not writable, OpenYida explicitly falls back to the current project cache and reports that narrower persistence scope.
When the user names a target Yida entry URL, pass it to the login command so OpenYida can select the matching environment and auth profile. For example:
openyida login https://yida-group.alibaba-inc.com/
openyida login --alibaba
For token status checks, use:
openyida login --check-only --json
openyida auth status
To reuse an existing shared login profile for the current project, switch first instead of starting a new OAuth login:
openyida auth profiles
openyida auth profile switch <auth_profile>
If the target profile is not listed, run openyida login to add it, then switch to the new profile.
OpenYida does not install Playwright by default.
4. Build With an AI Agent
Ask your coding agent for a concrete Yida application or workflow:
Create a CRM application in Yida with customer, contact, opportunity, and follow-up forms.
Build an IPD workflow for chip production, including approval nodes and dashboard pages.
Generate a public landing page and publish it to my Yida app.
The agent can then call OpenYida commands to create the application, generate source files, publish pages, and return the final Yida URLs. In Codex, QwenWork, Qoder, Qoder IDE, and QoderWork environments, successful creation and publish commands also include a browser handoff so the agent can open the resulting Yida page in the in-app browser. Use --open to force this handoff or --no-open to suppress it.
Supported AI Coding Tools
| Tool | Support | |------|---------| | Codex | Full support | | Claude Code | Full support | | MuleRun | Full support | | OpenCode | Full support | | Cursor | Full support | | Visual Studio Code | Full support | | QwenWork(千问办公) | Full support | | Qoder | Full support | | Qoder IDE | Full support | | QoderWork | Full support |
How It Works
flowchart LR
A["AI coding agent"] --> B["OpenYida CLI"]
B --> C["Environment detection"]
B --> D["Login and organization context"]
B --> E["Yida API operations"]
B --> F["Local page generation and compile"]
E --> G["Native Yida app"]
F --> G
OpenYida keeps platform-specific behavior inside the CLI, while agents interact with predictable commands and project files.
Project Layout
openyida/
├── bin/yida.js # CLI entry and command routing
├── lib/
│ ├── app/ # Application, form, page, import/export commands
│ ├── auth/ # OAuth token login, token session storage, organization switch
│ ├── connector/ # HTTP connector lifecycle and smart creation
│ ├── core/ # Environment detection, i18n, diagnostics, data commands
│ ├── process/ # Process form creation, configuration, preview
│ ├── report/ # Yida report and chart generation
│ └── samples/ # Reusable code templates emitted by openyida sample
├── project/ # Default workspace template for generated Yida projects
├── yida-skills/ # Source skill docs and Yida API references
└── scripts/ # CI, packaging, and installation helpers
Capabilities
For a user-facing list of supported features and matching CLI commands, see OpenYida 功能完整列表.
Application and Form Management
openyida create-app --name "CRM" --desc "Customer management"
openyida sample yida-design app-theme --output .cache/openyida/crm/app-theme.css
openyida create-app --name "CRM" --desc "Customer management" --theme-file .cache/openyida/crm/app-theme.css --nav-theme light --logo-source appIcon --layout l_shape
openyida app-list --type managed --page 1 --size 16
openyida update-app APP_XXX --theme-file .cache/openyida/crm/app-theme.css --nav-theme light --logo-source appIcon --layout l_shape
openyida corp-efficiency
openyida create-form create APP_XXX "Customer" .cache/openyida/forms/customer-fields.json
openyida create-form update APP_XXX FORM_XXX .cache/openyida/forms/customer-changes.json
openyida create-form update APP_XXX FORM_XXX --data-file .cache/openyida/forms/customer-changes.json
openyida create-form resume APP_XXX FORM_XXX .cache/openyida/forms/customer-fields.json --json
openyida sample openyida-page-template form-fields --output .cache/openyida/forms/customer-fields.json
openyida sample openyida-page-template canvas-form-drawer --output project/pages/src/customer-entry.canvas.jsx --var APP_TYPE=APP_XXX --var FORM_UUID=FORM_XXX
openyida get-schema APP_XXX FORM_XXX
openyida get-schema APP_XXX FORM_XXX --compact --resolve-fields "Customer Name,Status"
openyida get-schema APP_XXX --all --output-dir .cache/schemas
Form definitions support 19 business field types plus verified presentation/layout components. Prefer Divider for section titles and ColumnContainer (mapped to ColumnsLayout + Column) for multi-column layout; use GroupContainer / PageSection only when an actual grouping container is needed.
Custom Page Development
openyida create-page APP_XXX "Dashboard" --mode dashboard
openyida publish pages/src/home.canvas.jsx APP_XXX FORM_XXX
Custom page source is authored directly from PRD and design guidance. Custom page development uses yida-canvas-custom-page and .canvas.jsx.
For member, department, attachment, and image upload components, .canvas.jsx pages should follow yida-canvas-custom-page/references/native-components-bridge.md for feature detection, fallback, and value normalization.
For the current custom page native-component support matrix, see Yida native components supported by custom pages.
Workflow, Data, and Permissions
openyida create-process APP_XXX "Purchase Request" .cache/openyida/process/fields.json .cache/openyida/process/process.json
openyida configure-process APP_XXX FORM_XXX .cache/openyida/process/process.json
openyida process preview APP_XXX PROC_INST_XXX --output .cache/openyida/process/process.html
openyida data query form APP_XXX FORM_XXX --page 1 --size 20
openyida data query form APP_XXX FORM_XXX --dynamic-order '{"dateField_xxx":"-"}'
openyida data create form APP_XXX FORM_XXX --expect-form-name 客户 --expect-form-type receipt --data-file .cache/openyida/data-import/record.json
openyida get-permission APP_XXX FORM_XXX
configure-process 的流程 JSON 中,审批人可配置为发起人、指定成员、指定角色、部门主管或直属主管,例如:
{
"nodes": [
{
"type": "approval",
"name": "主管审批",
"approver": {
"type": "user",
"users": [{ "id": "manager7350", "name": "九神" }],
"multiApproverType": "all"
}
}
]
}
configure-process 会先通过表单绑定和流程版本只读接口证明 processCode ownership。目标已有 PUBLISHED 流程或 SAVED 草稿时,整图替换必须在人工确认后显式传入 --replace;未确认或 ownership 不匹配时远程写入数为 0。draft/save/publish 均为 one-shot,认证异常返回 NON_IDEMPOTENT_RESULT_UNKNOWN,不得自动重试。
发布成功还必须精确回读同一 PUBLISHED processId/processVersion 的 getProcessById 平台视图,并验证可见节点的组件、名称、顺序和审批模式。只有输出 verificationLevel: "PLATFORM_VIEW_VERIFIED" 才表示平台 view 已验证;PUBLISHED_UNVERIFIED 表示发布可能已生效但回读不完整,不能宣称 processJson 已验证,也不能直接重放写请求。
When creating or updating test data with openyida data, Yida date fields must use 13-digit millisecond timestamps, for example "dateField_xxx": 1719705600000. Do not submit YYYY-MM-DD strings for DateField or CascadeDateField values.
For deterministic query order, pass --dynamic-order '{"fieldId":"+"}' for ascending order or --dynamic-order '{"fieldId":"-"}' for descending order. Without --dynamic-order, searchFormDatas does not guarantee a stable result order; pagination, comparison, and pairing logic must not depend on the default order.
Temporary JSON, CSV, and one-off import scripts should live under .cache/openyida/ so generated run artifacts do not clutter the repository root.
Real Environment E2E
Most checks should stay offline, but OpenYida also includes an explicit real-environment smoke path for release and nightly validation:
OPENYIDA_E2E=1 npm run test:e2e:real
OPENYIDA_E2E=1 npm run test:e2e:real:full
OPENYIDA_E2E=1 OPENYIDA_E2E_FULL_STAGES=auth,app,form,process npm run test:e2e:real:full
npm run test:e2e:real:skills
The runner creates a disposable app, form, and custom page with an OY_E2E_* prefix, then verifies token login, app listing, schema fetch, data query, and page publish. It writes a registry to project/.cache/e2e-real/ so created resources can be audited later. Run openyida login for the target environment before starting the real E2E runner.
test:e2e:real:full extends the smoke path into a broad deterministic feature matrix: auth/env, app update, form update and option mutation, page build/compile/generate/publish, data create/get/update/query, permission read, page config and short URL check, report create/append, dashboard skill verification, export/import, batch, task-center, formula/doctor/sample/CDN config, and local connector parsing/template generation. AI-backed commands such as flash-to-prd are available as the optional ai stage because they depend on remote model availability. Workflow mutation is available as the opt-in process stage; it creates and republishes a workflow on the disposable E2E form and records advanced official-node fixtures for review.
test:e2e:real:skills enforces coverage for every directory under yida-skills/skills/. Each skill must be classified as real E2E, offline/unit, opt-in, or deprecated with an explicit reason. This prevents new skills from quietly bypassing the real-environment test plan.
Each successful full run leaves a human-inspectable result app in the target organization. The final step publishes a dedicated Full E2E Dashboard custom page, renames the app to OY_E2E_*_PASSED by default, and prints direct links for the app, form, dashboard page, and report; the same links are saved under resultApp in the registry JSON.
Useful options:
| Env var | Purpose |
|---------|---------|
| OPENYIDA_E2E_PREFIX | Override the disposable resource name prefix |
| OPENYIDA_E2E_CORP_ID | Switch to the dedicated test organization before creating resources |
| OPENYIDA_E2E_RESULT_APP_NAME | Override the final app name shown as the full-run result |
| OPENYIDA_E2E_BASE_URL | Override the Yida base URL for private deployments |
| OPENYIDA_E2E_FIELDS_FILE | Use a custom form fields fixture |
| OPENYIDA_E2E_PAGE_SOURCE | Use a custom page source for publish verification |
| OPENYIDA_E2E_SKIP_PUBLISH=1 | Skip custom page creation and publish |
| OPENYIDA_E2E_REGISTRY_DIR | Write registries outside project/.cache/e2e-real/ |
| OPENYIDA_E2E_FULL_STAGES | Comma-separated stage list for test:e2e:real:full; use all or omit for the default broad matrix |
Use npm run test:e2e:real:cleanup to list recorded disposable resources. OpenYida does not yet expose a safe app/form deletion command, so cleanup is intentionally a registry-backed audit step rather than an automatic destructive action.
Skill Evaluation Harness
The E2E paths above prove the CLI works. The eval harness under scripts/eval/ measures whether the agent still routes natural-language requests to the right sub-skill and produces good output after you edit yida-skills/SKILL.md. It is the feedback loop for harness engineering.
# Routing eval — "did it pick the right sub-skill?" No real resources, no login.
Drives a headless claude -p agent with each scenario prompt and checks
the selected sub-skill against the golden set.
npm run eval:routing
Doc quality — static analysis of all SKILL.md files (standards + maintainability).
npm run eval:doc-quality
Safety — credential leak detection, command whitelist, corpId consistency.
npm run eval:safety
Coverage — how much of the skill/category/reference space is covered by scenarios.
npm run eval:coverage
Comprehensive — 10-dimension scorecard for a single skill (doc quality, routing,
safety, step completeness, output validity, efficiency, stability, coverage).
Outputs a JSON scorecard, SVG radar chart, and trend analysis.
npm run eval:comprehensive -- --skill yida-dashboard
Tool-pipeline baseline (end-to-end) — wraps the real-environment runner for one
sub-skill, adds guardrail assertions, screenshots the published page, and writes a
human scoring template. Runs deterministic CLI commands (no agent) so it serves as
a control that proves the build→publish→screenshot→score plumbing itself works.
Requires OPENYIDA_E2E=1 and a valid token session.
OPENYIDA_E2E=1 npm run eval:e2e -- --skill yida-dashboard --screenshot
Same, plus automatic screenshot scoring via the local multimodal claude -p.
OPENYIDA_E2E=1 npm run eval:e2e -- --skill yida-dashboard --screenshot --auto-score
Real-generation eval — "can one sentence really build a usable app?" Feeds a
natural-language request ("帮我创建一个订单管理系统") to a headless claude -p
that actually reads the openyida skill and runs the CLI to build a real app, then
reuses the screenshot + scoring + report pipeline. Creates real 宜搭 resources, so
it needs OPENYIDA_E2E=1 + an authenticated agent. Unlike the deterministic baseline
above, here the agent self-orchestrates.
OPENYIDA_E2E=1 npm run eval:generate -- --screenshot
Re-evaluate an archived real CLI trace against the latest scenario contract and
current read-only platform state. This does not run an agent or mutate resources.
npm run eval:replay -- --report <generation-report.json> --scenario <scenario.json> --app-type APP_XXX
Run all three in one pass (routing + tool-pipeline baseline + real generation).
OPENYIDA_E2E=1 npm run eval:all -- --skill yida-dashboard --screenshot
Optional: a zero-dependency local web console (buttons + live streamed output)
that runs the tasks above on click. Binds to 127.0.0.1 only; tasks are a fixed
whitelist. Use the Node version you start it with, so run nvm use 20 first.
npm run eval:dashboard # http://127.0.0.1:4500
Configuration precedence is CLI flag > env (OPENYIDA_EVAL_*) > scripts/eval/eval.config.json > defaults.
| Flag | Purpose |
|------|---------|
| --mode e2e\|routing\|generate\|doc-quality\|safety\|coverage\|comprehensive\|all | Which evals to run (default e2e) |
| --skill | Restrict the e2e run to one sub-skill; stages are reverse-looked-up from the SKILL_COVERAGE matrix |
| --stages a,b | Explicit stage list, overriding the skill reverse-lookup |
| --runs N | Multi-run stability: repeat routing N times, report consistency rate |
| --screenshot / --no-screenshot | Capture the published page (default on; skipped gracefully if Playwright is absent) |
| --auto-score / --no-auto-score | Score screenshots with the local claude -p agent (default off → human template only) |
| --scenarios | Routing golden-set directory (default scripts/eval/scenarios) |
| --gen-scenarios | Real-generation golden-set directory (default scripts/eval/scenarios/generation) |
Results are written back into the existing acceptance-manifest.json under a new eval section (guardrails, screenshots, scores) plus two sibling artifacts: a scoring.md human-scoring template and a self-contained eval-report.html visual report (screenshots inlined as base64, so the single file opens anywhere). Routing results land in project/.cache/eval/routing-report.json; generation results (with their own scoring.md + eval-report.html) land in project/.cache/eval/generate/gen-. The harness degrades gracefully: a missing Playwright skips screenshots (enable with npm install --no-save playwright && npx playwright install chromium), and a missing claude CLI skips auto-scoring while keeping the human template. A guardrail failure (for example a resource-creating command issued before a successful login --check-only) fails the run.
A zero-dependency local dashboard (npm run eval:dashboard, then open http://127.0.0.1:4500) drives these runs from buttons and streams output live; its "📊 查看最新报告" button opens the most recent eval-report.html.
Connectors, Integrations, and Reports
openyida connector smart-create --curl "curl https://api.example.com/users"
openyida connector list
openyida integration create APP_XXX FORM_XXX "Sync customer data"
openyida integration create APP_XXX FORM_XXX "Approval result notify" \
--events processFinish --approval-actions agree,disagree --receivers 123456
Capability probe only; currently fails closed before auth/spec reads/remote writes
openyida integration update APP_XXX FORM_XXX LPROC_XXX \
--spec .cache/openyida/integration/desired-spec.json
openyida create-report APP_XXX "Sales Dashboard" .cache/openyida/reports/charts.json
openyida append-chart APP_XXX REPORT_XXX .cache/openyida/reports/chart.json
Aggregate tables use two independent optimistic-concurrency axes.
openyida aggregate-table inspect APP_XXX FORM_XXX --json
openyida aggregate-table preview APP_XXX FORM_XXX .cache/openyida/aggregate/design.json --json
openyida aggregate-table save APP_XXX FORM_XXX .cache/openyida/aggregate/design.json --json --no-open
openyida aggregate-table publish APP_XXX FORM_XXX .cache/openyida/aggregate/design.json --json --no-open
openyida aggregate-table status APP_XXX FORM_XXX --json
Aggregate-table save verifies the draft stashGmtModified axis; publish verifies the live gmtModified axis. Both commands require the corresponding GET readback revision to advance; when a response revision exists it must equal that readback axis. Both commands also require canonical readback of relationForms, relationships, aggregatedFields, auxFields, formulaFields, and validators. The CLI intentionally does not expose aggregate-table deletion, AI authoring, a high-level design DSL, or tenant-dynamic limits until the corresponding platform contracts are proven.
The opt-in aggregate real-E2E runner additionally requires OPENYIDA_AGGREGATE_E2E_RUN_ID and an exact OPENYIDA_AGGREGATE_E2E_OWNED_MARKER beginning with . Before its first write it verifies the exact list/inspect identity and name, persists a redacted manifest, registry, and baseline snapshot, then conditionally restores the baseline using the latest live revision. Missing ownership proof or concurrent revision movement produces PLATFORM_PROBE_REQUIRED / restore_blocked without a restore write.
CLI Reference
Run openyida --help or openyida for detailed usage.
Auth & Environment
| Command | Description |
|---------|-------------|
| openyida login [target-url] [--env | Login with OAuth token mode |
| openyida logout | Logout / unbind current project auth |
| openyida auth | Token login state and profile management |
| openyida org | Organization management (list / switch existing profiles first) |
| [--json] [--corp-id
openyida env [--json\|setup\|list\|show\|switch\|add\|remove] [options] | Detect AI tool environment & token login state |
App Management
| Command | Description |
|---------|-------------|
| openyida app-list [--type managed\|created] [--page N] [--size N] | Page through apps I manage or created |
| openyida corp-efficiency [overview\|details\|detail\|groups\|notify] [options] [--open\|--no-open] | Query enterprise efficiency overview and detail reports |
| openyida create-app " | Create a Yida app |
| openyida design-plan init | Initialize a plan draft from confirmed requirements |
| openyida design-plan preview | Update plan drafts by module |
| openyida design-plan materialize | Generate and validate design-plan artifacts from build-plan.json |
| openyida design-plan patch | Patch a design plan by field path and invalidate prior confirmation |
| openyida update-app | Update app info |
| openyida app-online | Enable a Yida app |
| openyida app-offline | Disable a Yida app |
| openyida nav-group | Manage app sidebar navigation groups |
|
openyida app-permission | Manage app primary, data, and developer admins |
| openyida i18n | Manage app multilingual copy and language config |
| openyida export | Export app (generate migration package) |
| openyida import | Import migration package, rebuild app |
Forms & Pages
| Command | Description |
|---------|-------------|
| openyida create-form batch | Create forms concurrently by dependency |
| openyida create-form create | Create a form page |
| openyida create-form icons [--json] | List available form navigation icons |
| openyida create-form validate-fields | Validate form field JSON locally |
| openyida create-form update | Update a form page |
| openyida create-form resume | Update a form page |
| openyida create-form patch | Update a form page |
| openyida create-form rule | Update a form page |
| openyida create-form validation | Update a form page |
| openyida add-validation | Update a form page |
| openyida create-form bind-datasource | Update a form page |
| openyida create-form add-option | Update a form page |
| openyida list-forms | List forms/pages in an app |
| openyida aggregate-table | Manage aggregate tables (virtualView) |
|
openyida get-schema | Get one form Schema or all form Schemas |
| openyida check-prd-completeness | Check PRD page/resource count risk |
| openyida er | Export app entity relationship diagram |
| openyida create-page | Create a custom display page |
| openyida build-page | Build Yida-compatible page source |
| openyida check-page | Check custom page standards |
| openyida compile | Compile custom page locally |
| openyida publish | Compile and publish custom page |
| openyida update-form-config | Update form configuration |
| openyida get-form-config | Query form configuration |
Data & Permissions
| Command | Description |
|---------|-------------|
| openyida data | Unified data management (form/process/task/subform) |
| openyida task-center | Global task center (todo/processed/cc etc.) |
| openyida basic-info | Query organization basic info, capacity, quotas, and domain settings |
| openyida read-dingtalk-doc | Fetch Markdown content from a DingTalk document |
| openyida read-dingtalk-tingji | Fetch DingTalk Tingji details by task UUID |
| openyida get-permission | Query form permission config |
| openyida save-permission | Save form permission config |
| openyida corp-manager | Manage platform admins and address book permissions |
| openyida agent-center | Manage process and departure delegation | ...
Process
| Command | Description |
|---------|-------------|
| openyida configure-process | Configure and publish process rules |
| openyida create-process | Create process form (all-in-one) |
| openyida ai-form-setting | Manage process form AI approval prompts |
| openyida process preview | Preview process instance (visual flowchart) |
Page Config & Sharing
| Command | Description |
|---------|-------------|
| openyida verify-short-url | Verify short URL |
| openyida save-share-config | Save public access / share config |
| openyida get-page-config | Query page public access config |
| openyida externalize-form | Plan external access-safe mirror fields |
Reports
| Command | Description |
|---------|-------------|
| openyida create-report | Create a Yida report |
| openyida append-chart | Append chart to existing report |
| openyida report inspect | Inspect report runtime bindings (read-only) |
Connectors
| Command | Description |
|---------|-------------|
| openyida connector list | List HTTP connectors |
| openyida connector create "name" "domain" ... | Create a connector |
| openyida connector detail | View connector details |
| openyida connector delete | Show manual deletion guidance (CLI does not delete) |
| openyida connector add-action --operations | Add an action |
| openyida connector update-action --connector-id | Safely update action query defaults |
| openyida connector list-actions | List actions |
| openyida connector delete-action | Delete an action |
| openyida connector test --connector-id | Test an action |
| openyida connector list-connections | List auth connections |
| openyida connector create-connection | Create an auth connection |
| openyida connector smart-create --curl "..." | Generate a redacted action draft from cURL (no remote create) |
| openyida connector parse-api [options] | Parse API information |
| openyida connector gen-template [output] | Generate API document template |
Integration & DingTalk
| Command | Description |
|---------|-------------|
| openyida integration create | Create integration automation flow |
| openyida integration update | Probe integration update capability (currently blocked without full readback) |
| openyida integration list | List integration automation flows |
| openyida integration enable | Enable integration automation flow |
| openyida integration disable | Disable integration automation flow |
| openyida integration check | Check abnormal integration automation run logs |
| openyida integration diagnose (--text | Diagnose integration automation tickets and common pitfalls |
| openyida dws | DingTalk CLI (contacts/calendar/todo/approval etc.) |
| openyida dws contact user search --keyword | DingTalk CLI (contacts/calendar/todo/approval etc.) |
| openyida dingtalk-link | Generate DingTalk AppLink / legacy dingtalk:// page links |
Utility
| Command | Description |
|---------|-------------|
| openyida commands [--json] | Output machine-readable command manifest |
| openyida agent-capabilities [--json] [--summary-json\|--compact] | Output one-shot agent capability snapshot |
| openyida a2a | Start local read-only A2A adapter or print Agent Card |
| openyida bridge start [--token | Start OpenYida local web bridge service |
| openyida copy [--force] | Copy project working directory |
| openyida sample [--list] [ | Output code samples/templates |
| openyida doctor [--fix] | Environment diagnostics & auto-fix |
| openyida db-seq-fix [--fix] | Detect and repair PostgreSQL sequence drift |
| openyida formula evaluate | Static-check Yida formula syntax and field refs |
| openyida update | Check and update to latest version |
| openyida export-conversation [options] | Export AI conversation records |
| openyida feedback | Configure experience feedback form and local reminder state |
| openyida batch | Run OpenYida commands in batch |
| openyida flash-to-prd --file | Convert flash notes or meeting notes to a PRD prompt |
| openyida ai | Call Yida AI text and image recognition APIs |
| openyida asset | Detect asset capability / resolve materials |
| openyida cdn-config [options] | Configure CDN / OSS upload |
| openyida cdn-upload | Upload image to CDN |
| openyida cdn-refresh [options] | Refresh CDN cache |
CLI Notes
Connector Safety and Real E2E
connector test keeps the legacy flat --params option, but dispatches each key only to the location proven by the action schema. Unknown or ambiguous keys fail closed. Authenticated connectors require --account-id, and that account must belong to the selected connector. The test response follows the frontend canonical contract {statusLine,responseHeaders,content}; unknown envelopes and non-2xx status lines are failures.
connector update-action --connector-id is the narrow safe path for editing existing query defaults. It requires a complete connector/action preflight, changes only declared query defaults mirrored in inputs and parameters, submits the complete action collection once, and verifies an unchanged connector fingerprint, action count, non-target actions, and stable IDs. Missing/empty/unknown parameters, duplicate IDs, incomplete readback, and unknown write outcomes fail closed without automatic retry. add-action no longer overwrites an existing action ID; use update-action for query-only edits.
The opt-in connector E2E is intentionally separate from the shared full runner:
OPENYIDA_E2E=1 \
OPENYIDA_E2E_CONNECTOR=1 \
OPENYIDA_E2E_CORP_ID='<target-corp-id>' \
OPENYIDA_E2E_CONNECTOR_ECHO_URL='https://<team-controlled-host>/<stable-echo-path>' \
OPENYIDA_E2E_CONNECTOR_FIXTURE_MARKER='<expected-response-marker>' \
OPENYIDA_E2E_CONNECTOR_FIXTURE_OWNER='<expected-owner-header-value>' \
node scripts/e2e-real/connector/runner.js
The runner rejects public generic echo services such as httpbin and example.com. Before its first remote write it selects and verifies the explicit organization profile, prints a redacted resource plan, and persists synchronized registry/manifest evidence plus the SHA-256 of the preserved operations fixture. The controlled fixture must return exact JSON fields content.runId, content.fixtureMarker, and content.authorization === "Basic *", plus the exact x-openyida-fixture-owner response header. Substring matches, malformed JSON, and wrong fields fail closed. Each remote create is persisted as attempted before execution and becomes completed only after exact readback; an exception is recorded as outcome_unknown with a non-owned residual candidate and is never retried. The runner deletes only its temporary local copy and reports remote connector/account cleanup as blocked because the CLI has no proven delete API. If organization or fixture ownership cannot be proven, it returns PLATFORM_PROBE_REQUIRED with zero remote writes.
The opt-in node scripts/e2e-real/connector/action-update-runner.js regression uses the owner-confirmed login-free www.aliwork.com fixture and a single owned NONE-auth connector containing a target action plus one preservation sentinel. Enable it with OPENYIDA_E2E=1 OPENYIDA_E2E_CONNECTOR_ACTION_UPDATE=1. It verifies isolated currentPage, pageSize, userLanguage, searchFieldJson, and dynamic _stamp edits, restores each field and the final baseline, and persists only response structure, data count, and SHA-256. It never stores response row values or auth/profile/corp identifiers, never retries unknown writes, and intentionally leaves the owned connector as a cleanup_blocked residual because no proven delete API exists.
openyida asset resolve --hero is the preferred preflight for homepage visuals. It handles local files and external image references in one flow, uploads or mirrors them when CDN is configured, and returns materialStatus: final|draft|none so agents do not claim an unfinished visual page is final.
Environment and Localization
Environment selectors such as --env intl, --intl, --overseas, --global, and --yidaapps can be used on login-required commands to choose the target Yida environment for that run. The intl preset uses https://www.yidaapps.com as the built-in Global YiDA entrypoint (not the bare https://yidaapps.com domain) and DingTalk International OAuth at https://login.dingtalk.io; business API requests still use the authenticated environment baseUrl, so customer custom subdomains are supported.
For overseas apps, pass --locale en_US or --locale ja_JP on creation commands, or set OPENYIDA_CONTENT_LOCALE. OpenYida writes YiDA resource names with zh_CN, en_US, and ja_JP values so Global YiDA does not fall back to Chinese-only metadata.
The CLI package ships the core UI languages zh and en by default. Other CLI UI language packs are optional: keep or install files such as ja.js / fr.js in an external directory and point OPENYIDA_LOCALE_DIR to that directory, then set OPENYIDA_LANG=ja. If an optional language pack is unavailable, OpenYida falls back through en -> zh.
Forms and Pages
Form field definitions can include alias or componentAlias to populate Yida designer component aliases, stored as pages[0].componentAlias.items. Yida runtime resolves these aliases in page JS, so this.$('phone') can be used instead of this.$('textField_xxx'); OpenYida form rules, validations, and openyida data ... --resolve-aliases JSON inputs also accept aliases as field references. For server-side DingTalk OpenAPI calls, use GET /v2.0/yida/forms/component/alias/{appType}/{formUuid} to read the { fieldId, alias } mapping, then translate aliases before sending form data/search JSON. That endpoint requires systemToken, userId, an access token, and the Yida form data read permission. Use connector test --system-token-app for a transient test or integration create --connector-system-token-app for a server-side automation; OpenYida resolves systemToken internally and never prints it or stores it in page source and Action defaults.
openyida publish preserves existing custom page data sources by default. Before saving the new compiled JSX Schema, it reads the current page Schema and merges the Page-level dataSource with the built-in urlParams and timestamp sources, so manually configured data sources are not deleted during republish.
Data, Permissions, and Sharing
openyida externalize-form is useful when a form contains fields such as AssociationFormField, EmployeeField, or DepartmentSelectField that depend on internal organization permissions. It produces a report plus optional --mirror-fields-output JSON that can be used with openyida create-form create to build a separate public intake form while keeping the internal form and its association fields private.
Workflow, Reports, and Integrations
openyida integration create supports form events (insert, update, delete, comment) and approval events (processFinish, activityTask; aliases: approval, approvalNode). Approval events require --approval-actions agree,disagree,terminated; activityTask also requires --approval-node-ids . Passing --process-code selects a full graph replacement and now requires explicit --replace; it is not a safe update. integration update currently performs capability detection only: because full platform processJson + viewJson readback is unproven, it writes a redacted local probe artifact and returns PLATFORM_PROBE_REQUIRED before authentication, spec reading, or remote writes. It does not edit a flow.
Agent Skills
The yida-skills/ directory is the source skill library used by OpenYida during development and distributed with the npm package.
| Path | Purpose |
|------|---------|
| yida-skills/SKILL.md | Entry point and skill index |
| yida-skills/skills/ | Self-contained sub-skills for app, form, process, page, data, and integration work |
| yida-skills/references/ | Shared Yida API, model API, and query-condition references |
When OpenYida is used inside a supported AI coding environment, these skills help the agent choose the right command sequence and file conventions.
For QwenWork, use the same user-level global skills layout as QoderWork: ~/.qwenworkcn/skills/yida-skills/. Skip QwenWork setup when ~/.qwenworkcn is not present.
Qoder and Qoder IDE share the user-level ~/.qoder/skills/yida-skills/ directory. QoderWork remains a separate product and uses ~/.qoderwork/skills/yida-skills/.
For Codex, npm install -g openyida additionally creates a local plugin marketplace under ~/.openyida/codex-plugin and enables openyida@openyida in ~/.codex/config.toml when Codex is detected. This makes OpenYida show up in Codex's @ plugin menu as 宜搭 after Codex reloads.
Examples
Business Systems: IPD and CRM
Describe your requirements in one sentence; the agent can create a complete multi-form Yida application.
!IPD
!CRM
Custom Pages and Utilities
Interactive Campaigns
Common Prompts
Build a Yida application for [business scenario].
Generate an app from this requirements document.
Create a [name] form page with these fields.
Add a required [field type] field named [field name] to [form name].
Publish this custom page to the Yida app.
Make this page publicly accessible.
Export the application as a migration package.
OpenClaw Integration
Use OpenYida through yida-app in OpenClaw:
npx clawhub@latest install nicky1108/yida-app
Development
git clone https://github.com/openyida/openyida.git
cd openyida
npm install
npm run check:ci
Useful checks:
| Command | Purpose |
|---------|---------|
| npm test | Run Jest tests |
| npm run lint | Run ESLint |
| npm run check:quick | Run structure, manifest, syntax, and lint checks |
| npm run check:commands | Validate router, command manifest, and README alignment |
| npm run docs:commands | Regenerate the README command index from the manifest |
| npm run check:docs | Verify generated README command docs are current |
| npm run check:syntax | Validate JavaScript syntax |
| npm run check:structure | Validate project structure |
| npm run check:package-size | Validate npm package size and file-count budget |
| npm run check:package | Validate npm package contents |
When adding new CLI commands, register the route in bin/yida.js, add it to lib/core/command-manifest.js, regenerate the README command index with npm run docs:commands, and keep agent skills in yida-skills/ aligned when the workflow changes. npm run check:commands fails if the router, manifest, or README drift apart.
Security and Configuration
- OAuth token sessions are cached locally and should never be hard-coded into source files.
- Private deployment environments are managed through
lib/core/env-manager.js. - Yida API requests should use the active environment base URL and Bearer token auth.
- For multi-organization accounts, prefer explicit
--corp-idvalues in non-interactive automation.
Community
Scan the QR code to join the OpenYida DingTalk user group for updates and support.
Contributors
Thanks to everyone who has contributed to OpenYida. Read the Contributing Guide to get involved.
Latest contributors: DDlixin1, fcloud.
You finished the article! Want to go deeper or explore more stories?