mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-28 13:38:36 +07:00
111 lines
4.6 KiB
Plaintext
111 lines
4.6 KiB
Plaintext
---
|
||
title: 開発環境のセットアップ
|
||
---
|
||
|
||
|
||
{/*
|
||
コントリビューター注:
|
||
----------------
|
||
これはレガシードキュメントであり、非推奨になります。
|
||
このバージョンに変更を加えないでください。
|
||
すべての更新は新しいバージョンに向けられるべきです:
|
||
/plugin-dev-ja/0221-initialize-development-tools
|
||
*/}
|
||
|
||
<Card title="このドキュメントはまもなく非推奨になります" icon="circle-exclamation" href="/plugin-dev-ja/0221-initialize-development-tools">
|
||
<p>ドキュメント再編の一環として、このページは段階的に廃止されます。</p>
|
||
|
||
<p><u><b>このカードをクリックして</b></u>、最新情報が含まれる更新版にリダイレクトしてください。</p>
|
||
|
||
<p>新しいドキュメントに不一致や改善が必要な箇所を見つけた場合は、ページ下部の「問題を報告」ボタンを使用してください。</p>
|
||
</Card>
|
||
|
||
Difyプラグインの開発を始める前に、以下の前提条件を準備してください:
|
||
* [DifyプラグインCLIツール](https://github.com/langgenius/dify-plugin-daemon?tab=readme-ov-file#cli)
|
||
* [Python 3.12+](https://docs.python.org/3.12/using/index.html)
|
||
|
||
## **1. DifyプラグインCLIツールのインストール**
|
||
|
||
DifyプラグインCLIツールは、Homebrew(LinuxおよびmacOS用)またはスタンドアロンのバイナリ実行ファイル(Windows、Linux、macOS用)でインストールできます。
|
||
|
||
### Homebrewでのインストール
|
||
|
||
macOSおよびLinuxユーザーには、[Homebrew](https://brew.sh/)を使用してDifyプラグインCLIをインストールすることをお勧めします。
|
||
|
||
[DifyプラグインCLIツールのHomebrewフォーミュラ](https://github.com/langgenius/homebrew-dify)をタップし、次に`brew install`でインストールします。
|
||
|
||
```bash
|
||
brew tap langgenius/dify
|
||
brew install dify
|
||
```
|
||
|
||
インストールを確認するには、`dify version`を実行し、バージョンコードが表示されるはずです。
|
||
```bash
|
||
dify version
|
||
```
|
||
|
||
DifyプラグインCLIツールをアップグレードするには、次のコマンドを実行します:
|
||
|
||
```bash
|
||
brew upgrade dify
|
||
```
|
||
|
||
### バイナリ実行ファイルでのインストール
|
||
|
||
**バイナリ実行ファイルをダウンロード:**
|
||
|
||
[DifyプラグインCLIツールのリリースページ](https://github.com/langgenius/dify-plugin-daemon/releases)のアセットリストから、OSシステム(Linux / macOS / Windows)とチップアーキテクチャ(`amd64`はx86チップ用、`arm64`はARMまたはAppleのMチップ用)に適したバイナリ実行ファイルを選択してダウンロードします。
|
||
|
||
**macOSのMチップ**を例にとると、`dify-plugin-darwin-arm64`ファイルをダウンロードし、次のコマンドを実行して実行権限を付与します:
|
||
```bash
|
||
chmod +x ./dify-plugin-darwin-arm64
|
||
mv ./dify-plugin-darwin-arm64 ./dify
|
||
```
|
||
|
||
インストールを確認するには、`./dify version`を実行し、バージョンコードが表示されるはずです。
|
||
```bash
|
||
./dify version
|
||
```
|
||
|
||
> システムが「Appleは確認できません」と表示する場合は、**設定 → プライバシーとセキュリティ → セキュリティ**に移動し、「今すぐ開く」ボタンをクリックします。
|
||
|
||
<Info>
|
||
**ヒント:**
|
||
`dify`コマンドをグローバルにシステム全体で使用するには、バイナリファイルの名前を`dify`に変更し、`/usr/local/bin`システムパスにコピーすることを推奨します。
|
||
</Info>
|
||
|
||
## **2. プラグインの開発**
|
||
|
||
さまざまな種類のプラグイン開発の例については、以下のコンテンツを参照してください。
|
||
|
||
<Card title="tool-plugin.md" icon="link" href="tool-plugin.md">
|
||
tool-plugin.md
|
||
</Card>
|
||
|
||
<Card title="model-plugin" icon="link" href="model-plugin/">
|
||
model-plugin
|
||
</Card>
|
||
|
||
<Card title="agent-strategy-plugin.md" icon="link" href="agent-strategy-plugin.md">
|
||
agent-strategy-plugin.md
|
||
</Card>
|
||
|
||
<Card title="extension.md" icon="link" href="extension-plugin.md">
|
||
extension.md
|
||
</Card>
|
||
|
||
<Card title="bundle.md" icon="link" href="bundle.md">
|
||
bundle.md
|
||
</Card>
|
||
|
||
{/*
|
||
Contributing Section
|
||
DO NOT edit this section!
|
||
It will be automatically generated by the script.
|
||
*/}
|
||
|
||
---
|
||
|
||
[このページを編集する](https://github.com/langgenius/dify-docs/edit/main/ja-jp/plugins/quick-start/develop-plugins/initialize-development-tools.mdx) | [問題を報告する](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml)
|
||
|