Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
Show 14 variants Model { action: ModelCommands, }, Generate {
Show 15 fields prompt: Option<String>, model: String, model_path: Option<String>, max_tokens: usize, temperature: f32, top_k: Option<usize>, top_p: Option<f32>, min_p: Option<f32>, repetition_penalty: f32, greedy: bool, gpu: bool, no_stream: bool, quiet: bool, draft: Option<String>, draft_tokens: usize,
}, Summarize { input: Option<String>, model: String, model_path: Option<String>, min_length: Option<usize>, max_length: Option<usize>, num_beams: Option<usize>, length_penalty: Option<f32>, no_repeat_ngram: Option<usize>, greedy: bool, no_stream: bool, gpu: bool, quiet: bool, }, Translate {
Show 13 fields input: Option<String>, model: String, model_path: Option<String>, src: Option<String>, dst: Option<String>, max_length: Option<usize>, num_beams: Option<usize>, length_penalty: Option<f32>, no_repeat_ngram: Option<usize>, greedy: bool, no_stream: bool, gpu: bool, quiet: bool,
}, Inspect { path: String, }, Embed { input: Option<String>, model: String, model_path: Option<String>, format: String, normalize: bool, pooling: String, gpu: bool, quiet: bool, }, Transcribe { file: String, model: String, model_path: Option<String>, language: Option<String>, translate: bool, timestamps: bool, max_tokens: Option<usize>, no_stream: bool, gpu: bool, quiet: bool, }, Classify {
Show 13 fields input: Vec<String>, model: String, model_path: Option<String>, labels: Option<String>, top_k: usize, threshold: Option<f32>, max_length: Option<usize>, batch_size: Option<usize>, multi_label: bool, format: String, gpu: bool, dtype: Option<String>, quiet: bool,
}, Rerank { query: String, documents: Vec<String>, model: String, model_path: Option<String>, top_k: Option<usize>, format: String, gpu: bool, quiet: bool, }, Chat { model: String, model_path: Option<String>, system: Option<String>, temperature: f32, max_tokens: usize, gpu: bool, quiet: bool, draft: Option<String>, draft_tokens: usize, }, Index { action: IndexCommands, }, Image { action: ImageCommands, }, Search { index_path: String, query: String, top_k: usize, mode: String, model: String, rerank_model: Option<String>, format: String, gpu: bool, quiet: bool, }, Similarity { text1: String, text2: String, model: String, gpu: bool, quiet: bool, },
}

Variants§

§

Model

Manage models (list, download, info)

Fields

§

Generate

Generate text from a prompt

Fields

§prompt: Option<String>

The prompt (or file path, or stdin if not provided)

§model: String
§model_path: Option<String>

Load weights from a local file or directory instead of the registry

§max_tokens: usize

Maximum tokens to generate

§temperature: f32

Sampling temperature (0.0 = greedy, higher = more random)

§top_k: Option<usize>

Top-K sampling (limits to K most likely tokens)

§top_p: Option<f32>

Top-P (nucleus) sampling threshold

§min_p: Option<f32>

Min-P sampling threshold

§repetition_penalty: f32

Repetition penalty (1.0 = no penalty)

§greedy: bool

Use greedy decoding (ignores temperature)

§gpu: bool

Use GPU

§no_stream: bool

Disable streaming output

§quiet: bool

Suppress status messages

§draft: Option<String>

Draft model for speculative decoding. Must share the target’s vocabulary: a small model of the same family, such as qwen2.5-0.5b-instruct drafting for qwen2.5-1.5b.

§draft_tokens: usize

Tokens the draft proposes per round. Higher trades wasted draft work against fewer passes over the target’s weights.

§

Summarize

Summarize text

Fields

§input: Option<String>

Input text (or read from stdin)

§model: String

Model to use

§model_path: Option<String>

Path to local model Load weights from a local file or directory instead of the registry

§min_length: Option<usize>

Minimum summary length

§max_length: Option<usize>

Maximum summary length

§num_beams: Option<usize>

Number of beams for beam search

§length_penalty: Option<f32>

Length penalty for beam search (< 1 shorter, > 1 longer)

§no_repeat_ngram: Option<usize>

Block repeated n-grams of this size

§greedy: bool

Use greedy decoding (deterministic, fastest)

§no_stream: bool

Disable streaming output

§gpu: bool

Use GPU

§quiet: bool

Suppress progress messages

§

Translate

Translate text between languages

Fields

§input: Option<String>

Input text (or read from stdin)

§model: String

Model to use

§model_path: Option<String>

Path to local model Load weights from a local file or directory instead of the registry

§src: Option<String>

Source language (e.g., en, de, fr)

§dst: Option<String>

Target language (e.g., en, de, fr)

§max_length: Option<usize>

Maximum output length

§num_beams: Option<usize>

