dify-cli-docs
Dify CLI Documentation
Not an entry point: dify-docs-write loads this pack for en/cli/ pages and the Enterprise develop/cli/ trees.
Readers
Developers, DevOps engineers, and technical PMs who have a Dify account and sign in through the browser device flow. They know their shell and tools like kubectl and gh, so never explain shell basics. They may not know Dify's concepts: one sentence and a link to the main docs, never a re-teach. The "Integrate Your Agents" section is for engineers wiring their own agent to call Dify apps as tools; write for that builder, at engineering depth, and keep it distinct from building agents inside Dify Studio. SSO sign-in (dfoe_ tokens) is Enterprise-only and is documented only in the Enterprise trees.
Source of truth (S2)
Every behavior claim is verified in cli/ on langgenius/dify origin/main, read at the pinned SHA per writing-guides/index.md § "Syncing the Dify codebase safely", and the report records that SHA. Not feat/cli, not cli/README.md, not the CLI's own help text: all three drift from what shipped. Where to look:
- exact strings and exit codes: the e2e suite
cli/test/e2e/suites/** - flags and args:
cli/src/commands/<verb>/<resource>/index.ts(verb-only commands incli/src/commands/<verb>/index.ts) - error codes:
cli/src/errors/codes.ts - env vars:
cli/src/env/registry.ts
A claim you cannot verify is left out or marked {/* VERIFY: … */}, never softened into a fact. For project context (known bugs, what is shipped versus planned), ask the user.