HexdocsMcp.CLI.Utils (HexDocs MCP v0.6.0)

View Source

Utility functions shared across CLI modules.

Summary

Functions

Display a checkmark symbol with ANSI color.

Raise an error in Mix context or output error and exit in standalone context.

Output information to the console. Works with both Mix.shell() and IO for standalone executables.

Parse package and version arguments for CLI commands.

Functions

check()

Display a checkmark symbol with ANSI color.

output_error(message)

Raise an error in Mix context or output error and exit in standalone context.

output_info(message)

Output information to the console. Works with both Mix.shell() and IO for standalone executables.

parse_package_args(arg1)

Parse package and version arguments for CLI commands.

Returns a tuple {package, version} where:

  • package is the package name or nil if not provided
  • version is the version or nil if not provided