Number of beams for beam search

§length_penalty: Option<f32>

Length penalty for beam search (< 1 shorter, > 1 longer)

§no_repeat_ngram: Option<usize>

Block repeated n-grams of this size

§greedy: bool

Use greedy decoding (deterministic, fastest)

§no_stream: bool

Disable streaming output

§gpu: bool

Use GPU

§quiet: bool

Suppress progress messages

§

Inspect

Show a model’s metadata, config and tensor layout

Fields

§path: String

Path to a .gguf, a .safetensors directory, or a name in ~/.cache/kjarni

§

Embed

Generate embeddings for text

Fields

§input: Option<String>

Input text, file path, or stdin if not provided

§model: String

Embedding model

§model_path: Option<String>

Load weights from a local file or directory instead of the registry

§format: String

Output format: raw, json

§normalize: bool

Scale each vector to unit length

§pooling: String

Pooling strategy: mean, cls, max

Mean matches what sentence-transformers does for these models, and what the library bindings and presets already default to. Pooling changes the vector itself, so a different choice here does not produce a slightly different answer, it produces one that cannot be compared against the others.

§gpu: bool

Run on the GPU

§quiet: bool

Suppress status messages

§

Transcribe

Transcribe audio to text

Fields

§file: String

Path to audio file (wav, mp3, flac, ogg)

§model: String

Model to use (whisper-small, whisper-large-v3)

§model_path: Option<String>

Path to local model directory (not yet implemented) Load weights from a local file or directory instead of the registry

§language: Option<String>

Language code (e.g., en, fr, de). Omit for auto-detect.

§translate: bool

Translate to English instead of transcribing

§timestamps: bool

Include timestamps in output

§max_tokens: Option<usize>

Maximum tokens per 30-second chunk

§no_stream: bool

Disable streaming (wait for full result)

§gpu: bool

Use GPU acceleration

§quiet: bool

Suppress progress output

§

Classify

Classify text using a classification model

Fields

§input: Vec<String>

Input text(s) to classify. Use - for stdin.

§model: String

Model name from registry

§model_path: Option<String>

Load model from local path instead of registry

§labels: Option<String>

Custom labels (comma-separated, order must match model output) Example: –labels “negative,positive” or –labels “neikvætt,jákvætt”

§top_k: usize

Return top K predictions

§threshold: Option<f32>

Minimum confidence threshold (0.0-1.0)

§max_length: Option<usize>

Maximum sequence length (truncates longer inputs)

§batch_size: Option<usize>

Batch size for inference

§multi_label: bool

Use multi-label classification (sigmoid instead of softmax)

§format: String

Output format: json, jsonl, text

§gpu: bool

Run on GPU

§dtype: Option<String>

Model precision: f32, f16, bf16

§quiet: bool

Suppress progress output

§

Rerank

Rerank documents by relevance to a query

Fields

§query: String

The query to rank against

§documents: Vec<String>

Documents to rerank (or read from stdin, one per line)

§model: String
§model_path: Option<String>

Load weights from a local file or directory instead of the registry

§top_k: Option<usize>

Return only top K results

§format: String

Output format: json, jsonl, text, docs

§gpu: bool

Run on the GPU

§quiet: bool

Suppress progress output

§

Chat

Interactive chat mode

Fields

§model: String
§model_path: Option<String>

Load weights from a local file or directory instead of the registry

§system: Option<String>

System prompt to set assistant behavior

§temperature: f32

Sampling temperature

§max_tokens: usize

Max tokens per response

§gpu: bool

Run on the GPU

§quiet: bool

Suppress progress output

§draft: Option<String>

Draft model for speculative decoding. Must share the target’s vocabulary, such as qwen2.5-0.5b-instruct drafting for qwen2.5-1.5b.

§draft_tokens: usize

Tokens the draft proposes per round.

§

Index

Create or manage search indexes

Fields

§

Image

Index and search images by description

Fields

§

Search

Search an index

Fields

§index_path: String

Path to the index file

§query: String

Search query

§top_k: usize

Number of results to return

§mode: String

Search mode: hybrid, semantic, keyword

§model: String

Encoder model for semantic search

§rerank_model: Option<String>

Reranking model (optional) Use a cross-encoder model to rerank initial results Example: –rerank-model “ms-marco-minilm”

§format: String

Output format: json, jsonl, text

§gpu: bool

Run on the GPU

§quiet: bool

Suppress progress output

§

Similarity

Compute similarity between two texts

Fields

§text1: String

First text (or file path)

§text2: String

Second text (or file path)

§model: String

Encoder model

§gpu: bool

Run on the GPU

§quiet: bool

Suppress progress output

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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 PartialEq for Commands

Source§

fn eq(&self, other: &Commands) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Commands

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

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

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: Sized + 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: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

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