Add wizard entrypoint and CLI scaffolding - #1
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.src/bin/cli.ts): A local development CLI that invokes the wizard, excluded from the published package. Enables testing vianpm run wizard.src/lib/wizard.test.ts): Tests for help flags, custom command names, argument forwarding, and basic functionality.src/index.tsandsrc/lib/index.tsto export the wizard as the default export and exposeWizardOptionstype.minimistfor argument parsing with corresponding type definitions.Notable Implementation Details
argvandcommandNameoptions, allowing it to be mounted as a subcommand by the Seam CLI while maintaining proper help text.src/bin/cli.ts) is explicitly excluded from the published package viapackage.jsonfiles array and TypeScript build configuration.write()function for output (marked with TODO to replace with a logger wrapper).https://claude.ai/code/session_01JyzztAG3bm4SHVkGvrdAj4