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.

Community commands in Drupal Knowledge 1.1.3.
dk analyzestatically analyze a Drupal project path
dk api-lifecycleinspect the source-derived Drupal API lifecycle corpus
dk casesvalidate and list solved cases
dk coverageprint coverage summary
dk evidenceprint canonical project evidence from an analyzer result; read-only, writes nothing to the project
dk evidence-diffcompare two project evidence sets; read-only
dk explainexplain one record: what it is, what supports it, what is unknown
dk findingsexecute reviewed finding contracts against analyzer output
dk implementation-findingsevaluate reviewed implementation rules against project evidence; read-only, changes no configuration, code or Drupal state
dk knowledgevalidate and list knowledge records
dk lifecycle-evaluateevaluate analyzer core-version evidence against reviewed release lifecycle context
dk migration-analyzeidentify custom-code migration work for a target Drupal version; read-only, rewrites no code and runs no Rector
dk migration-worklist machine-readable migration work items; read-only, changes no code
dk projectinspect a Drupal project across every engine; read-only, changes nothing
dk provenancetrace one record back to the authoritative source behind it
dk resolveresolve knowledge applicability from analyzer JSON
dk searchsearch advisories, API lifecycle, rules, knowledge and solved cases
dk security-advisoriesinspect and ingest authoritative Drupal Security Team advisories
dk security-evaluateevaluate advisories against Project Analyzer output; read-only and never remediates
dk security-remediationexplain how a project could remediate applicable advisories; read-only, changes no dependency and runs no Composer command
dk sourcesvalidate and list sources
dk statuswhat this Drupal Knowledge release knows, and how current it is
dk upgrade-evaluateevaluate whether a project can reach a proposed Drupal target; read-only, changes no dependency and runs no Composer command
dk upgrade-pathdescribe the supported targets reachable from a project and what blocks each; read-only, performs no upgrade
dk versionprint the release and the community query interface