Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development
The Dify Plugin CLI manages your plugin development workflow, from project initialization to packaging. This guide covers installing the CLI, scaffolding a plugin project, and running it against a Dify instance.
Prerequisites
Before you begin, make sure you have:
Python 3.12
Homebrew (macOS only, used to install the CLI)
Install the CLI
Mac
Linux
Windows
brew tap langgenius/difybrew install dify
Download the latest binary from the Dify Plugin Daemon releases page. Pick dify-plugin-linux-amd64 for x86_64 hosts or dify-plugin-linux-arm64 for ARM hosts.
Download dify-plugin-windows-amd64.exe (or dify-plugin-windows-arm64.exe) from the Dify Plugin Daemon releases page, rename it to dify.exe, and add its folder to your PATH.
Verify the installation:
dify version
Create a Plugin Project
Create a new plugin project with:
dify plugin init
Fill in the required fields when prompted:
Edit profile of the pluginPlugin name (press Enter to next step): hello-worldAuthor (press Enter to next step): langgeniusDescription (press Enter to next step): hello world exampleRepository URL (Optional) (press Enter to next step): Repository URL (Optional) Enable multilingual README: [✔] English is required by defaultLanguages to generate: English: [✔] (required) → 简体中文 (Simplified Chinese): [✔] 日本語 (Japanese): [✘] Português (Portuguese - Brazil): [✘]Controls: ↑/↓ Navigate • Space/Tab Toggle selection • Enter Next step
Choose python and press Enter to use the Python plugin template, then select the type of plugin you want to build:
Select the type of plugin you want to create, and press `Enter` to continueBefore starting, here's some basic knowledge about Plugin types in Dify:- Tool: Tool Providers like Google Search, Stable Diffusion, etc. Used to perform specific tasks.- Model: Model Providers like OpenAI, Anthropic, etc. Use their models to enhance AI capabilities.- Endpoint: Similar to Service API in Dify and Ingress in Kubernetes. Extend HTTP services as endpoints with custom logic.- Agent Strategy: Implement your own agent strategies like Function Calling, ReAct, ToT, CoT, etc.Based on the ability you want to extend, Plugins are divided into four types: Tool, Model, Extension, and Agent Strategy.- Tool: A tool provider that can also implement endpoints. For example, building a Discord Bot requires both sending and receiving messages.- Model: Strictly for model providers, no other extensions allowed.- Extension: For simple HTTP services that extend functionality.- Agent Strategy: Implement custom agent logic with a focused approach.We've provided templates to help you get started. Choose one of the options below:-> tool agent-strategy llm text-embedding rerank tts speech2text moderation extension
When prompted for the minimal Dify version, leave it blank to use the latest version:
Edit minimal Dify version requirement, leave it blank by defaultMinimal Dify version (press Enter to next step):
The CLI creates a new directory named after your plugin and sets up the basic project structure. Move into it:
cd hello-world
Run the Plugin
From the hello-world directory, copy the example environment file:
cp .env.example .env
Edit the .env file to set your plugin’s environment variables, such as API keys or other configurations. To get the debugging credentials, log in to your Dify environment, click Plugins in the top-right corner, then click the debug icon. In the pop-up window, copy the API Key and Host Address.
REMOTE_INSTALL_URL combines host and port in host:port form. The host and port are shown together in the API Key card on the Plugins page.
Install the dependencies and run your plugin:
pip install -r requirements.txtpython -m main
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Dify Enterprise Docs","colors":{"primary":"#0060FF","light":"#688FE8","dark":"#0034FF"},"logo":{"light":"https://assets-docs.dify.ai/2025/05/d05cfc6ebe48f725d171dc71c64a5d16.svg","dark":"https://assets-docs.dify.ai/2025/05/c51f1cda47c1d9a4a162d7736f6e4c53.svg"},"favicon":"https://mintcdn.com/dify-enterprise-docs/zvhvyUvEpyoIONBf/logo/dify-logo.png?fit=max\u0026auto=format\u0026n=zvhvyUvEpyoIONBf\u0026q=85\u0026s=e0afd8349b7a272ad12280680a53043c","navbar":{"links":[{"href":"mailto:support@dify.ai","label":"Support"}]},"footer":{"socials":{"x":"https://x.com/dify_ai","github":"https://github.com/langgenius/dify","linkedin":"https://www.linkedin.com/company/langgenius"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"en/3.13.x/deploy/checklist"},{"language":"zh","href":"zh/3.13.x/deploy/checklist"},{"language":"ja","href":"ja/3.13.x/deploy/checklist"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dify-enterprise-docs","hasAudioNarration":false,"actualSubdomain":"dify-enterprise-docs","customDomains":["enterprise-docs.dify.ai"],"gitSource":{"type":"github","owner":"langgenius","repo":"dify-enterprise-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6affdf354fe44a98107414cd","clientVersion":"0.0.4248","searchFilterCounts":[{"language":"en","tag":"Developer Resources","count":1947},{"language":"ja","tag":"開発者リソース","count":1947},{"language":"zh","tag":"开发者资源","count":1947},{"language":"en","tag":"Use","count":1401},{"language":"ja","tag":"使い方","count":1401},{"language":"zh","tag":"使用","count":1401},{"language":"en","tag":"Workspace API","count":1353},{"language":"ja","tag":"Workspace API","count":1353},{"language":"zh","tag":"Workspace API","count":1353},{"language":"en","tag":"Knowledge APIs","count":639},{"language":"ja","tag":"ナレッジ API","count":639},{"language":"zh","tag":"知识库 API","count":639},{"language":"en","tag":"Orchestrate","count":620},{"language":"ja","tag":"オーケストレーション","count":620},{"language":"zh","tag":"编排","count":620},{"language":"en","tag":"App APIs","count":545},{"language":"ja","tag":"アプリ API","count":545},{"language":"zh","tag":"应用 API","count":545},{"language":"en","tag":"Workflow \u0026 Chatflow","count":533},{"language":"ja","tag":"ワークフローとチャットフロー","count":533},{"language":"zh","tag":"工作流与对话流","count":533},{"language":"en","tag":"Deploy","count":530},{"language":"ja","tag":"デプロイ","count":530},{"language":"zh","tag":"部署","count":530},{"language":"en","tag":"Plugins","count":524},{"language":"ja","tag":"プラグイン開発","count":522},{"language":"zh","tag":"插件开发","count":522},{"language":"ja","tag":"管理","count":470},{"language":"zh","tag":"管理","count":470},{"language":"en","tag":"Administer","count":420}],"searchSettings":{"maxResults":12}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"body{text-autospace:normal}html[data-current-path=\"/\"] .nav-tabs{display:none}"}]}
{"page":{"pagePath":"en/3.4.x/develop/plugins/getting-started/cli","slug":"/en/3.4.x/develop/plugins/getting-started/cli","pageMetadata":{"dimensions":{"type":{"primary":"conceptual","detail":"architecture"},"level":"beginner"},"standard_title":"CLI","language":"en","title":"Dify Plugin CLI","description":"Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development","href":"/en/3.4.x/develop/plugins/getting-started/cli"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The Dify Plugin CLI manages your plugin development workflow, from project initialization to packaging. This guide covers installing the CLI, scaffolding a plugin project, and running it against a Dify instance.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before you begin, make sure you have:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Python 3.12`}),`\n`,_jsx(_components.li,{children:`Homebrew (macOS only, used to install the CLI)`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`install-the-cli`,children:`Install the CLI`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Mac`,id:`mac`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`brew`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tap langgenius/dify`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`brew`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` install dify`})]}),`\n`]})})})}),_jsxs(Tab,{title:`Linux`,id:`linux`,children:[_jsxs(_components.p,{children:[`Download the latest binary from the `,_jsx(_components.a,{href:`https://github.com/langgenius/dify-plugin-daemon/releases`,children:`Dify Plugin Daemon releases page`}),`. Pick `,_jsx(_components.code,{children:`dify-plugin-linux-amd64`}),` for x86_64 hosts or `,_jsx(_components.code,{children:`dify-plugin-linux-arm64`}),` for ARM hosts.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`chmod +x dify-plugin-linux-amd64`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sudo mv dify-plugin-linux-amd64 /usr/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`local`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/bin/dify`})]}),`\n`]})})})]}),_jsx(Tab,{title:`Windows`,id:`windows`,children:_jsxs(_components.p,{children:[`Download `,_jsx(_components.code,{children:`dify-plugin-windows-amd64.exe`}),` (or `,_jsx(_components.code,{children:`dify-plugin-windows-arm64.exe`}),`) from the `,_jsx(_components.a,{href:`https://github.com/langgenius/dify-plugin-daemon/releases`,children:`Dify Plugin Daemon releases page`}),`, rename it to `,_jsx(_components.code,{children:`dify.exe`}),`, and add its folder to your `,_jsx(_components.code,{children:`PATH`}),`.`]})})]}),`\n`,_jsx(_components.p,{children:`Verify the installation:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`dify version`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-plugin-project`,children:`Create a Plugin Project`}),`\n`,_jsx(_components.p,{children:`Create a new plugin project with:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`dify plugin init`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Fill in the required fields when prompted:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Edit profile of the plugin`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Plugin name (press Enter to next step): hello-world`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Author (press Enter to next step): langgenius`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Description (press Enter to next step): hello world example`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Repository URL (Optional) (press Enter to next step): Repository URL (Optional)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Enable multilingual README: [✔] English is required by default`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Languages to generate:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` English: [✔] (required)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` → 简体中文 (Simplified Chinese): [✔]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 日本語 (Japanese): [✘]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Português (Portuguese - Brazil): [✘]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Controls:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ↑/↓ Navigate • Space/Tab Toggle selection • Enter Next step`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Choose `,_jsx(_components.code,{children:`python`}),` and press Enter to use the Python plugin template, then select the type of plugin you want to build:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"Select the type of plugin you want to create, and press `Enter` to continue\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Before starting, here`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'s some basic knowledge about Plugin types in Dify:`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Tool: Tool Providers like Google Search, Stable Diffusion, etc. Used to perform specific tasks.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Model: Model Providers like OpenAI, Anthropic, etc. Use their models to enhance AI capabilities.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Endpoint: Similar to Service API in Dify and Ingress in Kubernetes. Extend HTTP services as endpoints with custom logic.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Agent Strategy: Implement your own agent strategies like Function Calling, ReAct, ToT, CoT, etc.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Based on the ability you want to extend, Plugins are divided into four types: Tool, Model, Extension, and Agent Strategy.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Tool: A tool provider that can also implement endpoints. For example, building a Discord Bot requires both sending and receiving messages.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Model: Strictly for model providers, no other extensions allowed.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Extension: For simple HTTP services that extend functionality.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Agent Strategy: Implement custom agent logic with a focused approach.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`We'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ve provided templates to help you get started. Choose one of the options below:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-> tool`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agent-strategy`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` llm`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` text-embedding`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` rerank`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` speech2text`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` moderation`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` extension`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`When prompted for the minimal Dify version, leave it blank to use the latest version:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Edit minimal Dify version requirement, leave it blank by default`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Minimal Dify version (press Enter to next step): `})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The CLI creates a new directory named after your plugin and sets up the basic project structure. Move into it:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hello-world`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`run-the-plugin`,children:`Run the Plugin`}),`\n`,_jsxs(_components.p,{children:[`From the `,_jsx(_components.code,{children:`hello-world`}),` directory, copy the example environment file:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cp .env.example .env`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Edit the `,_jsx(_components.code,{children:`.env`}),` file to set your plugin’s environment variables, such as API keys or other configurations. To get the debugging credentials, log in to your Dify environment, click `,_jsx(_components.strong,{children:`Plugins`}),` in the top-right corner, then click the debug icon. In the pop-up window, copy the `,_jsx(_components.strong,{children:`API Key`}),` and `,_jsx(_components.strong,{children:`Host Address`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`INSTALL_METHOD=remote`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`REMOTE_INSTALL_URL=debug-plugin.dify.dev:5003`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`REMOTE_INSTALL_KEY=********-****-****-****-************`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`REMOTE_INSTALL_URL`}),` combines host and port in `,_jsx(_components.code,{children:`host:port`}),` form. The host and port are shown together in the `,_jsx(_components.strong,{children:`API Key`}),` card on the Plugins page.`]})}),`\n`,_jsx(_components.p,{children:`Install the dependencies and run your plugin:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` install -r requirements.txt`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`python`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -m main`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"dimensions":{"type":{"primary":"conceptual","detail":"architecture"},"level":"beginner"},"standard_title":"CLI","language":"en","title":"Dify Plugin CLI","description":"Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development","href":"/en/3.4.x/develop/plugins/getting-started/cli"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Install the CLI","slug":"install-the-cli","depth":2,"children":[]},{"title":"Create a Plugin Project","slug":"create-a-plugin-project","depth":2,"children":[]},{"title":"Run the Plugin","slug":"run-the-plugin","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"dify-enterprise-docs","siteName":"Dify Enterprise Docs","title":"Dify Plugin CLI - Dify Enterprise Docs","navMaps":{"firstHrefInVersion":{"3.13.x":{"href":"/en/3.13.x/develop/plugins/getting-started/cli","matchLevel":1},"3.12.x":{"href":"/en/3.12.x/develop/plugins/getting-started/cli","matchLevel":1},"3.11.x":{"href":"/en/3.11.x/develop/plugins/getting-started/cli","matchLevel":1},"3.10.x":{"href":"/en/3.10.x/develop/plugins/getting-started/cli","matchLevel":1},"3.9.x":{"href":"/en/3.9.x/develop/plugins/getting-started/cli","matchLevel":1},"3.8.x":{"href":"/en/3.8.x/develop/plugins/getting-started/cli","matchLevel":1},"3.7.x":{"href":"/en/3.7.x/develop/plugins/getting-started/cli","matchLevel":1},"3.6.x":{"href":"/en/3.6.x/develop/plugins/getting-started/cli","matchLevel":1},"3.5.x":{"href":"/en/3.5.x/develop/plugins/getting-started/cli","matchLevel":1},"3.4.x":{"href":"/en/3.4.x/develop/plugins/getting-started/cli","matchLevel":0},"3.3.x":{"href":"/en/3.3.x/develop/plugins/getting-started/cli","matchLevel":1},"3.2.x":{"href":"/en/3.2.x/develop/plugins/getting-started/cli","matchLevel":1},"3.1.x":{"href":"/en/3.1.x/develop/plugins/getting-started/cli","matchLevel":1},"3.0.x":{"href":"/en/3.0.x/develop/plugins/getting-started/cli","matchLevel":1},"2.8.x":{"href":"/en/2.8.x/deploy/checklist","matchLevel":4},"2.7.x":{"href":"/en/2.7.x/deploy/checklist","matchLevel":4},"2.6.x":{"href":"/en/2.6.x/deploy/checklist","matchLevel":4},"2.5.x":{"href":"/en/2.5.x/deploy/checklist","matchLevel":4}},"firstHrefInLanguage":{"en":{"href":"/en/3.4.x/develop/plugins/getting-started/cli","matchLevel":0},"zh":{"href":"/zh/3.4.x/develop/plugins/getting-started/cli","matchLevel":1},"ja":{"href":"/ja/3.4.x/develop/plugins/getting-started/cli","matchLevel":1}}},"lastModified":"2026-11-20T05:49:09.800Z","originalFileLocation":"en/3.4.x/develop/plugins/getting-started/cli.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dify Enterprise Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Dify Plugin CLI - Dify Enterprise Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dify Enterprise Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dify-enterprise-docs.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Dify+Plugin+CLI\u0026amp;description=Install+the+Dify+Plugin+CLI%2C+scaffold+a+new+plugin+project%2C+and+run+it+against+a+Dify+instance+for+local+development\u0026amp;theme=e95e546bd9c3a8e3c27c730b\u0026amp;signature=d9f8ce9bc778e2a234fc8729b8e8ec295100036613c4dfeb741fd8dd68d485f4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Dify Plugin CLI - Dify Enterprise Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dify-enterprise-docs.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Dify+Plugin+CLI\u0026amp;description=Install+the+Dify+Plugin+CLI%2C+scaffold+a+new+plugin+project%2C+and+run+it+against+a+Dify+instance+for+local+development\u0026amp;theme=e95e546bd9c3a8e3c27c730b\u0026amp;signature=d9f8ce9bc778e2a234fc8729b8e8ec295100036613c4dfeb741fd8dd68d485f4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dify Enterprise Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0060FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/3.4.x/develop/plugins/getting-started/cli.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://enterprise-docs.dify.ai/zh/3.4.x/develop/plugins/getting-started/cli\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://enterprise-docs.dify.ai/ja/3.4.x/develop/plugins/getting-started/cli\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://enterprise-docs.dify.ai/#organization\",\"name\":\"Dify Enterprise Docs\",\"url\":\"https://enterprise-docs.dify.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://assets-docs.dify.ai/2025/05/d05cfc6ebe48f725d171dc71c64a5d16.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://enterprise-docs.dify.ai#website\",\"name\":\"Dify Enterprise Docs\",\"url\":\"https://enterprise-docs.dify.ai\",\"publisher\":{\"@id\":\"https://enterprise-docs.dify.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli#webpage\",\"url\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli\",\"name\":\"Dify Plugin CLI\",\"description\":\"Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development\",\"dateModified\":\"2026-11-20T05:49:09.800Z\",\"isPartOf\":{\"@id\":\"https://enterprise-docs.dify.ai#website\"},\"breadcrumb\":{\"@id\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Getting Started\",\"item\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/getting-started-dify-plugin\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dify Plugin CLI\",\"item\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli#article\",\"headline\":\"Dify Plugin CLI\",\"name\":\"Dify Plugin CLI\",\"description\":\"Install the Dify Plugin CLI, scaffold a new plugin project, and run it against a Dify instance for local development\",\"url\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli\",\"mainEntityOfPage\":{\"@id\":\"https://enterprise-docs.dify.ai/en/3.4.x/develop/plugins/getting-started/cli#webpage\"},\"dateModified\":\"2026-11-20T05:49:09.800Z\",\"publisher\":{\"@id\":\"https://enterprise-docs.dify.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://enterprise-docs.dify.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dify Enterprise Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Dify Enterprise Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/3.4.x/develop/plugins/getting-started/cli.md","siteName":"Dify Enterprise Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"versions":[{"version":"3.13.x","tag":"LTS","pages":[{"title":"3.13.x","href":"/en/3.13.x/develop/plugins/getting-started/cli"}]},{"version":"3.12.x","pages":[{"title":"3.12.x","href":"/en/3.12.x/develop/plugins/getting-started/cli"}]},{"version":"3.11.x","pages":[{"title":"3.11.x","href":"/en/3.11.x/develop/plugins/getting-started/cli"}]},{"version":"3.10.x","pages":[{"title":"3.10.x","href":"/en/3.10.x/develop/plugins/getting-started/cli"}]},{"version":"3.9.x","tag":"LTS","pages":[{"title":"3.9.x","href":"/en/3.9.x/develop/plugins/getting-started/cli"}]},{"version":"3.8.x","pages":[{"title":"3.8.x","href":"/en/3.8.x/develop/plugins/getting-started/cli"}]},{"version":"3.7.x","pages":[{"title":"3.7.x","href":"/en/3.7.x/develop/plugins/getting-started/cli"}]},{"version":"3.6.x","pages":[{"title":"3.6.x","href":"/en/3.6.x/develop/plugins/getting-started/cli"}]},{"version":"3.5.x","pages":[{"title":"3.5.x","href":"/en/3.5.x/develop/plugins/getting-started/cli"}]},{"version":"3.4.x","tabs":[{"tab":"Deploy","pages":[{"title":"Deploy","href":"/en/3.4.x/deploy/checklist"}]},{"tab":"Administer","pages":[{"title":"Administer","href":"/en/3.4.x/administer/workspace-management"}]},{"tab":"Use","pages":[{"title":"Use","href":"/en/3.4.x/use/build/workflow-chatflow"}]},{"tab":"Developer Resources","menu":[{"item":"Workspace API","pages":[{"title":"Workspace API","href":"/en/3.4.x/develop/api/guides/get-started"}]},{"item":"Plugins","groups":[{"group":"Getting Started","icon":"rocket","pages":[{"title":"Dify Plugin","href":"/en/3.4.x/develop/plugins/getting-started/getting-started-dify-plugin"},{"title":"Choose a Plugin Type","description":"A short decision guide for picking between Tool, Model, Agent Strategy, and Extension plugins","href":"/en/3.4.x/develop/plugins/getting-started/choose-plugin-type"},{"title":"Dify Plugin CLI","href":"/en/3.4.x/develop/plugins/getting-started/cli"}]},{"group":"Features \u0026 Specs","icon":"list-check","pages":[{"group":"Plugin Types","pages":[{"title":"General Specs","description":"Common data structures shared across plugin types, including I18nObject, ProviderConfig, ModelConfig, NodeResponse, and ToolSelector","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/general-specifications"},{"title":"Model Specs","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/model-designing-rules"},{"title":"Model API Interface","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/model-schema"},{"title":"Persistent Storage","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/persistent-storage-kv"},{"title":"Tool Return","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/tool"},{"title":"Manifest","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/plugin-info-by-manifest"},{"title":"Multilingual README","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/multilingual-readme"},{"title":"Plugin Debugging","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/remote-debug-a-plugin"},{"title":"Plugin Logging","href":"/en/3.4.x/develop/plugins/features-and-specs/plugin-types/plugin-logging"}]},{"group":"Advanced Development","pages":[{"group":"Reverse Calling","pages":[{"title":"Bundle Plugin Package","href":"/en/3.4.x/develop/plugins/features-and-specs/advanced-development/bundle"},{"title":"Reverse Invocation of Dify Services","href":"/en/3.4.x/develop/plugins/features-and-specs/advanced-development/reverse-invocation"},{"title":"App","href":"/en/3.4.x/develop/plugins/features-and-specs/advanced-development/reverse-invocation-app"},{"title":"Reverse Invocation Model","href":"/en/3.4.x/develop/plugins/features-and-specs/advanced-development/reverse-invocation-model"},{"title":"Tool","href":"/en/3.4.x/develop/plugins/features-and-specs/advanced-development/reverse-invocation-tool"},{"title":"Integrate Custom Models","href":"/en/3.4.x/develop/plugins/features-and-specs/advanced-development/customizable-model"},{"title":"Node","href":"/en/3.4.x/develop/plugins/features-and-specs/advanced-development/reverse-invocation-node"}]}]}]},{"group":"Development Guides \u0026 Walkthroughs","icon":"code","pages":[{"title":"Cheatsheet","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/cheatsheet"},{"group":"By Plugin Type","pages":[{"title":"Tool Plugin","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/tool-plugin"},{"title":"Tool OAuth","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/tool-oauth"},{"title":"Model Provider Plugin","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/creating-new-model-provider"},{"title":"Agent Strategy Plugin","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/agent-strategy-plugin"},{"title":"Endpoint Plugin","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/endpoint"}]},{"group":"Full Walkthroughs","pages":[{"title":"Flomo Tool (10-min)","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/develop-flomo-plugin"},{"title":"Slack Bot","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin"},{"title":"Markdown Exporter","href":"/en/3.4.x/develop/plugins/dev-guides-and-walkthroughs/develop-md-exporter"}]}]},{"group":"Publishing","icon":"upload","pages":[{"title":"Publish Plugins","href":"/en/3.4.x/develop/plugins/publishing/marketplace-listing/release-overview"},{"group":"Standards","pages":[{"title":"Plugin Development Guidelines","href":"/en/3.4.x/develop/plugins/publishing/standards/contributor-covenant-code-of-conduct"},{"title":"Privacy Guidelines","href":"/en/3.4.x/develop/plugins/publishing/standards/privacy-protection-guidelines"}]},{"title":"Publish a Plugin to Marketplace","sidebarTitle":"Marketplace","href":"/en/3.4.x/develop/plugins/publishing/marketplace-listing/submit-plugin-to-marketplace"},{"group":"GitHub Repository","pages":[{"title":"Publish to Individual GitHub Repository","href":"/en/3.4.x/develop/plugins/publishing/marketplace-listing/release-to-individual-github-repo"}]},{"group":"Local File","pages":[{"title":"Package as Local File and Share","href":"/en/3.4.x/develop/plugins/publishing/marketplace-listing/release-by-file"},{"title":"Sign Plugins for Third-Party Signature Verification","href":"/en/3.4.x/develop/plugins/publishing/standards/third-party-signature-verification"}]},{"title":"Frequently Asked Questions","sidebarTitle":"FAQ","href":"/en/3.4.x/develop/plugins/publishing/faq/faq"}]}]}]}]},{"version":"3.3.x","pages":[{"title":"3.3.x","href":"/en/3.3.x/develop/plugins/getting-started/cli"}]},{"version":"3.2.x","pages":[{"title":"3.2.x","href":"/en/3.2.x/develop/plugins/getting-started/cli"}]},{"version":"3.1.x","pages":[{"title":"3.1.x","href":"/en/3.1.x/develop/plugins/getting-started/cli"}]},{"version":"3.0.x","pages":[{"title":"3.0.x","href":"/en/3.0.x/develop/plugins/getting-started/cli"}]},{"version":"2.8.x","pages":[{"title":"2.8.x","href":"/en/2.8.x/deploy/checklist"}]},{"version":"2.7.x","pages":[{"title":"2.7.x","href":"/en/2.7.x/deploy/checklist"}]},{"version":"2.6.x","pages":[{"title":"2.6.x","href":"/en/2.6.x/deploy/checklist"}]},{"version":"2.5.x","pages":[{"title":"2.5.x","href":"/en/2.5.x/deploy/checklist"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/3.4.x/develop/plugins/getting-started/cli"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/3.4.x/develop/plugins/getting-started/cli"}]}]},"basePath":"","title":"Dify Plugin CLI - Dify Enterprise Docs","deploymentId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","buildId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","dynamics":[],"chunks":[]}