# Configure the Dtwo Plugin in Codex

Install the Dtwo plugin in Codex, from the desktop app or the CLI.

## Install the plugin

<div class="doc-tabs" data-tabs>

<div class="doc-tablist" role="tablist" aria-label="Codex installation method">
<button type="button" role="tab" class="doc-tab" data-tab="app" aria-selected="true">Desktop app</button>
<button type="button" role="tab" class="doc-tab" data-tab="cli">CLI</button>
</div>

<div class="doc-tabpanel" data-panel="app" role="tabpanel">

1. Open **Plugins** in the ChatGPT/Codex desktop app.

2. Choose the option to add a marketplace, enter this repository, and confirm:

   ```text
   dtwoai/plugins
   ```

3. Open **Dtwo** in the marketplace and install the plugin.

4. Start a new task in Codex and ask it to connect to Dtwo. Complete the browser sign-in with your Dtwo account and organization.

</div>

<div class="doc-tabpanel" data-panel="cli" role="tabpanel">

1. With the Codex CLI installed, run this command in your terminal to add the Dtwo marketplace:

   ```bash
   codex plugin marketplace add dtwoai/plugins
   ```

2. Install the plugin from your terminal:

   ```bash
   codex plugin add dtwo@dtwo
   ```

3. Start a new task in Codex and ask it to connect to Dtwo. Complete the browser sign-in with your Dtwo account and organization.

</div>

</div>

## Verify the plugin works

Once the plugin is installed and connected, ask your client for something that only Dtwo can answer:

```text
List my Dtwo gateways and the policies attached to each.
```

If the plugin is wired up correctly, your client returns your gateways and their attached policies.

---

Having trouble? Email [support@dtwo.ai](mailto:support@dtwo.ai).