i-have-adhd Extension: Commands and Flags for Pi CLI
The i-have-adhd extension provides one slash command (/i-have-adhd) with optional on/off arguments and one CLI flag (--adhd) to enable ADHD-friendly output mode in Pi.
The i-have-adhd extension is a lightweight Pi CLI plugin that injects ADHD-optimized formatting rules into your session. Originally developed by Ayoub Ghribia, this extension gives users two distinct interfaces for controlling ADHD-friendly output: an interactive slash command and a startup flag.
How to Enable ADHD Mode with the Slash Command
The primary interface is the /i-have-adhd slash command defined in [extensions/i-have-adhd.ts](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts#L187-L202). This command supports three usage patterns:
| Usage | Behavior |
|---|---|
/i-have-adhd |
Toggles the current state (on → off, off → on) |
/i-have-adhd on |
Forces ADHD-friendly output enabled |
/i-have-adhd off |
Forces ADHD-friendly output disabled; stop works identically |
# Toggle interactively during a Pi session
/i-have-adhd # flips current state
/i-have-adhd on # explicitly enable
/i-have-adhd off # explicitly disable
The command registration spans lines 187–202 in the source file, where the handler parses the optional argument and updates the session state accordingly.
Starting Pi with the --adhd Flag
For users who want ADHD-friendly output from the first interaction, the extension registers a boolean CLI flag. Lines 181–185 in [extensions/i-have-adhd.ts](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts#L181-L185) define the --adhd flag:
# Launch Pi with ADHD mode pre-enabled
pi --adhd
When this flag is present, the ruleset is injected before any user input is processed. This is functionally equivalent to running /i-have-adhd on immediately at session start.
Skill Alias: /skill:i-have-adhd
The extension also recognizes /skill:i-have-adhd as a built-in alias. Unlike the main command, this skill alias does not toggle—it only enables the mode. The input handler in the same source file routes this call directly to the enable path.
# Skill alias that unconditionally turns the mode on
/skill:i-have-adhd
This alias exists primarily for consistency with Pi's skill invocation syntax and is verified by the test script [scripts/check_pi_extension.py](https://github.com/ayghri/i-have-adhd/blob/main/scripts/check_pi_extension.py).
Programmatic Usage in Pi Plugins
Extension developers can trigger ADHD mode programmatically via the Pi command API:
// Example: Enable ADHD mode from within a custom plugin
pi.registerCommand("demo", {
description: "Demo command",
handler: async (args, ctx) => {
// Force ADHD-friendly output for this session
await pi.executeCommand("i-have-adhd", "on", ctx);
},
});
The executeCommand call accepts "on", "off", or "stop" as the second argument, mirroring the interactive slash command behavior.
Key Implementation Files
| File | Purpose |
|---|---|
[extensions/i-have-adhd.ts](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) |
Core implementation: command registration (lines 187–202), flag registration (lines 181–185), and runtime injection logic |
[README.md](https://github.com/ayghri/i-have-adhd/blob/main/README.md) |
User-facing documentation and quick-start guide |
[scripts/check_pi_extension.py](https://github.com/ayghri/i-have-adhd/blob/main/scripts/check_pi_extension.py) |
Automated test verifying command name and skill alias registration |
Summary
/i-have-adhd— Interactive command with optionalon/off/stoparguments; bare invocation toggles state--adhd— Boolean CLI flag for starting sessions with ADHD mode pre-enabled/skill:i-have-adhd— Alias that unconditionally enables the mode- All interfaces are implemented in
extensions/i-have-adhd.tswith registration lines clearly demarcated
Frequently Asked Questions
What is the difference between /i-have-adhd and /skill:i-have-adhd?
The /i-have-adhd command supports toggle behavior when invoked without arguments, while /skill:i-have-adhd is a fixed enable-only alias. Use the slash command for interactive control; the skill alias exists primarily for Pi's skill system compatibility.
Can I disable ADHD mode after starting with --adhd?
Yes. The --adhd flag only sets the initial state. Once the session is active, use /i-have-adhd off or /i-have-adhd to toggle the mode off. The flag does not lock the setting for the session duration.
Does the extension persist my preference across sessions?
No. According to the extensions/i-have-adhd.ts implementation, the mode is session-scoped. Each new Pi session starts with standard output unless you explicitly pass --adhd or invoke the enable command. No configuration file or persistence mechanism is currently implemented.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →