# How to Integrate the i-have-adhd Plugin with Productivity Tools: A Complete Guide

> Learn how to integrate the i-have-adhd plugin with your favorite productivity tools using HTTP requests, CLI, or JavaScript. Unlock seamless workflow automation today.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: how-to-guide
- Published: 2026-08-24

---

**The i-have-adhd plugin can integrate with any productivity tool that supports HTTP requests, CLI commands, or JavaScript/TypeScript execution through its OpenCode extension architecture.**

The `i-have-adhd` plugin from the `ayghri/i-have-adhd` repository is built as a runtime-agnostic OpenCode extension, enabling seamless connectivity with task managers, automation platforms, and custom workflows. Because the plugin exposes standardized integration points—from webhooks to TypeScript bindings—users can embed ADHD-friendly assistance directly into their existing productivity stack without switching contexts.

## Architecture Overview

The plugin's modular structure supports cross-platform integration through four core components defined in the source code:

- **[`plugin.json`](https://github.com/ayghri/i-have-adhd/blob/main/plugin.json)** – Declares the plugin name, supported runtimes, and command entry-point
- **`.opencode/plugins/i-have-adhd.mjs`** – Contains the core logic for generating ADHD-friendly responses
- **[`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) and `hooks/always-on.mjs`** – Expose an "always-on" webhook that accepts HTTP POST requests from external services
- **[`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts)** – Provides TypeScript bindings for compile-time IDE support and SDK integration

## Integration Methods

### Command Line Interface

Invoke the plugin directly from terminal environments or shell scripts using the OpenCode CLI. This method works best for users who want to trigger ADHD-friendly assistance from cron jobs, habit trackers, or local automation scripts.

```bash
opencode run i-have-adhd "Help me plan my study session for tomorrow."

```

### HTTP Webhook (Always-On Hook)

The `always-on` webhook defined in [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) allows any service capable of issuing HTTP POST requests to retrieve responses without launching a full runtime. This enables integration with automation platforms like Zapier, IFTTT, or n8n.

```javascript
import fetch from "node-fetch";

async function getADHDHelp(prompt) {
  const resp = await fetch("http://localhost:3000/hooks/always-on", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ input: prompt })
  });
  const data = await resp.json();
  console.log(data.output);
}

getADHDHelp("Give me a concise to-do list for my morning routine");

```

### TypeScript SDK

For applications built with TypeScript, the plugin offers first-class SDK support through [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts). Import the bindings to get compile-time type checking and IDE autocomplete when integrating with project management tools like Notion or Todoist.

```typescript
import { runPlugin } from "@opencode/sdk";

async function askADHDAssistant(question: string) {
  const result = await runPlugin("i-have-adhd", { input: question });
  return result.output;
}

await askADHDAssistant("Break down my project into bite-size tasks");

```

### Other OpenCode Runtimes

The plugin loads the same [`plugin.json`](https://github.com/ayghri/i-have-adhd/blob/main/plugin.json) manifest across multiple AI runtimes including Claude, Codex, Pi, OMP, Gemini, Qwen, and Kimi. This allows the i-have-adhd plugin to operate within larger AI assistants that orchestrate multiple productivity tools simultaneously.

## Real-World Productivity Integrations

### Zapier and Asana Workflow

Connect the webhook to Zapier to automatically generate focus-friendly plans when new tasks are created. Configure a "Webhooks by Zapier" action to POST to `http://localhost:3000/hooks/always-on` with a JSON body containing the Asana task name as the `input` field, then map the response to add a comment on the task.

### Todoist Automation

Use the Node.js fetch example within Todoist's custom automation features to preprocess tasks before they hit your inbox. The `hooks/always-on.mjs` endpoint returns JSON that can be parsed to break complex projects into ADHD-friendly subtasks.

### Notion Custom Scripts

Embed the TypeScript SDK calls inside Notion API scripts to generate dynamic content blocks or page summaries optimized for attention management, leveraging the type definitions in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) for reliable integration.

## Key Source Files

Understanding these implementation files is crucial for advanced integrations:

| File | Purpose |
|------|---------|
| [`plugin.json`](https://github.com/ayghri/i-have-adhd/blob/main/plugin.json) | Declares plugin metadata, version, and entry points |
| `.opencode/plugins/i-have-adhd.mjs` | Core response generation logic |
| [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) | Defines webhook metadata and endpoint configuration |
| `hooks/always-on.mjs` | Server-side handler for HTTP requests |
| [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) | TypeScript type definitions for SDK usage |
| [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) | Canonical skill documentation describing response rules |

## Summary

- The **i-have-adhd plugin** integrates with productivity tools through multiple OpenCode-compatible interfaces
- **CLI invocation** (`opencode run i-have-adhd`) supports shell-based workflows and local automation scripts
- **HTTP webhook** (`hooks/always-on.mjs`) enables no-code platforms like Zapier and IFTTT to retrieve ADHD-friendly suggestions via POST requests
- **TypeScript SDK** ([`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts)) provides type-safe integration for JavaScript-based productivity applications
- **Runtime-agnostic architecture** allows the plugin to function across Claude, Codex, Gemini, and other OpenCode-compatible AI assistants

## Frequently Asked Questions

### Can I use the i-have-adhd plugin with Zapier?

Yes. The plugin's `always-on` webhook endpoint accepts standard HTTP POST requests, making it compatible with Zapier's "Webhooks by Zapier" action. Configure a POST request to `http://<your-host>/hooks/always-on` with a JSON body containing an `input` field, and Zapier will receive the ADHD-friendly response as JSON data that can be mapped to subsequent steps in your automation.

### Does the plugin work with Todoist or Notion?

Yes. Both Todoist (through its JavaScript automation features) and Notion (via custom API scripts) can import the TypeScript SDK or make HTTP requests to the webhook endpoint. The [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) file provides type definitions that enable autocomplete support when writing integration scripts for these platforms.

### Is coding required to integrate the i-have-adhd plugin?

No. While developers can use the TypeScript SDK or CLI for deep integrations, non-technical users can connect the plugin to productivity tools through the HTTP webhook using no-code platforms like Zapier, IFTTT, or n8n. The [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) configuration exposes a straightforward JSON API that requires only basic HTTP request knowledge.

### Which file contains the core logic for the plugin?

The primary implementation resides in `.opencode/plugins/i-have-adhd.mjs`, which contains the logic for generating ADHD-friendly responses according to the rules defined in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md). The webhook handler in `hooks/always-on.mjs` wraps this logic to provide HTTP access, while [`plugin.json`](https://github.com/ayghri/i-have-adhd/blob/main/plugin.json) defines how OpenCode runtimes load and execute the plugin.