diff --git a/README.md b/README.md index 607cf69f..c9e5a51e 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,6 @@ Options: Commands: generate [options] Generate API docs - interactive Launch guided CLI wizard help [command] display help for command ``` @@ -72,17 +71,6 @@ Options: -h, --help display help for command ``` -### `interactive` - -``` -Usage: @node-core/doc-kit interactive [options] - -Launch guided CLI wizard - -Options: - -h, --help display help for command -``` - ## Examples ### Legacy diff --git a/docs/commands.md b/docs/commands.md index 9a78f7af..c09d8c04 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -15,7 +15,7 @@ interface Command { Each command consists of: -- **name**: The command name used in the CLI (e.g., `generate`, `interactive`) +- **name**: The command name used in the CLI (e.g., `generate`) - **description**: A short description shown in help text - **options**: An object mapping option names to their definitions - **action**: The async function that executes when the command is run @@ -57,12 +57,10 @@ Add your command to the exports in `bin/commands/index.mjs`: ```javascript import generate from './generate.mjs'; -import interactive from './interactive.mjs'; import myCommand from './my-command.mjs'; // Add this export default [ generate, - interactive, myCommand, // Add this ]; ``` @@ -79,7 +77,6 @@ Options define the flags and parameters your command accepts. Each option has: interface Option { flags: string[]; // CLI flags (e.g., ['-i', '--input ']) desc: string; // Description for help text - prompt?: PromptConfig; // Interactive mode configuration } ``` @@ -186,38 +183,3 @@ prompt: { ], } ``` - -## Interactive Prompts - -The `interactive` command automatically uses the `prompt` configuration from your options. When users run: - -```bash -doc-kit interactive -``` - -They'll be prompted to select a command, then guided through all required options. - -### Prompt Configuration - -- **message**: Question to ask the user -- **type**: Input type (`text`, `confirm`, `select`, `multiselect`) -- **required**: Whether the field must have a value -- **initialValue**: Default value -- **variadic**: Whether multiple values can be entered (for `text` type) -- **options**: Choices for `select`/`multiselect` types - -### Making Options Interactive-Friendly - -Always provide helpful messages and sensible defaults: - -```javascript -threads: { - flags: ['-p', '--threads '], - desc: 'Number of threads to use (minimum: 1)', - prompt: { - type: 'text', - message: 'How many threads to allow', - initialValue: String(cpus().length), // Smart default - }, -}, -```