Skip to content

Commit e7170f2

Browse files
refactor(docs): remove interactive command references from README and commands documentation (#850)
* refactor(docs): remove interactive command references from README and commands documentation * fix lint
1 parent 50756b0 commit e7170f2

2 files changed

Lines changed: 1 addition & 51 deletions

File tree

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Options:
4949
5050
Commands:
5151
generate [options] Generate API docs
52-
interactive Launch guided CLI wizard
5352
help [command] display help for command
5453
```
5554

@@ -72,17 +71,6 @@ Options:
7271
-h, --help display help for command
7372
```
7473

75-
### `interactive`
76-
77-
```
78-
Usage: @node-core/doc-kit interactive [options]
79-
80-
Launch guided CLI wizard
81-
82-
Options:
83-
-h, --help display help for command
84-
```
85-
8674
## Examples
8775

8876
### Legacy

docs/commands.md

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface Command {
1515

1616
Each command consists of:
1717

18-
- **name**: The command name used in the CLI (e.g., `generate`, `interactive`)
18+
- **name**: The command name used in the CLI (e.g., `generate`)
1919
- **description**: A short description shown in help text
2020
- **options**: An object mapping option names to their definitions
2121
- **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`:
5757

5858
```javascript
5959
import generate from './generate.mjs';
60-
import interactive from './interactive.mjs';
6160
import myCommand from './my-command.mjs'; // Add this
6261

6362
export default [
6463
generate,
65-
interactive,
6664
myCommand, // Add this
6765
];
6866
```
@@ -79,7 +77,6 @@ Options define the flags and parameters your command accepts. Each option has:
7977
interface Option {
8078
flags: string[]; // CLI flags (e.g., ['-i', '--input <value>'])
8179
desc: string; // Description for help text
82-
prompt?: PromptConfig; // Interactive mode configuration
8380
}
8481
```
8582

@@ -186,38 +183,3 @@ prompt: {
186183
],
187184
}
188185
```
189-
190-
## Interactive Prompts
191-
192-
The `interactive` command automatically uses the `prompt` configuration from your options. When users run:
193-
194-
```bash
195-
doc-kit interactive
196-
```
197-
198-
They'll be prompted to select a command, then guided through all required options.
199-
200-
### Prompt Configuration
201-
202-
- **message**: Question to ask the user
203-
- **type**: Input type (`text`, `confirm`, `select`, `multiselect`)
204-
- **required**: Whether the field must have a value
205-
- **initialValue**: Default value
206-
- **variadic**: Whether multiple values can be entered (for `text` type)
207-
- **options**: Choices for `select`/`multiselect` types
208-
209-
### Making Options Interactive-Friendly
210-
211-
Always provide helpful messages and sensible defaults:
212-
213-
```javascript
214-
threads: {
215-
flags: ['-p', '--threads <number>'],
216-
desc: 'Number of threads to use (minimum: 1)',
217-
prompt: {
218-
type: 'text',
219-
message: 'How many threads to allow',
220-
initialValue: String(cpus().length), // Smart default
221-
},
222-
},
223-
```

0 commit comments

Comments
 (0)