# Dify Operations CLI

Operate a Dify server and build, test and publish its apps with difyctl.

- Repository: https://github.com/langgenius/dify (160170 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add langgenius/dify --skill difyctl -g -a claude-code -y`
Codex: `npx skills add langgenius/dify --skill difyctl -g -a codex -y`
Cursor: `npx skills add langgenius/dify --skill difyctl -g -a cursor -y`
Gemini CLI: `npx skills add langgenius/dify --skill difyctl -g -a gemini-cli -y`

## Description

Operate a Dify server through difyctl: find and run any operation, and build, test, publish and change Workflow and Chatflow apps. Use when the task involves difyctl, a Dify server, or Dify apps.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# difyctl

difyctl talks to a Dify server. Business commands are not built in: the server publishes a catalog of operations, and each one is a command you discover at run time.

Always pass `--json`. Help and errors are text on a terminal and JSON in a pipe; `--json` (or `DIFY_OUTPUT=json`) forces JSON. Results and streams are always JSON.

Commands whose effect is destructive can't be undone and have no confirmation prompt. Check effect in help and confirm with the human first. Also confirm a server operation that shows no effect.

## Finding what the CLI can do

An operation id is dotted, `run.console_app.chat`, and is typed as words: `difyctl run console_app chat`. Ids come from the server and can change, so look them up instead of assuming them.

Four views under `help`, covering local commands and server operations as one tree:

1. `difyctl help --json`: the map. Start here.
2. `difyctl help <namespace> --json`: everything under one namespace (`difyctl help get`). The bare namespace, `difyctl get --json`, prints the same.
3. `difyctl help <words> --json`: search by plain words (`difyctl help upload file`), top 20 entries plus `total`. Widen the words when nothing fits.
4. `difyctl help <id> --json`: one descriptor, dotted or spaced id. For an operation: `input` (JSON Schema), `bind`, `kind`, `effect`, `examples` and `pins` (values difyctl fills in, currently `workspace_id`). `<command> --help` prints the same.

`--all` adds operations the server marks internal. `--full` on the bare `help` prints every descriptor; rarely needed.

Not logged in, or the server unreachable, gives the local commands plus one line on stderr.

## Where to read next

The rest: https://github.com/langgenius/dify/blob/HEAD/skills/difyctl/SKILL.md
