mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
123 lines
5.5 KiB
Plaintext
123 lines
5.5 KiB
Plaintext
---
|
||
title: 開発環境のセットアップ
|
||
---
|
||
|
||
|
||
{/*
|
||
コントリビューター注:
|
||
----------------
|
||
これはレガシードキュメントであり、非推奨になります。
|
||
このバージョンに変更を加えないでください。
|
||
すべての更新は新しいバージョンに向けられるべきです:
|
||
/plugin_dev_ja/0221-initialize-development-tools.ja
|
||
*/}
|
||
|
||
<Card title="このドキュメントはまもなく非推奨になります" icon="circle-exclamation" href="/plugin_dev_ja/0221-initialize-development-tools.ja">
|
||
<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.
|
||
*/}
|
||
|
||
<CardGroup cols="2">
|
||
<Card
|
||
title="このページを編集する"
|
||
icon="pen-to-square"
|
||
href="https://github.com/langgenius/dify-docs-mintlify/edit/main/ja-jp/plugins/quick-start/develop-plugins/initialize-development-tools.mdx"
|
||
>
|
||
直接貢献することでドキュメントの改善にご協力ください
|
||
</Card>
|
||
<Card
|
||
title="問題を報告する"
|
||
icon="github"
|
||
href="https://github.com/langgenius/dify-docs-mintlify/issues/new?title=ドキュメントの問題%3A%20alize-development-to&body=%23%23%20問題の説明%0A%3C%21--%20発見した問題について簡単に説明してください%20--%3E%0A%0A%23%23%20ページリンク%0Ahttps%3A%2F%2Fgithub.com%2Flanggenius%2Fdify-docs-mintlify%2Fblob%2Fmain%2Fja-jp/plugins/quick-start/develop-plugins%2Finitialize-development-tools.mdx%0A%0A%23%23%20提案される変更%0A%3C%21--%20特定の変更案がある場合は、ここで説明してください%20--%3E%0A%0A%3C%21--%20ドキュメントの品質向上にご協力いただきありがとうございます!%20--%3E"
|
||
>
|
||
エラーを見つけたり提案がありますか?お知らせください
|
||
</Card>
|
||
</CardGroup>
|