Difyctl logo

Difyctl

OrganizationPopular
langgenius
difyctl

Base skill for the difyctl CLI: find any command or Dify operation through help and run it as a command. Use when the task involves difyctl or a Dify server from the command line.

Overview

Publisherlanggenius
Repositorydify
Skill namedifyctl
Stars
157.6K
Forks
24.9K
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by langgenius on GitHub. Read the source before you install it.

Installation

Install the Difyctl AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/langgenius/dify/tree/main/skills/difyctl
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/langgenius/dify.git /tmp/dify
mkdir -p .claude/skills
cp -r /tmp/dify/skills/difyctl .claude/skills/difyctl
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Difyctl in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Difyctl on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Difyctl is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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, 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.

Running an operation

difyctl run console_app workflow --app-id <id> --inputs '{"a":1}'. Each top-level field of input is a flag, dashes for underscores. Scalars take a value; objects, maps and lists of objects take a JSON literal or @file.json; lists of scalars repeat the flag. Fields named input, stream, only, output, verbose, json or help have no flag; pass them through --input.

--input '{"a":1}', --input @file.json or --input @- (stdin) sends the whole body; field flags merge over it. A dotted id is a command with the dots as spaces: run.console_app.workflow is difyctl run console_app workflow.

Run an app with the op for its mode: run console_app workflow, run console_app chat, run console_app advanced_chat, run console_app completion. First difyctl describe console_app --app-id <id> --json and read input_schema; that is the shape of inputs. Local files go under files, keyed by the app's file variable name ({"files":{"doc":"./r.pdf"}} or a list of paths); files for the run itself under attachments; URLs straight into inputs.

difyctl-only flags

--stream prints each event of a streaming op as one JSON line instead of folding them. --only <event> filters streamed events (repeatable). --output <path> saves a file-kind response; the default is the current directory under the server's filename, or <op-id>.<ext>. --verbose adds the raw server response to errors. A flag the operation's kind does not support exits 2.

Reading results

Streaming ops fold to {status, text, outputs?, total_tokens?, message_id?, conversation_id?, error?, hints}. text.answer is the reply; text.by_source appears only while status is incomplete. status is ended, failed (exit 1), suspended (a form is waiting; follow hints) or incomplete (the stream broke early). Any response may carry hints: [{summary, op, input, form?}], the server's next steps: next page, confirm step, reply op, form submit. Fill any null in input and pass it back with difyctl <op, dots as spaces> --input '<input>'.

Errors and exit codes

Errors are one envelope on stderr: {"error":{"code","message","hint"?,"details"?,"schema"?}}. Exit 2 is bad input (schema included), 4 not logged in or forbidden, 6 catalog unavailable or unknown op (run difyctl refresh cache or upgrade difyctl), 7 rate limited.

Login and environment

difyctl login --server https://... (device flow; --no-browser prints the URL and code; --no-keyring keeps the token in a file; --insecure skips TLS verification). One login at a time. difyctl use workspace <id> pins a workspace; difyctl get workspace shows them. Scripts skip login with DIFY_SERVER and DIFY_TOKEN; DIFY_WORKSPACE_ID overrides the pin; DIFY_CONFIG_DIR and DIFY_CACHE_DIR move the files.

login blocks until the browser approval arrives. Run difyctl login --server <url> --no-browser as a background job, relay the open <url> and code <code> lines from its stderr to the user, and do not cancel the job. Its exit code reports the result. In a sandbox, add --no-keyring and set DIFY_CONFIG_DIR to persistent storage on every call, so the login survives the next session. If background jobs do not survive between calls, run login --no-wait instead, relay the verification_uri and user_code it prints, and after the user approves run login --resume until it stops printing status: pending.

Destructive operations

Operations that remove or revoke have no confirmation prompt. Confirm with the person first.

Other skills

Scenario skills add guidance for one kind of task. difyctl get skills shows them; difyctl install skills <skills root> --skill <name> installs one, where <skills root> is the folder above this file's folder. Re-running difyctl install skills <skills root> after upgrading difyctl refreshes every skill.

Frequently asked questions

What does the Difyctl AI skill do?

Base skill for the difyctl CLI: find any command or Dify operation through help and run it as a command. Use when the task involves difyctl or a Dify server from the command line.

Why use Difyctl on TypingMind?

Because you install it once and use it with any model. Difyctl is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Difyctl in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/langgenius/dify/tree/main/skills/difyctl. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Difyctl?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Difyctl?

As many as you like. As long as a model supports skills, you can use Difyctl with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Difyctl AI skill free?

It is published on GitHub by langgenius. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