The command line
The same knowledge on this website, plus the ability to ask about your own Drupal project. Everything it does is read-only.
Install
Drupal Knowledge is a repository, not a package. There is no Composer package, no Homebrew formula and no binary release — clone it and run it. It needs Python 3 and nothing else.
git clone https://github.com/zarabatana/drupal-knowledge.git
cd drupal-knowledge
./dk status
Add the directory to your PATH to run dk from
anywhere. Queries are offline: the records ship in the repository and no
command below contacts the network.
The five things people ask
dk status what this release knows, and how current it is
dk project /path/to/project inspect a Drupal project, read-only
dk search file_create_url advisories, APIs, rules and reviewed knowledge
dk explain SA-CORE-2025-001 why a record exists and what supports it
dk provenance <record-id> trace a record back to its source snapshot
Add --target 11.4.6 to dk project to get the
upgrade assessment and the custom-code migration work for that version.
Add --json to any of the five for machine-readable output.
The exit code reports whether the query succeeded, not whether your project is healthy. A project with applicable advisories still exits zero. Read the findings, not the exit code.
Community commands in this release
Generated from the released command parser, so this list cannot drift from what the CLI actually accepts. Maintainer operations are not shown here.
dk analyze | statically analyze a Drupal project path |
|---|---|
dk api-lifecycle | inspect the source-derived Drupal API lifecycle corpus |
dk cases | validate and list solved cases |
dk coverage | print coverage summary |
dk evidence | print canonical project evidence from an analyzer result; read-only, writes nothing to the project |
dk evidence-diff | compare two project evidence sets; read-only |
dk explain | explain one record: what it is, what supports it, what is unknown |
dk findings | execute reviewed finding contracts against analyzer output |
dk implementation-findings | evaluate reviewed implementation rules against project evidence; read-only, changes no configuration, code or Drupal state |
dk knowledge | validate and list knowledge records |
dk lifecycle-evaluate | evaluate analyzer core-version evidence against reviewed release lifecycle context |
dk migration-analyze | identify custom-code migration work for a target Drupal version; read-only, rewrites no code and runs no Rector |
dk migration-work | list machine-readable migration work items; read-only, changes no code |
dk project | inspect a Drupal project across every engine; read-only, changes nothing |
dk provenance | trace one record back to the authoritative source behind it |
dk resolve | resolve knowledge applicability from analyzer JSON |
dk search | search advisories, API lifecycle, rules, knowledge and solved cases |
dk security-advisories | inspect and ingest authoritative Drupal Security Team advisories |
dk security-evaluate | evaluate advisories against Project Analyzer output; read-only and never remediates |
dk security-remediation | explain how a project could remediate applicable advisories; read-only, changes no dependency and runs no Composer command |
dk sources | validate and list sources |
dk status | what this Drupal Knowledge release knows, and how current it is |
dk upgrade-evaluate | evaluate whether a project can reach a proposed Drupal target; read-only, changes no dependency and runs no Composer command |
dk upgrade-path | describe the supported targets reachable from a project and what blocks each; read-only, performs no upgrade |
dk version | print the release and the community query interface |