Expand description
Command-line argument types and CLI parsing helpers.
The CLI module exists to define the public command-line grammar of osp.
This module owns the public command-line grammar for osp: top-level
commands, shared flags, inline parsing helpers, and the bridge from CLI
arguments into render/config runtime settings. It does not execute commands;
that handoff happens in crate::app.
Contract:
- this module defines what users are allowed to type
- it may translate flags into config/render settings
- it should not dispatch commands, query external systems, or own REPL editor behavior
Structs§
- Cli
- Top-level CLI parser for the
ospcommand. - Config
Args - Top-level config command arguments.
- Config
Explain Args - Arguments for
config explain. - Config
GetArgs - Arguments for
config get. - Config
SetArgs - Arguments for
config set. - Config
Show Args - Arguments for
config show. - Config
Unset Args - Arguments for
config unset. - Debug
Complete Args - Arguments for REPL completion debugging.
- Debug
Highlight Args - Arguments for REPL highlighting debugging.
- Doctor
Args - Top-level doctor command arguments.
- History
Args - Top-level history command arguments.
- History
Prune Args - Arguments for
history prune. - Inline
Command Cli - Parser used for inline command execution without the binary name prefix.
- Intro
Args - Hidden intro command arguments.
- Parsed
Command Line - Parsed command tokens plus trailing DSL stages.
- Plugin
Command Clear Args - Arguments for clearing persisted command state.
- Plugin
Command State Args - Shared arguments for enabling or disabling a plugin command.
- Plugin
Config Args - Arguments for
plugins config. - Plugin
Provider Clear Args - Arguments for clearing a provider selection.
- Plugin
Provider Select Args - Arguments for selecting a provider implementation for a command.
- Plugins
Args - Top-level plugin command arguments.
- Repl
Args - Hidden REPL-only command namespace.
- Theme
Args - Top-level theme command arguments.
- Theme
Show Args - Arguments for
theme show. - Theme
UseArgs - Arguments for
theme use.
Enums§
- Commands
- Top-level commands accepted by
osp. - Config
Commands - Configuration inspection and mutation commands.
- Debug
Menu Arg - Popup menu target to inspect through the hidden REPL debug surface.
- Doctor
Commands - Built-in diagnostic groups exposed through
osp doctor. - History
Commands - History management commands.
- Plugins
Commands - Built-in plugin management subcommands.
- Repl
Commands - Hidden REPL debugging commands.
- Theme
Commands - Theme inspection and selection commands.
Functions§
- is_
cli_ help_ stage - Reports whether a parsed stage is the special CLI help form
| H <verb>. - parse_
command_ text_ with_ aliases - Parses a raw command line, expands aliases, and separates trailing DSL stages.
- parse_
command_ tokens_ with_ aliases - Finalizes already-tokenized input into command tokens plus DSL stages.
- parse_
inline_ command_ tokens - Parses inline command tokens with the same clap model as the top-level CLI.
- validate_
cli_ dsl_ stages - Validates that every CLI pipe stage is known to the DSL surface.