Drupal is a registered trademark of Dries Buytaert
drupal 11.4.1 Update released for Drupal core (11.4.1)! drupal 11.4.0 Update released for Drupal core (11.4.0)! drupal 10.6.12 Update released for Drupal core (10.6.12)! drupal 11.3.13 Update released for Drupal core (11.3.13)! drupal 10.6.11 Update released for Drupal core (10.6.11)! drupal 11.3.12 Update released for Drupal core (11.3.12)! drupal 11.2.14 Update released for Drupal core (11.2.14)! drupal 10.5.12 Update released for Drupal core (10.5.12)! cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)!

dtk

No security coverage
View on drupal.org

Drush DTK - the "Drush Token Killer" - provides token-saving output defaults for common Drush commands. Inspired by RTK (the "Rust Token Killer"), it shrinks the output of frequently-run, read-only Drush commands so that AI agents (and humans) spend far fewer tokens reading them.

It works with lightweight Drush hooks that, when you have not asked for specific output yourself, select a compact set of fields and force CSV to drop the wide ASCII table chrome. No commands are added for everyday use - the module only alters the output of existing core and contrib Drush commands.

How it works

Each supported command has an INITIALIZE hook that sets sensible defaults (--fields and/or --format=csv) before the command runs. config:status also has an ALTER_RESULT hook that rewrites its verbose state strings to short tokens. The original commands and their behaviour are otherwise untouched.

Compressed commands

Command Default applied Savings pm:list (pml) --status=enabled|disabled--fields=name; otherwise --fields=name,status; CSV up to 90% core:requirements (rq) --severity=1 (warnings + errors only), --fields=title,severity, CSV up to 97% config:status (cst) CSV + state tokens (see below) up to 45% views:list (vl) --fields=machine-name,status, CSV up to 80% watchdog:show (ws) --fields=type,severity,message, CSV up to 50% role:list (rls) --fields=rid,label, CSV (native default is YAML) up to 50% queue:list CSV small migrate:status (ms) CSV varies field:info (fi) CSV varies

config:status state tokens

The verbose state strings are collapsed to single tokens:

Original Token Meaning Only in DB only_db In active storage, not in the sync dir - would be deleted on config:import; export with config:export to keep it. Only in sync dir only_sync In the sync dir, not in active storage - would be created on config:import. Different different Exists in both but differs - config:import overwrites the DB, config:export overwrites the file.

The --state filter still works with the original strings (e.g. drush config:status --state='Only in DB'), because the tokenisation runs after the command has already filtered.

Opting out

Add --no-ai-compress to any command to get its native, uncompressed output:

drush pml --no-ai-compress

Compression is also skipped automatically whenever you choose your own output, i.e. you pass --field or --fields (and, for format, any --format other than the command's native default).

Limitations

  • Pre-bootstrap commands cannot be compressed. Commands that run before Drupal's modules load - notably core:status and cache:rebuild (cr) - never receive this module's hooks. core:status --no-ai-compress even reports "option does not exist". This is inherent to module-provided Drush hooks.
  • config:import / config:export previews are not reformatted. Those commands print their change preview as a hardcoded Symfony Console table straight to the terminal, mid-command, before the confirmation prompt - there is no formatter hook to retarget it. To preview pending config changes as CSV, use config:status instead (its only_sync / only_db / different tokens are the same information framed as create / delete / update).

Requirements

  • Drupal ^11
  • Drush 13+

Installation

drush en drush_dtk
drush cr

Activity

Total releases
1
First release
Jul 2026
Latest release
11 hours ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev Jul 7, 2026