Skip to main content

from_command

Function from_command 

Source
pub fn from_command(argv: &[String]) -> Option<String>
Expand description

The id a command line suggests: the package an npx, bunx, uvx, pipx run, pnpm dlx or yarn dlx runs (@scope/server-github@1.2 gives github), the module of python -m, the image of docker run, the script of node or python (its folder for index.js), else the program itself. Common mcp/server prefixes and suffixes are dropped. None for an empty command.