Documentation
¶
Overview ¶
Package cli implements the command-line interface for miru.
The cli package provides: - Command-line argument parsing and validation - Terminal output formatting - Man-like interface implementation - Interactive search functionality - Browser integration through environment configuration
Index ¶
- func NewPager(content string, reloadFunc func() (string, api.DocSource, error), ...) *pagerModel
- func Run() error
- func RunPager(content string, docSource api.DocSource) error
- func RunPagerWithReload(content string, reloadFunc func() (string, api.DocSource, error), ...) error
- type DocInfo
- type ErrorCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPager ¶
func NewPager(content string, reloadFunc func() (string, api.DocSource, error), docSource api.DocSource) *pagerModel
NewPager creates a new pager model with the given content
Types ¶
type DocInfo ¶ added in v0.0.6
type DocInfo struct {
Type api.SourceType `json:"type"`
PackagePath string `json:"package_path"`
URL string `json:"url"`
Homepage string `json:"homepage,omitempty"`
Repository string `json:"repository,omitempty"`
Registry string `json:"registry,omitempty"`
Document string `json:"document,omitempty"`
RelatedSources []api.RelatedSource `json:"related_sources"`
}
DocInfo represents the JSON output structure
type ErrorCode ¶
type ErrorCode string
ErrorCode defines error types for CLI operations
const ( NoPackageSpecified ErrorCode = "NoPackageSpecified" InvalidLanguageFlag ErrorCode = "InvalidLanguageFlag" InvalidLanguage ErrorCode = "InvalidLanguage" InvalidArguments ErrorCode = "InvalidArguments" UnsupportedLanguage ErrorCode = "UnsupportedLanguage" UnsupportedSource ErrorCode = "UnsupportedSource" )
Click to show internal directories.
Click to hide internal directories.