Skip to content

Add wizard entrypoint and CLI scaffolding - #1

Merged
razor-x merged 1 commit into
mainfrom
claude/wizard-cli-patterns-5es2xo
Jul 28, 2026
Merged

Add wizard entrypoint and CLI scaffolding#1
razor-x merged 1 commit into
mainfrom
claude/wizard-cli-patterns-5es2xo

Conversation

@razor-x

@razor-x razor-x commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

This PR introduces the initial scaffolding for the Seam setup wizard, including the main wizard entrypoint, a development CLI, comprehensive tests, and documentation.

Key Changes

  • New wizard module (src/lib/wizard.ts): Implements the main wizard entrypoint with support for command-line arguments and help output. Currently a placeholder that reports "not implemented yet" but provides the full interface for future implementation.
  • Development CLI (src/bin/cli.ts): A local development CLI that invokes the wizard, excluded from the published package. Enables testing via npm run wizard.
  • Comprehensive test suite (src/lib/wizard.test.ts): Tests for help flags, custom command names, argument forwarding, and basic functionality.
  • Updated exports: Modified src/index.ts and src/lib/index.ts to export the wizard as the default export and expose WizardOptions type.
  • Documentation: Added usage examples and development instructions to README.
  • Build configuration: Updated TypeScript and Vitest configs to properly handle the development CLI and exclude it from the published package.
  • Dependencies: Added minimist for argument parsing with corresponding type definitions.

Notable Implementation Details

  • The wizard accepts argv and commandName options, allowing it to be mounted as a subcommand by the Seam CLI while maintaining proper help text.
  • The development CLI (src/bin/cli.ts) is explicitly excluded from the published package via package.json files array and TypeScript build configuration.
  • The wizard uses a simple write() function for output (marked with TODO to replace with a logger wrapper).
  • Help output is customizable based on the command name used to invoke the wizard.

https://claude.ai/code/session_01JyzztAG3bm4SHVkGvrdAj4

Adopt the CLI patterns from seamapi/cli so the wizard can be mounted as
a subcommand of the Seam CLI while remaining a library:

- Add the wizard entrypoint as the package default export, which the Seam
  CLI mounts under `seam wizard`. It parses its own arguments so the
  consumer only forwards argv, and takes a `commandName` used in help
  output.
- Add a dummy `src/bin/cli.ts` for local development, runnable with
  `npm run wizard` (and `npm run inspect`).
- Keep the package free of a published binary: no `bin` field, and
  `src/bin` is excluded from both the build and the package files.
- Fix the stale vitest alias for the package name, which broke
  `test/todo.test.ts`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JyzztAG3bm4SHVkGvrdAj4
@razor-x
razor-x marked this pull request as ready for review July 28, 2026 19:39
@razor-x
razor-x merged commit 39137f4 into main Jul 28, 2026
11 checks passed
@razor-x
razor-x deleted the claude/wizard-cli-patterns-5es2xo branch July 28, 2026 19:41
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.

2 participants