Merge commit '36c66dd290d3ce6eb1ccd310d0c658d4a32bb8eb' as 'repos/effect'
This commit is contained in:
19
repos/effect/.changeset/add-command-hidden.md
Normal file
19
repos/effect/.changeset/add-command-hidden.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
"effect": patch
|
||||
---
|
||||
|
||||
Add `Command.withHidden` to hide subcommands from `--help` output, shell completions, and "did you mean?" suggestions, while keeping them fully invocable by exact name.
|
||||
|
||||
Useful for experimental or internal subcommands that should be accepted but not advertised on the public CLI surface.
|
||||
|
||||
```ts
|
||||
import { Command } from "effect/unstable/cli"
|
||||
|
||||
const experimental = Command.make("experimental").pipe(
|
||||
Command.withHidden
|
||||
)
|
||||
|
||||
const root = Command.make("mycli").pipe(
|
||||
Command.withSubcommands([experimental])
|
||||
)
|
||||
```
|
||||
Reference in New Issue
Block a user