Skip to content

feat(cli): add drx add and drx remove - #8

Open
Decipher wants to merge 5 commits into
feature/05-interactivefrom
feature/06-add-and-remove
Open

Decipher wants to merge 5 commits into
feature/05-interactivefrom
feature/06-add-and-remove

Conversation

@Decipher

Copy link
Copy Markdown
Member

What changed

  • drx add installs a Druxt module in a project. It installs the package in the frontend and lists it in the Nuxt config. It also requires the Drupal modules the module needs with Composer and enables them with Drush, through the backend's engine.
  • drx remove takes a module out again.
  • --dry-run prints the steps and runs none of them.
  • The module registry says how a module's backend half is added. The Nuxt and Drupal adapters each plan their own steps.
  • The menu offers adding and removing a module.
  • The README, the package README and the changeset describe both commands, and the package description says what the tool does now.

Why

Adding a module to a Druxt site is a list of manual steps today, on the Nuxt side and on the Drupal side. drx add turns them into one command that a person, a script or an agent can run.

How it was checked

  • npm run lint and npm run typecheck pass
  • npm test passes, and coverage did not drop
  • A changeset is included, if a published package changed
  • Nothing that resolves only on a private network reached a tracked file

Run from a clean npm ci: each run: line of the workflow, yamllint, actionlint and npm run build. npm test ran 710 tests, above the floor. The pack step ran as the workflow has it, from the installed binaries. npm run test:e2e ran too: it creates a site from the real quickstart tarball and reads the published module registry.

Not covered yet

  • No real run of drx add or drx remove. A stand-in replaces each package manager, Composer and Drush call in the tests.
  • drx module configure answers "not available yet", and the menu lists managing patches the same way.

drx add installs a Druxt module in a project, and drx remove takes it
out again.

- The module registry says how a module's backend half is added.
- The Nuxt adapter installs the package and adds it to the framework's
  configuration file.
- The Drupal adapter requires the Drupal modules with Composer and
  enables them with Drush.
- `--dry-run` prints the steps and runs none of them.
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 674ccaab-22c5-497a-8303-be11a4231cde
Commits

Reviewing files that changed from the base of the PR and between 491a5d6 and 2f7f5fa.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 44

  • .changeset/first-release-cli.md
  • .cspell.json
  • .prettierignore
  • README.md
  • eslint.config.mjs
  • knip.jsonc
  • packages/cli/README.md
  • packages/cli/package.json
  • packages/cli/src/adapters/adapter.ts
  • packages/cli/src/adapters/drupal-modules.ts
  • packages/cli/src/adapters/drupal.ts
  • packages/cli/src/adapters/nuxt-config.ts
  • packages/cli/src/adapters/nuxt.ts
  • packages/cli/src/cli.ts
  • packages/cli/src/commands/change.ts
  • packages/cli/src/commands/init.ts
  • packages/cli/src/commands/menu.ts
  • packages/cli/src/commands/module.ts
  • packages/cli/src/context.ts
  • packages/cli/src/engines/engine.ts
  • packages/cli/src/engines/none.ts
  • packages/cli/src/engines/php.ts
  • packages/cli/src/errors.ts
  • packages/cli/src/exec.ts
  • packages/cli/src/modules/change.ts
  • packages/cli/src/modules/entry.ts
  • packages/cli/src/project.ts
  • packages/cli/src/prompts.ts
  • packages/cli/test/adapters/adapters.test.ts
  • packages/cli/test/adapters/drupal-modules.test.ts
  • packages/cli/test/adapters/nuxt-modules.test.ts
  • packages/cli/test/commands/add.test.ts
  • packages/cli/test/commands/init-engines.test.ts
  • packages/cli/test/commands/init.test.ts
  • packages/cli/test/commands/menu.test.ts
  • packages/cli/test/commands/module.test.ts
  • packages/cli/test/engines/engines.test.ts
  • packages/cli/test/exec.test.ts
  • packages/cli/test/fixtures/quickstart-nuxt.config.js
  • packages/cli/test/helpers/prompter.ts
  • packages/cli/test/helpers/run.ts
  • packages/cli/test/modules/entry.test.ts
  • packages/cli/test/non-interactive.test.ts
  • packages/cli/test/project.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Decipher
Decipher force-pushed the feature/06-add-and-remove branch from d34e84d to 4253a21 Compare November 18, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant