Compétence CLI de workflow Dify
Installation
Installez d'abord le CLI du workflow Dify en amont :
python -m pip install "dify-ai-workflow-tools @ git+https://github.com/Akabane71/dify-workflow-cli.git@main"
Installez ensuite le harnais CLI-Anything :
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=dify-workflow/agent-harness
Utilisation
Le harnais transmet les appels au CLI dify-workflow en amont.
cli-anything-dify-workflow guide
cli-anything-dify-workflow list-node-types
cli-anything-dify-workflow create -o workflow.yaml --mode workflow --template llm
cli-anything-dify-workflow inspect workflow.yaml -j
cli-anything-dify-workflow validate workflow.yaml -j
cli-anything-dify-workflow edit add-node -f workflow.yaml --type code --title "Process"
cli-anything-dify-workflow config set-model -f app.yaml --provider openai --name gpt-4o
Groupes de commandes
guidelist-node-typescreateinspectvalidatechecklistedit add-node|remove-node|update-node|add-edge|remove-edge|set-titleconfig set-model|set-prompt|add-variable|set-opening|add-question|add-tool|remove-toolexportimportdifflayout
Conseils pour l'agent
- Préférez
-j/--json-outputsur les commandes en amont lorsque cela est disponible. - Le harnais lui-même est une enveloppe. La logique réelle du workflow est fournie par le projet en amont.
- Si
dify-workflown'est pas sur le PATH mais que le paquet Pythondify_workflowest installé, le harnais se replie surpython -m dify_workflow.cli. - Toutes les opérations sont des modifications de fichiers locales sur des fichiers DSL Dify au format YAML/JSON.