Skip to content

feat(cli): add the guided init, the menu and unattended mode - #7

Open
Decipher wants to merge 5 commits into
feature/04-enginesfrom
feature/05-interactive
Open

Decipher wants to merge 5 commits into
feature/04-enginesfrom
feature/05-interactive

Conversation

@Decipher

Copy link
Copy Markdown
Member

What changed

  • In a terminal, drx init is a guided run. It asks for the starter, the layout and the engine, shows what it will do, and marks each step as done.
  • drx with no command opens a menu. The module commands offer a list to pick a module from.
  • A presentation module, with the Druxt wordmark and colour for output in a terminal. A command to repeat is printed quoted, ready to paste.
  • --no-interactive, DRX_NO_INTERACTIVE=1, CI and a missing terminal each turn the prompts off. A test runs init, info and the module commands under each of the four.
  • The quickstart entry describes the starter in one sentence, for the list of starters.
  • The pack check runs an unattended drx init with the installed binary.
  • The README and the changeset describe the terminal mode, the wordmark, colour and unattended runs.

Why

A first run should not need the flags learned. A script or a pipeline needs the opposite: no prompt, ever, and the same result from flags alone. Both now hold, and the tests pin the second.

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's lint and test jobs, yamllint, actionlint and npm run build. npm test ran 608 tests, above the floor. The pack step ran as the workflow has it, and now ends with drx init pack-site --yes --no-interactive --json from the installed binary.

Not covered yet

  • No prompt has been driven in a real terminal. The tests answer them through an injected interface.
  • In the menu, adding, removing and configuring a module and managing patches are listed as not available yet.
  • The end-to-end test was not run for this change.

- In a terminal, drx init is a guided run: it asks for the starter, the
  layout and the engine, and marks each step as it finishes.
- drx with no command opens a menu, and the module commands offer a
  list to pick from.
- Output in a terminal shows the Druxt wordmark, in colour. A command
  to repeat is printed quoted, ready to paste.
- `--no-interactive`, DRX_NO_INTERACTIVE=1, CI and a missing terminal
  each turn the prompts off. The tests run init, info and the module
  commands under each of the four.
- The pack check runs an unattended init with the installed binary.
@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: 737e26b0-5c06-461d-b22e-461ad0d7c846
Commits

Reviewing files that changed from the base of the PR and between 32df115 and 491a5d6.

Files selected for processing: 31

  • .changeset/first-release-cli.md
  • .github/workflows/ci.yml
  • .gitlab-ci.yml
  • README.md
  • packages/cli/src/cli.ts
  • packages/cli/src/commands/info.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/output.ts
  • packages/cli/src/presentation.ts
  • packages/cli/src/prompts.ts
  • packages/cli/src/registry/entry.ts
  • packages/cli/src/repeat.ts
  • packages/cli/src/user-config.ts
  • packages/cli/test/cli.test.ts
  • packages/cli/test/commands/init-engines.test.ts
  • packages/cli/test/commands/init-guided.test.ts
  • packages/cli/test/commands/init.test.ts
  • packages/cli/test/commands/menu.test.ts
  • packages/cli/test/helpers/prompter.ts
  • packages/cli/test/helpers/run.ts
  • packages/cli/test/non-interactive.test.ts
  • packages/cli/test/output.test.ts
  • packages/cli/test/presentation.test.ts
  • packages/cli/test/prompts.test.ts
  • packages/cli/test/registry/entry.test.ts
  • packages/cli/test/repeat.test.ts
  • packages/cli/test/user-config.test.ts
  • starters/quickstart.json
  • 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 added this pull request to stack #9 November 18, 2026 03:31
@Decipher
Decipher force-pushed the feature/05-interactive branch from 9c93273 to 838cd00 Compare November 18, 2026 06:51
The shell quoting the `cd` line uses is the function this branch
already has for a command to repeat, so the file stays as it is here.
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