pub enum Commands {
Doc {
library: String,
query: String,
output: Option<PathBuf>,
limit: Option<usize>,
no_llm: bool,
rag: bool,
},
Snippet {
library: String,
query: Option<String>,
output: Option<PathBuf>,
offline: bool,
save: Option<String>,
save_all: bool,
json: bool,
limit: Option<usize>,
no_llm: bool,
rag: bool,
},
Search {
query: String,
no_llm: bool,
output: Option<PathBuf>,
limit: Option<usize>,
rag: bool,
},
Get {
id: String,
output: Option<PathBuf>,
},
Cache {
command: CacheCommands,
},
Config {Show 21 fields
show: bool,
api_key: Option<String>,
cache_dir: Option<PathBuf>,
auto_cache: Option<String>,
cache_ttl: Option<u64>,
max_cache_size: Option<u64>,
openai_api: Option<String>,
anthropic_api: Option<String>,
groq_api: Option<String>,
openrouter_api: Option<String>,
huggingface_api: Option<String>,
custom_endpoint: Option<String>,
llm_provider: Option<String>,
llm_model: Option<String>,
llm_api: Option<String>,
rag: Option<String>,
add_official_domain: Option<String>,
embedding_provider: Option<String>,
embedding_api_key: Option<String>,
embedding_model_path: Option<PathBuf>,
embedding_dimension: Option<usize>,
},
Index {
path: String,
id: Option<String>,
crawl: bool,
max_depth: Option<u32>,
max_pages: Option<u32>,
},
Sources {
command: SourceCommands,
},
Open {
id: String,
output: Option<PathBuf>,
},
Update {
check: bool,
force: bool,
},
Embedding {
command: EmbeddingCommands,
},
Init,
}Variants§
Doc
📚 Browse comprehensive documentation sections and guides
Fields
Snippet
🔍 Search code snippets and examples with AI-powered understanding
ENHANCED SEARCH: • Searches official docs (Context7) + your indexed documents (RAG) • Semantic understanding finds relevant content with different wording • Quote prioritization: “useEffect cleanup” gets 10x higher relevance • Optional AI synthesis provides comprehensive answers with citations
SEMANTIC FEATURES: • “memory leaks” finds: “memory cleanup”, “performance issues”, “leak prevention” • “authentication” finds: “auth”, “login”, “security”, “credentials” • Version-specific: react@18, django@4.2
AI SYNTHESIS: • Configure: manx config –llm-api “sk-your-key” • Get answers: manx snippet “react hooks best practices” • Force retrieval: manx snippet react hooks –no-llm
EXAMPLES:
manx snippet react “useEffect cleanup” # Semantic search with phrase priority
manx snippet “database pooling” –llm-api # Get AI answer with citations
manx snippet fastapi middleware –no-llm # Raw results only
manx snippet python “async functions” –rag # Search your indexed code files
Fields
Search
🔍 Search official documentation across the web
INTELLIGENT WEB SEARCH:
• Prioritizes official documentation sites (docs.python.org, reactjs.org, etc.)
• Uses semantic embeddings for relevance matching
• Falls back to trusted community sources with clear notification
• Optional LLM verification ensures result authenticity
OFFICIAL-FIRST STRATEGY: • Always searches official sources first (10x relevance boost) • Expands to community sources only if insufficient official results • Transparent fallback notifications: “⚠️ Expanded to community sources”
EXAMPLES:
manx search “hydra configuration commands” # Auto-detects LLM availability
manx search “react hooks best practices” # Uses LLM if API key configured
manx search “python async await” –no-llm # Force embeddings-only mode
manx search “authentication” –rag # Search your indexed documents
Fields
Get
📥 Get specific item by ID (doc-3, section-5, etc.)
Fields
Cache
🗂️ Manage local documentation cache
Fields
command: CacheCommandsConfig
⚙️ Configure Manx settings, API keys, and AI integration
Fields
llm_provider: Option<String>Set preferred LLM provider (openai, anthropic, groq, openrouter, huggingface, custom, auto)
Index
📁 Index local documents or web URLs for RAG search
INDEXING SOURCES:
• Local files: manx index ~/docs/api.md
• Directories: manx index ~/documentation/
• Web URLs: manx index https://docs.rust-lang.org/book/ch01-01-installation.html
SUPPORTED FORMATS: • Documents: .md, .txt, .docx, .pdf (with security validation) • Web content: HTML pages (auto text extraction)
SECURITY FEATURES:
• PDF processing disabled by default (configure to enable)
• URL validation (HTTP/HTTPS only)
• Content sanitization and size limits
EXAMPLES: manx index ~/my-docs/ # Index directory manx index https://docs.python.org –crawl # Deep crawl documentation site manx index https://fastapi.tiangolo.com –crawl –max-depth 2 # Limited depth crawl manx index api.pdf –alias “API Reference” # Index with custom alias
Fields
Sources
📂 Manage indexed document sources
Fields
command: SourceCommandsOpen
🔗 Open a specific documentation section by ID
Fields
Update
🔄 Update Manx to the latest version from GitHub
Fields
Embedding
🧠 Manage embedding models and providers for semantic search
EMBEDDING PROVIDERS: • hash: Hash-based embeddings (default, fast, lightweight) • onnx:model: Local ONNX models (requires download) • ollama:model: Ollama API (requires Ollama server) • openai:model: OpenAI embeddings API (requires API key) • huggingface:model: HuggingFace embeddings API (requires API key) • custom:url: Custom endpoint API
EXAMPLES: manx embedding status # Show current provider and models manx embedding set hash # Use hash-based (default) manx embedding set onnx:all-MiniLM-L6-v2 # Use local ONNX model manx embedding set ollama:nomic-embed-text # Use Ollama model manx embedding download all-MiniLM-L6-v2 # Download ONNX model manx embedding test “sample query” # Test current embedding setup
Fields
command: EmbeddingCommandsInit
🚀 Interactive setup wizard for configuring manx
WHAT IT DOES: • Guides you through initial configuration • Sets up Context7 API for official docs • Configures embedding models for semantic search • Optional LLM provider setup for AI synthesis
PERFECT FOR: • First-time users • Reconfiguring after updates • Testing different providers
EXAMPLE: manx init # Start interactive setup wizard
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more