> For the complete documentation index, see [llms.txt](https://developers.doku.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.doku.com/developer-kit/ai-agent-toolkit.md).

# AI Agent Toolkit

## Claude Code

***

### Prerequisites

Before you begin, make sure [Claude Code](https://www.anthropic.com/claude-code?utm_source=chatgpt.com) is installed on your machine.

Install Claude Code globally:

```bash
npm install -g @anthropic-ai/claude-code
```

Verify the installation:

```bash
claude --version
```

***

### Installation Guide

#### Step 1: Clone the Plugin Repository

Clone the plugin repository to your local machine:

```bash
git clone <repo-url> ~/plugins
```

After cloning, your folder structure should look like this:

```
~/plugins/
├── marketplace.json        ← Plugin registry
├── doku-codegen/           ← Plugin directory
│   ├── plugin.json
│   ├── skills/
│   ├── agents/
│   └── ...
└── other-plugin/
```

> `marketplace.json` must exist at the root of the plugins directory. Claude Code uses this file to discover available plugins.

***

#### Step 2: Register the Marketplace

Start a Claude Code session:

```bash
claude
```

Inside the session, open the plugin manager:

```bash
/plugins
```

Then:

1. Select **Marketplace**
2. When prompted for the repository URL, enter:

```
git@github.com:PTNUSASATUINTIARTHA-DOKU/doku-codegen.git
```

> Make sure your GitHub SSH key is configured correctly before continuing.\
> If you receive a permission error, verify that your SSH key has access to the repository.

***

#### Step 3: Install the Plugin

Inside the Claude Code session, run:

```bash
/plugin install doku-codegen
```

After installation, reload the plugins:

```bash
/reload-plugins
```

***

#### Step 4: Use the Plugin

You’re ready to use the plugin.

Example command:

```bash
/doku-generate checkout
```

***

### List of Commands

| Command                     | Purpose                                                                  |
| --------------------------- | ------------------------------------------------------------------------ |
| /generate \[payment-method] | Main entry point full setup + generate                                   |
| /spec \[payment-method]     | Fetch and save a specific API spec                                       |
| /checklist                  | Run production readiness checks                                          |
| /test                       | Send a real request to DOKU sandbox to verify signature and connectivity |
| /postman                    | Export a Postman collection with a signature pre-request script          |
| /save-session \[note]       | Snapshot the current generation state                                    |
| /resume-session             | Continue from a saved snapshot                                           |

***

### Troubleshooting

| Problem                                        | What to Check                                                         |
| ---------------------------------------------- | --------------------------------------------------------------------- |
| `/plugin install` says marketplace not found   | Verify the plugins path in `settings.json` is correct                 |
| Plugin installed but commands are unavailable  | Run `/reload-plugins` after installation                              |
| `marketplace.json not found` error             | Ensure `marketplace.json` exists at the root of the plugins directory |
| Permission denied when registering marketplace | Confirm your SSH key has access to the GitHub repository              |

{% hint style="info" %}
**Tips**

***

1. Explore additional plugins listed in `marketplace.json`
2. Review `plugin.json` for supported commands and configuration
3. Check the `skills/` and `agents/` directories to understand plugin capabilities
   {% endhint %}

***

## Cursor

### Prerequisites

Before you begin, make sure you have:

* Cursor Desktop IDE installed (this plugin only works with the desktop IDE).
* Access to the DOKU Codegen repository.

***

### Installation Guide

#### Step 1 - Add the Plugin Repository

1. Open the Cursor Desktop IDE.
2. Go to Customize from the left sidebar.
3. Under Repositories, click the + icon.
4. Enter the repository URL:

```
https://github.com/PTNUSASATUINTIARTHA-DOKU/doku-cursor-codegen-plugin
```

**Note:**\
Make sure you have access to the repository before proceeding.

***

#### Step 2 - Install the Plugin

1. Navigate to Customize → Plugins.
2. Search for:

```
DOKU
```

3. Click Add on DOKU Codegen.
4. Completely quit Cursor (Cmd + Q) and reopen it.

**Note:**\
Plugins are only loaded when Cursor starts.

***

#### Step 3 - Verify the Installation

After restarting Cursor:

1. Go to Customize → Plugins.
2. Confirm DOKU Codegen appears in the plugin list.
3. Opening the plugin should display:

* 2 Sub-agents
* 7 Commands
* 8 Skills
* 1 Hooks Group

You can also verify from Agent Chat by typing:

```bash
/gen
```

It should autocomplete to:

```bash
/generate
```

***

#### Step 4 - Configure Your Credentials

You'll need your DOKU API credentials:

* CLIENT\_ID
* SECRET\_KEY

These can be obtained from: DOKU Dashboard → Integration → API Keys

You can configure them in one of two ways:

**Option 1 - Let the Plugin Prompt You (Recommended)**

In Agent Chat, run:

```bash
Generate a DOKU Virtual Account client
```

The plugin will automatically ask for your credentials and save them locally.

**Option 2 - Create the Configuration File Manually**

Create:

```bash
.cursor/doku-codegen.local.md
```

Example:

```bash
---
CLIENT_ID: BRN-XXXX-XXXXXXXXXXXXX
SECRET_KEY: your_secret_key_here
ENVIRONMENT: sandbox
---
```

***

#### Step 5 - Generate Your First Client

Open your project in Cursor (File → Open Folder).

Then, in Agent Chat, run:

```bash
Generate a DOKU checkout client in this project
```

The plugin will automatically:

* Detect your project's language and framework.
* Fetch the latest DOKU API specification.
* Generate a production-ready API client.
* Run quality and security validation.
* Provide a production readiness checklist.

***

### List of Commands

| Command                     | Purpose                                                                  |
| --------------------------- | ------------------------------------------------------------------------ |
| /generate \[payment-method] | Main entry point full setup + generate                                   |
| /spec \[payment-method]     | Fetch and save a specific API spec                                       |
| /checklist                  | Run production readiness checks                                          |
| /test                       | Send a real request to DOKU sandbox to verify signature and connectivity |
| /postman                    | Export a Postman collection with a signature pre-request script          |
| /save-session \[note]       | Snapshot the current generation state                                    |
| /resume-session             | Continue from a saved snapshot                                           |

***

## Codex

{% hint style="info" %}
The installation guide is available upon request. Please contact our Sales team for access by [submitting this form](https://www.doku.com/contact-sales?utm_source=docs).
{% endhint %}
