Install any skill in seconds. Free to start, no credit card required.
Get Started Free →difyctl operates a Dify server's catalog of operations and builds, tests, publishes and changes Workflow and Chatflow apps.
18% 64%+45 ptsof test cases passed
Passed 14 of 22 test cases with the skill, and 4 of 22 without it.
3 of 3 safety checks passed
Not used yet
login uses the device flow: it prints a URL and a code, the human approves in a browser, and difyctl stores a token. One login at a time. A new login replaces the old one, and it replaces the code the human is looking at.
Check first. Run difyctl login --resume. If it prints an email, you are logged in: skip login. If it fails with not_logged_in, log in.
Server. Always pass --server <url>; login fails with usage_missing_arg without it. If the human has not named a server, ask which one. Never guess one.
Log in only this way:
difyctl login --server <url> --no-browser --no-wait. It saves a pending login and prints verification_uri, user_code and expires_in (seconds), then exits.difyctl login --resume once. If it prints the account email, you are logged in. If it prints status: pending, tell the human it is not approved yet and end your turn again.--resume fails. Start again from step 1.Never run login without --no-wait. It blocks until the human approves.
A script that already has a token skips login: set DIFY_SERVER and DIFY_TOKEN. (v1's DIFY_HOST is not read.)
--no-browser prints the URL instead of opening one; always pass it as an agent. --insecure skips TLS verification and allows http:// (local dev only).
The token goes to the OS keyring by default. On Linux without a DBus session, difyctl uses a file instead, because the keyring there is lost when the session ends. In a sandbox, a container or a headless VM, the keyring can still be lost between sessions. There:
--no-keyring to login, so the token goes to a file. Pass it on the --no-wait call; --resume remembers it.DIFY_CONFIG_DIR unset unless the default folder is lost between sessions (macOS ~/.config/difyctl, Linux ${XDG_CONFIG_HOME:-~/.config}/difyctl, Windows %APPDATA%\difyctl). If you set it, put it on every command (DIFY_CONFIG_DIR=<dir> difyctl ...): an export does not carry over when each command runs in a new shell. The pending login from --no-wait lives there too, so --resume needs the same value. A not_logged_in error names the folder it checked.difyctl get workspace lists your workspaces. difyctl use workspace <id> pins one on this device; later commands fill workspace_id from it. The pin is difyctl's own: it does not change the workspace open in the web console. difyctl describe workspace with no id shows the pinned workspace. DIFY_WORKSPACE_ID overrides the pin for one call.
DIFY_CONFIG_DIR holds login, tokens and catalog. DIFY_CACHE_DIR is unused.
Next to this one in the catalogue, plus more from the same author.