Commands

Enum Commands 

Source
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, crawl_depth: Option<u32>, crawl_all: bool, }, 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

§library: String

Library name (examples: ‘fastapi’, ‘react@18’, ‘django’)

§query: String

Topic to search for within documentation (optional - omit for general docs)

§output: Option<PathBuf>

Save documentation to file (auto-detects format)

§limit: Option<usize>

Limit number of sections shown (default: 10, use 0 for unlimited)

§no_llm: bool

Force retrieval-only mode (disable LLM synthesis even if API key configured)

§rag: bool

Search locally indexed documents instead of Context7 API

§

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

§library: String

Library name (examples: ‘fastapi’, ‘react@18’, ‘vue@3’)

§query: Option<String>

Search query for specific code snippets

§output: Option<PathBuf>

Export results to file (format auto-detected by extension: .md, .json)

§offline: bool

Work offline using only cached results (no network requests)

§save: Option<String>

Save specific search results by number (e.g., –save 1,3,7)

§save_all: bool

Save all search results to file

§json: bool

Export in JSON format instead of Markdown (use with –save or –save-all)

§limit: Option<usize>

Limit number of results shown (default: 10, use 0 for unlimited)

§no_llm: bool

Force retrieval-only mode (disable LLM synthesis even if API key configured)

§rag: bool

Search locally indexed documents instead of Context7 API (requires: manx config –rag-enabled)

§

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

§query: String

Search query for official documentation

§no_llm: bool

Disable LLM verification (use embeddings-only mode even if API key is configured)

§output: Option<PathBuf>

Export results to file (format auto-detected by extension: .md, .json)

§limit: Option<usize>

Limit number of results shown (default: 8)

§rag: bool

Search locally indexed documents instead of web search (requires: manx config –rag-enabled)

§

Get

📥 Get specific item by ID (doc-3, section-5, etc.)

Fields

§id: String

Item ID from previous search or doc command output

§output: Option<PathBuf>

Save retrieved item to file

§

Cache

🗂️ Manage local documentation cache

Fields

§

Config

⚙️ Configure Manx settings, API keys, and AI integration

Fields

§show: bool

Display current configuration settings

§api_key: Option<String>

Set Context7 API key (get one at context7.com)

§cache_dir: Option<PathBuf>

Set custom cache directory path

§auto_cache: Option<String>

Enable/disable automatic caching (values: on, off)

§cache_ttl: Option<u64>

Set cache expiration time in hours (default: 24)

§max_cache_size: Option<u64>

Set maximum cache size in MB (default: 100)

§openai_api: Option<String>

Set OpenAI API key for GPT models

§anthropic_api: Option<String>

Set Anthropic API key for Claude models

§groq_api: Option<String>

Set Groq API key for fast inference

§openrouter_api: Option<String>

Set OpenRouter API key for multi-model access

§huggingface_api: Option<String>

Set HuggingFace API key for open-source models

§custom_endpoint: Option<String>

Set custom endpoint URL for self-hosted models

§llm_provider: Option<String>

Set preferred LLM provider (openai, anthropic, groq, openrouter, huggingface, custom, auto)

§llm_model: Option<String>

Set specific model name (overrides provider defaults)

§llm_api: Option<String>

Legacy option - Set LLM API key (deprecated, use provider-specific options)

§rag: Option<String>

Enable/disable local RAG system (values: on, off)

§add_official_domain: Option<String>

Add custom official documentation domain (format: domain.com)

§embedding_provider: Option<String>

Set embedding provider for RAG system (hash, onnx:model, ollama:model, openai:model, huggingface:model, custom:url)

§embedding_api_key: Option<String>

Set embedding API key for API-based providers

§embedding_model_path: Option<PathBuf>

Set embedding model path for local models

§embedding_dimension: Option<usize>

Set embedding dimension (default: 384)

§

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, .rst, .docx, .pdf (with security validation) • Code files: .js, .jsx, .ts, .tsx, .py, .rb, .php, .java, .scala, .kotlin .rs, .go, .c, .cpp, .swift, .dart, .sql, .graphql, and more • Config: .json, .yaml, .yml, .toml, .xml, .ini, .env (with secret masking) • Scripts: .sh, .bash, .zsh, .ps1, .bat (with enhanced security validation) • Web content: HTML pages (auto text extraction)

SECURITY FEATURES: • PDF processing disabled by default (configure to enable) • Code file security validation (obfuscation detection, malicious patterns) • Shell script dangerous command blocking • Automatic secret masking (.env files, API keys, tokens) • Prompt injection detection and prevention • URL validation (HTTP/HTTPS only) • Content sanitization and size limits

EXAMPLES: manx index ~/my-docs/ # Index directory manx index https://docs.python.org –crawl # Basic documentation crawl manx index https://fastapi.tiangolo.com –crawl-depth 2 # Limited depth crawl manx index https://react.dev –crawl-all # Complete site crawl manx index api.pdf –alias “API Reference” # Index with custom alias

Fields

§path: String

Path to document/directory or URL to index

§id: Option<String>

Optional alias for the indexed source

§crawl: bool

Enable basic crawling for URLs (follows links with default depth)

§crawl_depth: Option<u32>

Crawl with specific depth (implies crawling)

§crawl_all: bool

Crawl entire documentation site (implies crawling)

§

Sources

📂 Manage indexed document sources

Fields

§

Open

🔗 Open a specific documentation section by ID

Fields

§id: String

Section ID from previous doc command output

§output: Option<PathBuf>

Save opened section to file

§

Update

🔄 Update Manx to the latest version from GitHub

Fields

§check: bool

Check for updates without installing

§force: bool

Force update even if already on latest version

§

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

§

Init

🚀 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

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,