mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-17 14:14:26 +01:00
docs: Add CLIExtensionInstructions Component + Update Tutorial Template (#2634)
This commit is contained in:
@@ -1,225 +0,0 @@
|
|||||||
---
|
|
||||||
title: {name} Extension
|
|
||||||
description: Add {name} MCP Server as a Goose Extension
|
|
||||||
---
|
|
||||||
|
|
||||||
import Tabs from '@theme/Tabs';
|
|
||||||
import TabItem from '@theme/TabItem';
|
|
||||||
import YouTubeShortEmbed from '@site/src/components/YouTubeShortEmbed';
|
|
||||||
|
|
||||||
<YouTubeShortEmbed videoUrl="https://www.youtube.com/embed/VIDEO_ID" />
|
|
||||||
|
|
||||||
|
|
||||||
This tutorial covers how to add the [{name} MCP Server](/) as a Goose extension to enable file operations, repository management, search functionality, and more.
|
|
||||||
|
|
||||||
:::tip TLDR
|
|
||||||
<Tabs groupId="interface">
|
|
||||||
<TabItem value="ui" label="Goose Desktop" default>
|
|
||||||
[Launch the installer]({goose_url})
|
|
||||||
</TabItem>
|
|
||||||
<TabItem value="cli" label="Goose CLI">
|
|
||||||
**Command**
|
|
||||||
```sh
|
|
||||||
{command}
|
|
||||||
```
|
|
||||||
</TabItem>
|
|
||||||
</Tabs>
|
|
||||||
**Environment Variable**
|
|
||||||
```
|
|
||||||
{env_var}: <ENV_VALUE>
|
|
||||||
```
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
:::info
|
|
||||||
Note that you'll need [Node.js](https://nodejs.org/) installed on your system to run this command, as it uses `npx`.
|
|
||||||
:::
|
|
||||||
|
|
||||||
:::info
|
|
||||||
Note that you'll need [uv](https://docs.astral.sh/uv/#installation) installed on your system to run this command, as it uses `uvx`.
|
|
||||||
:::
|
|
||||||
|
|
||||||
:::info
|
|
||||||
Note that you'll need [JBang](https://www.jbang.dev/download) installed on your system to run this command, as it uses `jbang`.
|
|
||||||
:::
|
|
||||||
|
|
||||||
<Tabs groupId="interface">
|
|
||||||
<TabItem value="ui" label="Goose Desktop" default>
|
|
||||||
1. [Launch the installer]({goose_url})
|
|
||||||
2. Press `Yes` to confirm the installation
|
|
||||||
3. Obtain a [XYZ Access Token](/) and paste it in
|
|
||||||
4. Click `Save Configuration`
|
|
||||||
5. Scroll to the top and click `Exit` from the upper left corner
|
|
||||||
</TabItem>
|
|
||||||
<TabItem value="cli" label="Goose CLI">
|
|
||||||
1. Run the `configure` command:
|
|
||||||
```sh
|
|
||||||
goose configure
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Choose to add a `Command-line Extension`
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◆ What type of extension would you like to add?
|
|
||||||
│ ○ Built-in Extension
|
|
||||||
// highlight-start
|
|
||||||
│ ● Command-line Extension (Run a local command or script)
|
|
||||||
// highlight-end
|
|
||||||
│ ○ Remote Extension
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Give your extension a name
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◆ What would you like to call this extension?
|
|
||||||
│ {name}
|
|
||||||
// highlight-end
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Enter the command
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
◇ What would you like to call this extension?
|
|
||||||
│ {name}
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◆ What command should be run?
|
|
||||||
│ {command}
|
|
||||||
// highlight-end
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Enter the number of seconds Goose should wait for actions to complete before timing out. Default is 300s
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
◇ What would you like to call this extension?
|
|
||||||
│ {name}
|
|
||||||
│
|
|
||||||
◇ What command should be run?
|
|
||||||
│ {command}
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◆ Please set the timeout for this tool (in secs):
|
|
||||||
│ 300
|
|
||||||
// highlight-end
|
|
||||||
│
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
6. Choose to add a description. If you select "Yes" here, you will be prompted to enter a description for the extension.
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
◇ What would you like to call this extension?
|
|
||||||
│ {name}
|
|
||||||
│
|
|
||||||
◇ What command should be run?
|
|
||||||
│ {command}
|
|
||||||
│
|
|
||||||
◆ Please set the timeout for this tool (in secs):
|
|
||||||
│ 300
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◇ Would you like to add a description?
|
|
||||||
│ No
|
|
||||||
// highlight-end
|
|
||||||
│
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
7. Obtain a [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens) and paste it in.
|
|
||||||
:::info
|
|
||||||
When creating your access token, you can specify the repositories and granular permissions you'd like Goose to have access to.
|
|
||||||
:::
|
|
||||||
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
◇ What would you like to call this extension?
|
|
||||||
│ {name}
|
|
||||||
│
|
|
||||||
◇ What command should be run?
|
|
||||||
│ {command}
|
|
||||||
│
|
|
||||||
◇ Please set the timeout for this tool (in secs):
|
|
||||||
│ 300
|
|
||||||
│
|
|
||||||
◇ Would you like to add a description?
|
|
||||||
│ No
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◆ Would you like to add environment variables?
|
|
||||||
│ Yes
|
|
||||||
│
|
|
||||||
◇ Environment variable name:
|
|
||||||
│ {env_var}
|
|
||||||
│
|
|
||||||
◇ Environment variable value:
|
|
||||||
│ ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
|
|
||||||
│
|
|
||||||
◇ Add another environment variable?
|
|
||||||
│ No
|
|
||||||
// highlight-end
|
|
||||||
└ Added github extension
|
|
||||||
```
|
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
</Tabs>
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
{describe any environment setup, access controls, and what you want to accomplish.}
|
|
||||||
|
|
||||||
### Goose Prompt
|
|
||||||
|
|
||||||
> _exact prompt_
|
|
||||||
|
|
||||||
|
|
||||||
### Goose Output
|
|
||||||
|
|
||||||
:::note Desktop
|
|
||||||
|
|
||||||
{exact output}
|
|
||||||
|
|
||||||
:::
|
|
||||||
135
documentation/docs/tutorials/_template_.mdx
Normal file
135
documentation/docs/tutorials/_template_.mdx
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
---
|
||||||
|
title: {name} Extension
|
||||||
|
|
||||||
|
escription: Add {name} MCP Server as a Goose Extension
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
import YouTubeShortEmbed from '@site/src/components/YouTubeShortEmbed';
|
||||||
|
import CLIExtensionInstructions from '@site/src/components/CLIExtensionInstructions';
|
||||||
|
|
||||||
|
|
||||||
|
<YouTubeShortEmbed videoUrl="https://www.youtube.com/embed/VIDEO_ID" />
|
||||||
|
|
||||||
|
|
||||||
|
This tutorial covers how to add the [{name} MCP Server](/) as a Goose extension to enable file operations, repository management, search functionality, and more.
|
||||||
|
|
||||||
|
:::tip TLDR
|
||||||
|
<Tabs groupId="interface">
|
||||||
|
<TabItem value="ui" label="Goose Desktop" default>
|
||||||
|
[Launch the installer]({goose_url})
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="cli" label="Goose CLI">
|
||||||
|
**Command**
|
||||||
|
```sh
|
||||||
|
{command}
|
||||||
|
```
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
**Environment Variable**
|
||||||
|
```
|
||||||
|
{env_var}: <ENV_VALUE>
|
||||||
|
```
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
:::info
|
||||||
|
Note that you'll need [Node.js](https://nodejs.org/) installed on your system to run this command, as it uses `npx`.
|
||||||
|
:::
|
||||||
|
|
||||||
|
:::info
|
||||||
|
Note that you'll need [uv](https://docs.astral.sh/uv/#installation) installed on your system to run this command, as it uses `uvx`.
|
||||||
|
:::
|
||||||
|
|
||||||
|
:::info
|
||||||
|
Note that you'll need [JBang](https://www.jbang.dev/download) installed on your system to run this command, as it uses `jbang`.
|
||||||
|
:::
|
||||||
|
|
||||||
|
<Tabs groupId="interface">
|
||||||
|
<TabItem value="ui" label="Goose Desktop" default>
|
||||||
|
1. [Launch the installer]({goose_url})
|
||||||
|
2. Press <code>Yes</code> to confirm the installation
|
||||||
|
3. Obtain a [XYZ Access Token](/) and paste it in
|
||||||
|
4. Click <code>Save Configuration</code>
|
||||||
|
5. Scroll to the top and click <code>Exit</code> from the upper left corner
|
||||||
|
</TabItem>
|
||||||
|
|
||||||
|
<TabItem value="cli" label="Goose CLI (No Env Vars)">
|
||||||
|
<CLIExtensionInstructions
|
||||||
|
name="example"
|
||||||
|
command="npx -y @modelcontextprotocol/server-example"
|
||||||
|
timeout={300}
|
||||||
|
/>
|
||||||
|
</TabItem>
|
||||||
|
|
||||||
|
<TabItem value="cli" label="Goose CLI (ONE env variable & infoNote linking where to obtain one)">
|
||||||
|
|
||||||
|
<CLIExtensionInstructions
|
||||||
|
name="github"
|
||||||
|
command="gh issue list"
|
||||||
|
timeout={300}
|
||||||
|
envVars={[
|
||||||
|
{ key: "GITHUB_TOKEN", value: "••••••••••••••••" }
|
||||||
|
]}
|
||||||
|
infoNote={
|
||||||
|
<>
|
||||||
|
When creating your access token, you can specify the repositories and granular permissions you'd like Goose to have access to.{" "}
|
||||||
|
<a
|
||||||
|
href="https://github.com/settings/personal-access-tokens"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Create one here
|
||||||
|
</a>.
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="cli" label="Goose CLI (Multiple Env Vars & infoNote)">
|
||||||
|
|
||||||
|
<CLIExtensionInstructions
|
||||||
|
name="github"
|
||||||
|
command="gh issue list"
|
||||||
|
timeout={300}
|
||||||
|
envVars={[
|
||||||
|
{ key: "GITHUB_TOKEN", value: "••••••••••••••••" },
|
||||||
|
{ key: "REPO_SCOPE", value: "public" }
|
||||||
|
]}
|
||||||
|
infoNote={
|
||||||
|
<>
|
||||||
|
When creating your access token, you can specify the repositories and granular permissions you'd like Goose to have access to.{" "}
|
||||||
|
<a
|
||||||
|
href="https://github.com/settings/personal-access-tokens"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Create one here
|
||||||
|
</a>.
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
|
||||||
|
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
{describe any environment setup, access controls, and what you want to accomplish.}
|
||||||
|
|
||||||
|
### Goose Prompt
|
||||||
|
|
||||||
|
> _exact prompt_
|
||||||
|
|
||||||
|
|
||||||
|
### Goose Output
|
||||||
|
|
||||||
|
:::note Desktop
|
||||||
|
|
||||||
|
{exact output}
|
||||||
|
|
||||||
|
:::
|
||||||
@@ -6,6 +6,7 @@ description: Add GitHub MCP Server as a Goose Extension
|
|||||||
import Tabs from '@theme/Tabs';
|
import Tabs from '@theme/Tabs';
|
||||||
import TabItem from '@theme/TabItem';
|
import TabItem from '@theme/TabItem';
|
||||||
import YouTubeShortEmbed from '@site/src/components/YouTubeShortEmbed';
|
import YouTubeShortEmbed from '@site/src/components/YouTubeShortEmbed';
|
||||||
|
import CLIExtensionInstructions from '@site/src/components/CLIExtensionInstructions';
|
||||||
|
|
||||||
<YouTubeShortEmbed videoUrl="https://www.youtube.com/embed/TbmQDv3SQOE" />
|
<YouTubeShortEmbed videoUrl="https://www.youtube.com/embed/TbmQDv3SQOE" />
|
||||||
|
|
||||||
@@ -45,156 +46,27 @@ Note that you'll need [Node.js](https://nodejs.org/) installed on your system to
|
|||||||
5. Scroll to the top and click `Exit` from the upper left corner
|
5. Scroll to the top and click `Exit` from the upper left corner
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="cli" label="Goose CLI">
|
<TabItem value="cli" label="Goose CLI">
|
||||||
1. Run the `configure` command:
|
|
||||||
```sh
|
|
||||||
goose configure
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Choose to add a `Command-line Extension`
|
<CLIExtensionInstructions
|
||||||
```sh
|
name="github"
|
||||||
┌ goose-configure
|
command="npx -y @modelcontextprotocol/server-github"
|
||||||
│
|
timeout={300}
|
||||||
◇ What would you like to configure?
|
envVars={[
|
||||||
│ Add Extension (Connect to a new extension)
|
{ key: "GITHUB_TOKEN", value: "••••••••••••••••" }
|
||||||
│
|
]}
|
||||||
◆ What type of extension would you like to add?
|
infoNote={
|
||||||
│ ○ Built-in Extension
|
<>
|
||||||
// highlight-start
|
When creating your access token, you can specify the repositories and granular permissions you'd like Goose to have access to.{" "}
|
||||||
│ ● Command-line Extension (Run a local command or script)
|
<a
|
||||||
// highlight-end
|
href="https://github.com/settings/personal-access-tokens"
|
||||||
│ ○ Remote Extension
|
target="_blank"
|
||||||
└
|
rel="noopener noreferrer"
|
||||||
```
|
>
|
||||||
|
Create one here
|
||||||
3. Give your extension a name
|
</a>.
|
||||||
```sh
|
</>
|
||||||
┌ goose-configure
|
}
|
||||||
│
|
/>
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◆ What would you like to call this extension?
|
|
||||||
│ github
|
|
||||||
// highlight-end
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Enter the command
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
◇ What would you like to call this extension?
|
|
||||||
│ github
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◆ What command should be run?
|
|
||||||
│ npx -y @modelcontextprotocol/server-github
|
|
||||||
// highlight-end
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Enter the number of seconds Goose should wait for actions to complete before timing out. Default is 300s
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
◇ What would you like to call this extension?
|
|
||||||
│ github
|
|
||||||
│
|
|
||||||
◇ What command should be run?
|
|
||||||
│ npx -y @modelcontextprotocol/server-github
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◆ Please set the timeout for this tool (in secs):
|
|
||||||
│ 300
|
|
||||||
// highlight-end
|
|
||||||
│
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
6. Choose to add a description. If you select "Yes" here, you will be prompted to enter a description for the extension.
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
◇ What would you like to call this extension?
|
|
||||||
│ github
|
|
||||||
│
|
|
||||||
◇ What command should be run?
|
|
||||||
│ npx -y @modelcontextprotocol/server-github
|
|
||||||
│
|
|
||||||
◆ Please set the timeout for this tool (in secs):
|
|
||||||
│ 300
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◇ Would you like to add a description?
|
|
||||||
│ No
|
|
||||||
// highlight-end
|
|
||||||
│
|
|
||||||
└
|
|
||||||
```
|
|
||||||
|
|
||||||
7. Obtain a [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens) and paste it in.
|
|
||||||
:::info
|
|
||||||
When creating your access token, you can specify the repositories and granular permissions you'd like Goose to have access to.
|
|
||||||
:::
|
|
||||||
|
|
||||||
```sh
|
|
||||||
┌ goose-configure
|
|
||||||
│
|
|
||||||
◇ What would you like to configure?
|
|
||||||
│ Add Extension (Connect to a new extension)
|
|
||||||
│
|
|
||||||
◇ What type of extension would you like to add?
|
|
||||||
│ Command-line Extension
|
|
||||||
│
|
|
||||||
◇ What would you like to call this extension?
|
|
||||||
│ github
|
|
||||||
│
|
|
||||||
◇ What command should be run?
|
|
||||||
│ npx -y @modelcontextprotocol/server-github
|
|
||||||
│
|
|
||||||
◇ Please set the timeout for this tool (in secs):
|
|
||||||
│ 300
|
|
||||||
│
|
|
||||||
◇ Would you like to add a description?
|
|
||||||
│ No
|
|
||||||
│
|
|
||||||
// highlight-start
|
|
||||||
◆ Would you like to add environment variables?
|
|
||||||
│ Yes
|
|
||||||
│
|
|
||||||
◇ Environment variable name:
|
|
||||||
│ GITHUB_PERSONAL_ACCESS_TOKEN
|
|
||||||
│
|
|
||||||
◇ Environment variable value:
|
|
||||||
│ ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
|
|
||||||
│
|
|
||||||
◇ Add another environment variable?
|
|
||||||
│ No
|
|
||||||
// highlight-end
|
|
||||||
└ Added github extension
|
|
||||||
```
|
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|||||||
176
documentation/src/components/CLIExtensionInstructions.js
Normal file
176
documentation/src/components/CLIExtensionInstructions.js
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import CodeBlock from '@theme/CodeBlock';
|
||||||
|
|
||||||
|
export default function CLIExtensionInstructions({
|
||||||
|
name,
|
||||||
|
command,
|
||||||
|
timeout = 300,
|
||||||
|
envVars = [],
|
||||||
|
infoNote,
|
||||||
|
}) {
|
||||||
|
const hasEnvVars = envVars.length > 0;
|
||||||
|
const envStepText = hasEnvVars
|
||||||
|
? `Add environment variable${envVars.length > 1 ? 's' : ''} for ${name}`
|
||||||
|
: 'Choose No when asked to add environment variables';
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<ol>
|
||||||
|
<li>Run the <code>configure</code> command:</li>
|
||||||
|
</ol>
|
||||||
|
<CodeBlock language="sh">{`goose configure`}</CodeBlock>
|
||||||
|
|
||||||
|
<ol start={2}>
|
||||||
|
<li>Choose to add a <code>Command-line Extension</code>.</li>
|
||||||
|
</ol>
|
||||||
|
<CodeBlock language="sh">{`┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension (Connect to a new extension)
|
||||||
|
│
|
||||||
|
◆ What type of extension would you like to add?
|
||||||
|
│ ○ Built-in Extension
|
||||||
|
// highlight-start
|
||||||
|
│ ● Command-line Extension (Run a local command or script)
|
||||||
|
// highlight-end
|
||||||
|
│ ○ Remote Extension
|
||||||
|
└`}</CodeBlock>
|
||||||
|
|
||||||
|
<ol start={3}>
|
||||||
|
<li>Give your extension a name.</li>
|
||||||
|
</ol>
|
||||||
|
<CodeBlock language="sh">{`┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension (Connect to a new extension)
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Command-line Extension
|
||||||
|
// highlight-start
|
||||||
|
◆ What would you like to call this extension?
|
||||||
|
│ ${name}
|
||||||
|
// highlight-end
|
||||||
|
└`}</CodeBlock>
|
||||||
|
|
||||||
|
<ol start={4}>
|
||||||
|
<li>Enter the command to run when this extension is used.</li>
|
||||||
|
</ol>
|
||||||
|
<CodeBlock language="sh">{`┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension (Connect to a new extension)
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Command-line Extension
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ ${name}
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ What command should be run?
|
||||||
|
│ ${command}
|
||||||
|
// highlight-end
|
||||||
|
└`}</CodeBlock>
|
||||||
|
|
||||||
|
<ol start={5}>
|
||||||
|
<li>
|
||||||
|
Enter the number of seconds Goose should wait for actions to complete before timing out. Default is <code>300</code> seconds.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<CodeBlock language="sh">{`┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension (Connect to a new extension)
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Command-line Extension
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ ${name}
|
||||||
|
│
|
||||||
|
◇ What command should be run?
|
||||||
|
│ ${command}
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Please set the timeout for this tool (in secs):
|
||||||
|
│ ${timeout}
|
||||||
|
// highlight-end
|
||||||
|
└`}</CodeBlock>
|
||||||
|
|
||||||
|
<ol start={6}>
|
||||||
|
<li>Choose to add a description. If you select <code>Yes</code>, you’ll be prompted to enter a description for the extension.</li>
|
||||||
|
</ol>
|
||||||
|
<CodeBlock language="sh">{`┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension (Connect to a new extension)
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Command-line Extension
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ ${name}
|
||||||
|
│
|
||||||
|
◇ What command should be run?
|
||||||
|
│ ${command}
|
||||||
|
│
|
||||||
|
◇ Please set the timeout for this tool (in secs):
|
||||||
|
│ ${timeout}
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Would you like to add a description?
|
||||||
|
│ No
|
||||||
|
// highlight-end
|
||||||
|
└`}</CodeBlock>
|
||||||
|
|
||||||
|
<ol start={7}>
|
||||||
|
<li>{envStepText}</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
{hasEnvVars && (
|
||||||
|
<>
|
||||||
|
{infoNote && <div className="alert alert--info">{infoNote}</div>}
|
||||||
|
|
||||||
|
<CodeBlock language="sh">{`┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension (Connect to a new extension)
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Command-line Extension
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ ${name}
|
||||||
|
│
|
||||||
|
◇ What command should be run?
|
||||||
|
│ ${command}
|
||||||
|
│
|
||||||
|
◇ Please set the timeout for this tool (in secs):
|
||||||
|
│ ${timeout}
|
||||||
|
│
|
||||||
|
◇ Would you like to add a description?
|
||||||
|
│ No
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Would you like to add environment variables?
|
||||||
|
│ Yes
|
||||||
|
${envVars
|
||||||
|
.map(
|
||||||
|
({ key, value }, i) => `│
|
||||||
|
◇ Environment variable name:
|
||||||
|
│ ${key}
|
||||||
|
│
|
||||||
|
◇ Environment variable value:
|
||||||
|
│ ${value}
|
||||||
|
│
|
||||||
|
◇ Add another environment variable?
|
||||||
|
│ ${i === envVars.length - 1 ? 'No' : 'Yes'}`
|
||||||
|
)
|
||||||
|
.join('\n')}
|
||||||
|
// highlight-end
|
||||||
|
└ Added ${name} extension`}</CodeBlock>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user